Issue 87194
Summary Combiner dags/patterns.
Labels llvm:globalisel
Assignees
Reporter tschuett
    I have issues with opcodes that a variable number of operands:
```
def G_BUILD_VECTOR : GenericInstruction {
  let OutOperandList = (outs type0:$dst);
  let InOperandList = (ins type1:$src0, variable_ops);
 let hasSideEffects = false;
  let variadicOpsType = type1;
}
```
For build vector the number of sources is variable.

I tried in the combiner:
```
def extract_vector_element_build_vector : GICombineRule<
   (defs root:$root, build_fn_matchinfo:$matchinfo),
   (match (G_BUILD_VECTOR $src, $x),
 (G_EXTRACT_VECTOR_ELT $root, $src, $idx),
   [{ return Helper.matchExtractVectorElementWithBuildVector(${root}, ${matchinfo}); }]),
   (apply [{ Helper.applyBuildFnMO(${root}, ${matchinfo}); }])>;
```
but it fails when there are two operands.

I could copy-paste up to 8 or 16 operands, but ....
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to