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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 13:06:43 PST 2024


Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/118865 at github.com>


================
@@ -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
----------------
arsenm wrote:

There's no problem. The undef should have already propagated to fold the whole result to undef in the original IR. You could fold undef inputs to the new node if you really wanted this to disappear

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


More information about the llvm-commits mailing list