[PATCH] D102893: [RISCV] Optimize xor/or with immediate in the zbs extension
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 20 20:57:53 PDT 2021
craig.topper added a comment.
My comment on the previous patch was about constants like 2051 that can be done with
ORI a0, 3
BSETI a0, 11
I don't think this patch handles that.
================
Comment at: llvm/test/CodeGen/RISCV/rv64zbs.ll:1426
; RV64IB: # %bb.0:
-; RV64IB-NEXT: lui a1, 2
-; RV64IB-NEXT: addiw a1, a1, -2045
-; RV64IB-NEXT: or a0, a0, a1
+; RV64IB-NEXT: ori a0, a0, 3
+; RV64IB-NEXT: bseti a0, a0, 11
----------------
This isn't really an improvement.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102893/new/
https://reviews.llvm.org/D102893
More information about the llvm-commits
mailing list