[llvm] [GlobalISel] Combine G_MERGE_VALUES of undef (PR #113381)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 23:31:55 PDT 2024


================
@@ -420,7 +420,8 @@ def unary_undef_to_zero: GICombineRule<
 // replaced with undef.
 def propagate_undef_any_op: GICombineRule<
   (defs root:$root),
-  (match (wip_match_opcode G_ADD, G_FPTOSI, G_FPTOUI, G_SUB, G_XOR, G_TRUNC, G_BITCAST, G_ANYEXT):$root,
+  (match (wip_match_opcode G_ADD, G_FPTOSI, G_FPTOUI, G_SUB, G_XOR, G_TRUNC, G_BITCAST,
+                           G_ANYEXT, G_MERGE_VALUES):$root,
----------------
tschuett wrote:

Assuming G_MERGE_VALUES (5, undef), I would expect the result to be undef.

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


More information about the llvm-commits mailing list