[llvm] [RISCV] Inhibit DAG folding shl through zext.w pattern with zba (PR #91626)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 11:28:38 PDT 2024


================
@@ -2891,8 +2890,7 @@ define i64 @srli_slliw(i64 %1) {
 ;
 ; RV64ZBA-LABEL: srli_slliw:
 ; RV64ZBA:       # %bb.0: # %entry
-; RV64ZBA-NEXT:    slli a0, a0, 2
-; RV64ZBA-NEXT:    srli a0, a0, 4
+; RV64ZBA-NEXT:    srli a0, a0, 2
 ; RV64ZBA-NEXT:    slli.uw a0, a0, 4
 ; RV64ZBA-NEXT:    ret
 entry:
----------------
topperc wrote:

I just posted it. We had the majority of the code already. Is there a 3 shift version of this we should do without Zba?

https://github.com/llvm/llvm-project/pull/91626


More information about the llvm-commits mailing list