[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 13:11:55 PST 2024


================
@@ -93,9 +147,14 @@ define <8 x i16> @abdu_const_bothhigh() {
 }
 
 define <8 x i16> @abdu_undef(<8 x i16> %src1) {
-; CHECK-LABEL: abdu_undef:
-; CHECK:       // %bb.0:
-; CHECK-NEXT:    ret
+; CHECK-SD-LABEL: abdu_undef:
+; CHECK-SD:       // %bb.0:
+; CHECK-SD-NEXT:    ret
+;
+; CHECK-GI-LABEL: abdu_undef:
+; CHECK-GI:       // %bb.0:
+; CHECK-GI-NEXT:    uabd v0.8h, v0.8h, v0.8h
----------------
tschuett wrote:

`%zextsrc2 = zext <8 x i16> undef to <8 x i32>`. We currently don't fold G_ZEXT(undef). We end up with G_ABDU(%src1, undef), which might explain the v0.

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


More information about the llvm-commits mailing list