[PATCH] D91512: [AArch64][Isel] Avoid implicit zext for SIGN_EXTEND_INREG (TRUNCATE)

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 08:06:55 PDT 2021


jaykang10 added a comment.

In D91512#3000179 <https://reviews.llvm.org/D91512#3000179>, @efriedma wrote:

> In D91512#2999435 <https://reviews.llvm.org/D91512#2999435>, @jaykang10 wrote:
>
>> I wonder we can extend this check to other basic blocks.
>>
>> For example, if the `trunc` is in other basic block, there could be `CopyFromReg` instead of `trunc` in current basic block. Can we detect the `trunc` in this case please?
>
> Ideally, I think we should kill off isDef32, and run a pass after isel to clean up redundant extension operations.  That would have fewer bugs, and we'd get cross-block optimization for free.

I agree with you. I feel we need custom peephole optimization pass for AArch64. If there is no working patch for it, I could start to implement it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91512/new/

https://reviews.llvm.org/D91512



More information about the llvm-commits mailing list