Skip to content

Commit 8479b9d

Browse files
committed
fixup! [CodeGenPrepare] Replace deleted sext instr with the promoted value.
Add comments for `replaceWith`.
1 parent 77f8e43 commit 8479b9d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2634,6 +2634,9 @@ struct ExtAddrMode : public TargetLowering::AddrMode {
26342634
void print(raw_ostream &OS) const;
26352635
void dump() const;
26362636

2637+
// Replace From in ExtAddrMode with To.
2638+
// E.g., SExt insts may be promoted and deleted. We should replace them with
2639+
// the promoted values.
26372640
void replaceWith(Value *From, Value *To) {
26382641
if (BaseReg == From)
26392642
BaseReg = To;

0 commit comments

Comments
 (0)