Skip to content

Commit 70cc62a

Browse files
committed
address pr comment
1 parent ef0efad commit 70cc62a

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
@@ -431,6 +431,7 @@ legalizeGetHighLowi64Bytes(Instruction &I,
431431
BitCast->getSrcTy()->isIntegerTy(64)) {
432432
ToRemove.push_back(BitCast);
433433
ReplacedValues[BitCast] = BitCast->getOperand(0);
434+
return;
434435
}
435436
}
436437

@@ -443,6 +444,8 @@ legalizeGetHighLowi64Bytes(Instruction &I,
443444
IRBuilder<> Builder(&I);
444445
assert(dyn_cast<BitCastInst>(Extract->getVectorOperand()));
445446
auto *Replacement = ReplacedValues[Extract->getVectorOperand()];
447+
assert(Replacement && "The BitCast replacement should have been set "
448+
"before working on ExtractElementInst.");
446449
if (Idx == 0) {
447450
Value *LowBytes = Builder.CreateTrunc(
448451
Replacement, Type::getInt32Ty(I.getContext()));

0 commit comments

Comments
 (0)