Index: src/IceTargetLowering.cpp |
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp |
index aa1a80c46b30da7603175b7541bcee0ddf3736ce..585f3722fd3a508df2ba4958d0d19b8d8572718f 100644 |
--- a/src/IceTargetLowering.cpp |
+++ b/src/IceTargetLowering.cpp |
@@ -81,12 +81,11 @@ void LoweringContext::availabilityUpdate() { |
Inst *Instr = LastInserted; |
if (Instr == nullptr) |
return; |
- if (!Instr->isSimpleAssign()) |
+ if (!Instr->isVarAssign()) |
return; |
- if (auto *SrcVar = llvm::dyn_cast<Variable>(Instr->getSrc(0))) { |
- LastDest = Instr->getDest(); |
- LastSrc = SrcVar; |
- } |
+ // Since isVarAssign() is true, the source operand must be a Variable. |
+ LastDest = Instr->getDest(); |
+ LastSrc = llvm::cast<Variable>(Instr->getSrc(0)); |
} |
Variable *LoweringContext::availabilityGet(Operand *Src) const { |