[llvm] [RISCV][GISEL] Add legalizer for G_BSWAP (PR #70226)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 10:49:57 PDT 2023
================
@@ -68,77 +68,32 @@ body: |
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
----------------
topperc wrote:
I think it looks ok.
I see that we AND before SHL and after LSHR. That allows us to use the same AND mask twice. SelectionDAG used to use two different constants, but was fixed here https://reviews.llvm.org/D138045
You can use -start-before=legalizer to run all the way to assembly. The comparison with the SelectionDAG output will still require some hand analysis.
https://github.com/llvm/llvm-project/pull/70226
More information about the llvm-commits
mailing list