[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 01:31:54 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:
```
// Concatenate multiple registers of the same size into a wider register.
// The input operands are always ordered from lowest bits to highest:
// %0:(s32) = G_MERGE_VALUES %bits_0_7:(s8), %bits_8_15:(s8),
// %bits_16_23:(s8), %bits_24_31:(s8)
def G_MERGE_VALUES : GenericInstruction {
let OutOperandList = (outs type0:$dst);
let InOperandList = (ins type1:$src0, variable_ops);
let hasSideEffects = false;
let variadicOpsType = type1;
}
```
It hints at scalars, but does not out rule vectors.
https://github.com/llvm/llvm-project/pull/113381
More information about the llvm-commits
mailing list