llvm-project
llvm-project copied to clipboard
LLC can't build gather's intrinsic with constant mask parameter
| Bugzilla Link | 24768 |
| Resolution | FIXED |
| Resolved on | Aug 17, 2016 15:24 |
| Version | trunk |
| OS | Linux |
| Attachments | sample of the input data |
| Reporter | LLVM Bugzilla Contributor |
| CC | @dbabokin,@delena,@hfinkel |
Extended Description
LLC tries to make a vector of the forth parameter (mask) of @llvm.x86.avx512.gather.dpq.512 intrinsic, but it is impossible, because the type of the resulting vector is a bool.
Attached file: badIR.ll - this code does not work, if the forth gather's parameter "i8 3" replace with "i8 bitcast (<8 x i1> <i1 true, i1 true, i1 false, i1 false, i1 false, i1 false, i1 false, i1 false> to i8)", then it compiles.
Key for llc launch: -mcpu=knl
Works on trunk, we get:
movb $3, %al
kmovw %eax, %k1
vpgatherdq (%rax,%ymm0), %zmm0 {%k1}
As expected.
Mask parameter is a vector of i1 elements. See LLVM documentation.