Skip to content

Commit e076077

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

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
@@ -3074,6 +3074,9 @@ struct ExtAddrMode : public TargetLowering::AddrMode {
30743074
void print(raw_ostream &OS) const;
30753075
void dump() const;
30763076

3077+
// Replace From in ExtAddrMode with To.
3078+
// E.g., SExt insts may be promoted and deleted. We should replace them with
3079+
// the promoted values.
30773080
void replaceWith(Value *From, Value *To) {
30783081
if (BaseReg == From)
30793082
BaseReg = To;

0 commit comments

Comments
 (0)