Skip to content

Commit b63502c

Browse files
committed
address pr comment
1 parent ea7c0db commit b63502c

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
@@ -522,6 +522,7 @@ legalizeGetHighLowi64Bytes(Instruction &I,
522522
BitCast->getSrcTy()->isIntegerTy(64)) {
523523
ToRemove.push_back(BitCast);
524524
ReplacedValues[BitCast] = BitCast->getOperand(0);
525+
return;
525526
}
526527
}
527528

@@ -534,6 +535,8 @@ legalizeGetHighLowi64Bytes(Instruction &I,
534535
IRBuilder<> Builder(&I);
535536
assert(dyn_cast<BitCastInst>(Extract->getVectorOperand()));
536537
auto *Replacement = ReplacedValues[Extract->getVectorOperand()];
538+
assert(Replacement && "The BitCast replacement should have been set "
539+
"before working on ExtractElementInst.");
537540
if (Idx == 0) {
538541
Value *LowBytes = Builder.CreateTrunc(
539542
Replacement, Type::getInt32Ty(I.getContext()));

0 commit comments

Comments
 (0)