[llvm] [GlobalISel] Combine [a, s, z]ext of undef into 0 or undef (PR #117439)

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 30 23:55:41 PST 2024


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/117439 at github.com>


================
@@ -1857,6 +1857,26 @@ class integer_of_opcode<Instruction castOpcode> : GICombineRule <
 
 def integer_of_truncate : integer_of_opcode<G_TRUNC>;
 
+def anyext_undef: GICombineRule<
+   (defs root:$root),
+   (match (G_IMPLICIT_DEF $undef),
+          (G_ANYEXT $root, $undef):$Aext),
+   (apply [{ Helper.replaceInstWithUndef(*${Aext}); }])>;
----------------
aemerson wrote:

Why is this change still here at all? It was fine where it was in propagate_undef_any_op.

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


More information about the llvm-commits mailing list