Skip to content

Commit 63d4276

Browse files
authored
[ESIMD][NFC] Fix warning: unused variable StoreInstValueOperandIndex (#7912)
The variable was used only in 1 assert statement and caused a warning with build modes where assert is mapped to NO-OP. The assert is also removed because it verifies something that should always be true. In particular, the StoreInst instructions have 2 operands: Value and DestPtr. If 'StI' is user of 'U' and 'U' is not DstPtr, then 'U' simply must be the 'Value' operand. Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
1 parent c00d427 commit 63d4276

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

llvm/lib/SYCLLowerIR/SYCLUtils.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,7 @@ bool collectPossibleStoredVals(
181181
Value *V = U->getUser();
182182

183183
if (auto *StI = dyn_cast<StoreInst>(V)) {
184-
constexpr int StoreInstValueOperandIndex = 0;
185-
186184
if (U != &StI->getOperandUse(StoreInst::getPointerOperandIndex())) {
187-
assert(U == &StI->getOperandUse(StoreInstValueOperandIndex));
188185
// this is double indirection - not supported
189186
return false;
190187
}

0 commit comments

Comments
 (0)