[llvm] [GlobalISel] Introduce `G_POISON` (PR #127825)
    Matt Arsenault via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Feb 19 19:01:35 PST 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}); }])>;
----------------
arsenm wrote:
I would drop all of the combine handling in the initial patch. There needs to be more fusion with undef
https://github.com/llvm/llvm-project/pull/127825
    
    
More information about the llvm-commits
mailing list