[llvm] [DAG] Add legalization handling for ABDS/ABDU (PR #92576)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 05:43:59 PDT 2024


================
@@ -24,9 +24,10 @@ define <vscale x 16 x i8> @saba_b(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b,
 define <vscale x 16 x i8> @saba_b_promoted_ops(<vscale x 16 x i8> %a, <vscale x 16 x i1> %b, <vscale x 16 x i1> %c) #0 {
 ; CHECK-LABEL: saba_b_promoted_ops:
 ; CHECK:       // %bb.0:
-; CHECK-NEXT:    mov z1.b, p0/z, #-1 // =0xffffffffffffffff
-; CHECK-NEXT:    mov z2.b, p1/z, #-1 // =0xffffffffffffffff
-; CHECK-NEXT:    saba z0.b, z1.b, z2.b
+; CHECK-NEXT:    ptrue p2.b
+; CHECK-NEXT:    mov z1.b, #1 // =0x1
+; CHECK-NEXT:    eor p0.b, p2/z, p0.b, p1.b
+; CHECK-NEXT:    add z0.b, p0/m, z0.b, z1.b
----------------
davemgreen wrote:

Ignore my middle comment - it was just a side-remark about how much DAG should be canonicalizing.

Do you know if we have decent test coverage for scalar patterns at the moment?

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


More information about the llvm-commits mailing list