Skip to content

Commit ac5b8a0

Browse files
committed
address pr comment
1 parent 4d08722 commit ac5b8a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/DirectX/DXILLegalizePass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ legalizeGetHighLowi64Bytes(Instruction &I,
329329
BitCast->getSrcTy()->isIntegerTy(64)) {
330330
ToRemove.push_back(BitCast);
331331
ReplacedValues[BitCast] = BitCast->getOperand(0);
332+
return;
332333
}
333334
}
334335

@@ -341,6 +342,8 @@ legalizeGetHighLowi64Bytes(Instruction &I,
341342
IRBuilder<> Builder(&I);
342343
assert(dyn_cast<BitCastInst>(Extract->getVectorOperand()));
343344
auto *Replacement = ReplacedValues[Extract->getVectorOperand()];
345+
assert(Replacement && "The BitCast replacement should have been set "
346+
"before working on ExtractElementInst.");
344347
if (Idx == 0) {
345348
Value *LowBytes = Builder.CreateTrunc(
346349
Replacement, Type::getInt32Ty(I.getContext()));

0 commit comments

Comments
 (0)