Issue 87775
Summary Arbitrary Constant Operands vs. 0
Labels llvm:globalisel
Assignees
Reporter tschuett
    According to the Mir pattern guide immediates can be a named constant, i.e., 0 or 1. We cannot express that an immediate is constant without committing to the value.

```
def extract_vector_element_shuffle_vector : GICombineRule<
   (defs root:$root, build_fn_matchinfo:$matchinfo),
 (match (G_SHUFFLE_VECTOR $src, $src1, $src2, $mask),
 (G_EXTRACT_VECTOR_ELT $root, $src, $idx),
   [{ return Helper.matchExtractVectorElementWithShuffleVector(${root}, ${matchinfo}); }]),
   (apply [{ Helper.applyBuildFnMO(${root}, ${matchinfo}); }])>;
```
This combine can only succeed, if `$idx`  is constant.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to