[PATCH] D122915: [AArch64] Fold lsr+bfi in tryBitfieldInsertOpFromOr

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 08:27:32 PDT 2022


bcl5980 added a comment.

In D122915#3423539 <https://reviews.llvm.org/D122915#3423539>, @efriedma wrote:

> It looks like the lsr+bfi is coming out of tryBitfieldInsertOpFromOr in AArch64ISelDAGToDAG.cpp.  I see two possible alternatives:
>
> 1. Enhance tryBitfieldInsertOpFromOr to detect when it's shifting a shift.
> 2. Form the BFM op as a DAGCombine, instead of waiting for isel.
>
> This MI peephole seems unlikely to be useful outside of this one case, so I think I'd prefer to fix the existing logic.

@efriedma is the new patch match solution 1 you expect? 
And if possible can you help to explain solution 2? 
I'm a beginner on llvm so it will be grateful if you can tell me the detail solution.


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

https://reviews.llvm.org/D122915



More information about the llvm-commits mailing list