Issue |
98436
|
Summary |
Argument limit for avx2_gather is too weak
|
Labels |
new issue
|
Assignees |
|
Reporter |
KanRobert
|
https://www.godbolt.org/z/9T1eGPWjY
llvm/include/llvm/IR/IntrinsicsX86.td
```
def int_x86_avx2_gather_q_q_256 : ClangBuiltin<"__builtin_ia32_gatherq_q256">,
DefaultAttrsIntrinsic<[llvm_v4i64_ty],
[llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty],
[IntrReadMem, ImmArg<ArgIndex<4>>]>;
```
The i8 operand is a scale, and should be 1, 2, 4 or 8. But now the middle end only knows it's 8-bit immediate. So llvm-reduce may assign 0 to the operand and then produce incorrect IR.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs