[LLVMdev] Unnecessary moves after sign-extension in 2-address target
Dan Gohman
gohman at apple.com
Tue Apr 21 11:40:25 PDT 2009
On Apr 19, 2009, at 6:15 PM, Greg McGary wrote:
>
> Because sextb_r and sextw_r have destination tied to source operands,
> TwoAddressInstructionPass thinks it needs a copy. However, since the
> sext kills its source, the copy is unnecessary. Why does this happen?
> Is TwoAddressInstructionPass relying on a later pass to notice this
> and
> transform it again?
Yes, the later pass is the coalescer. It would be worthwhile to
understand why it is not coalescing the copies.
Dan
More information about the llvm-dev
mailing list