[llvm] [GlobalISel] Combine into abd[su] and legalize abd[su] (PR #118865)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 09:59:54 PST 2024


================
@@ -403,14 +614,19 @@ define <8 x i16> @abds_const_bothhigh() {
 }
 
 define <8 x i16> @abds_undef(<8 x i16> %src1) {
-; CHECK-LABEL: abds_undef:
-; CHECK:       // %bb.0:
-; CHECK-NEXT:    sshll v1.4s, v0.4h, #0
-; CHECK-NEXT:    sshll2 v0.4s, v0.8h, #0
-; CHECK-NEXT:    abs v0.4s, v0.4s
-; CHECK-NEXT:    abs v1.4s, v1.4s
-; CHECK-NEXT:    uzp1 v0.8h, v1.8h, v0.8h
-; CHECK-NEXT:    ret
+; CHECK-SD-LABEL: abds_undef:
+; CHECK-SD:       // %bb.0:
+; CHECK-SD-NEXT:    sshll v1.4s, v0.4h, #0
+; CHECK-SD-NEXT:    sshll2 v0.4s, v0.8h, #0
+; CHECK-SD-NEXT:    abs v0.4s, v0.4s
+; CHECK-SD-NEXT:    abs v1.4s, v1.4s
+; CHECK-SD-NEXT:    uzp1 v0.8h, v1.8h, v0.8h
+; CHECK-SD-NEXT:    ret
+;
+; CHECK-GI-LABEL: abds_undef:
+; CHECK-GI:       // %bb.0:
+; CHECK-GI-NEXT:    sabd v0.8h, v0.8h, v0.8h
----------------
tschuett wrote:

Nope. Common problem in the trunc of abs combine.

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


More information about the llvm-commits mailing list