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

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 23 00:42:19 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:

https://github.com/llvm/llvm-project/blob/ae618d360456c5ccf6c8cf2294e708ac6625950e/llvm/lib/CodeGen/MachineVerifier.cpp#L1457

It merge severals scalars into a larger scalar. This is the reason why I argue for propagate_undef_any_op.

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


More information about the llvm-commits mailing list