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

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


================
@@ -140,6 +140,15 @@ def fullrev: GICombineRule <
   (apply [{ applyFullRev(*${root}, MRI); }])
 >;
 
+def fullrevpoison: GICombineRule <
+  (defs root:$root, shuffle_matchdata:$matchinfo),
+  (match (G_POISON $src2),
+         (G_SHUFFLE_VECTOR $src, $src1, $src2, $mask):$root,
+         [{ return ShuffleVectorInst::isReverseMask(${mask}.getShuffleMask(),
+                                                    ${mask}.getShuffleMask().size()); }]),
+  (apply [{ applyFullRev(*${root}, MRI); }])
+>;
----------------
mtsokol wrote:

Thanks for the tip! Done!

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


More information about the llvm-commits mailing list