llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

LLC can't build gather's intrinsic with constant mask parameter

Open llvmbot opened this issue 11 years ago • 2 comments

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

llvmbot avatar Sep 10 '15 12:09 llvmbot

Works on trunk, we get:

movb	$3, %al
kmovw	%eax, %k1
vpgatherdq	(%rax,%ymm0), %zmm0 {%k1}

As expected.

llvmbot avatar Aug 17 '16 22:08 llvmbot

Mask parameter is a vector of i1 elements. See LLVM documentation.

delena avatar Sep 17 '15 21:09 delena