[llvm] [CodeGenPrepare] Replace deleted ext instr with the promoted value. (PR #71058)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 03:56:55 PST 2025
dtcxzyw wrote:
> Can you say at which point the sext is assigned to which member of the AddrMode and at which point it is later used again?
For the second case, the zext is assigned to `AddrMode.ScaledReg` at https://github.com/llvm/llvm-project/blob/bfa711a970d50c9101c8962609f9aad4f5395825/llvm/lib/CodeGen/CodeGenPrepare.cpp#L4527.
After deleting the zext, it is used by https://github.com/llvm/llvm-project/blob/bfa711a970d50c9101c8962609f9aad4f5395825/llvm/lib/CodeGen/CodeGenPrepare.cpp#L5966-L5978
> Also, does this have any relation to what the MovedAway flag is trying to handle?
`MovedAway` only avoids using the deleted value in subsequent calls. However, the value may be used by the outer `AddressingModeMatcher::matchAddr` call.
https://github.com/llvm/llvm-project/pull/71058
More information about the llvm-commits
mailing list