[llvm] [RISCV] Add vector hasAndNot to enable optimizations (PR #132438)
Piotr Fusik via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 21 11:08:29 PDT 2025
================
@@ -2580,9 +2580,9 @@ define <vscale x 1 x i8> @not_signbit_mask_nxv1i8(<vscale x 1 x i8> %a, <vscale
; CHECK-ZVKB-LABEL: not_signbit_mask_nxv1i8:
; CHECK-ZVKB: # %bb.0:
; CHECK-ZVKB-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
-; CHECK-ZVKB-NEXT: vmsgt.vi v0, v8, -1
-; CHECK-ZVKB-NEXT: vmv.v.i v8, 0
-; CHECK-ZVKB-NEXT: vmerge.vvm v8, v8, v9, v0
+; CHECK-ZVKB-NEXT: vsra.vi v8, v8, 7
+; CHECK-ZVKB-NEXT: vnot.v v8, v8
+; CHECK-ZVKB-NEXT: vand.vv v8, v8, v9
----------------
pfusik wrote:
I don't know why this isn't fold into `vandn.vv`.
https://github.com/llvm/llvm-project/pull/132438
More information about the llvm-commits
mailing list