[llvm] [GlobalISel] Introduce `G_POISON` (PR #127825)

Mateusz Sokół via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 07:16:49 PDT 2025


================
@@ -430,6 +430,12 @@ def binop_right_undef_to_undef: GICombineRule<
          [{ return Helper.matchOperandIsUndef(*${root}, 2); }]),
   (apply [{ Helper.replaceInstWithUndef(*${root}); }])>;
 
+def binop_right_poison_to_poison
+    : GICombineRule<(defs root:$root),
+                    (match(wip_match_opcode G_SHL, G_ASHR, G_LSHR):$root,
+                        [{ return Helper.matchOperandIsPoison(*${root}, 2); }]),
+                    (apply [{ Helper.replaceInstWithPoison(*${root}); }])>;
----------------
mtsokol wrote:

Sure, I removed all of it from this PR. I'll place it in the follow-up.

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


More information about the llvm-commits mailing list