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

[AVX-512] LLC Turns "fpext" and "fmul" into a wrong splitting and addition.

Open llvmbot opened this issue 11 years ago • 3 comments

Bugzilla Link 25289
Resolution FIXED
Resolved on Oct 26, 2015 08:14
Version trunk
OS Linux
Attachments The IR sample.
Reporter LLVM Bugzilla Contributor
CC @dbabokin,@igor-breger,@Vsevolod-Livinskij

Extended Description

LLC tries to extend each of two parts of "%ptr_masked_load.16" in the attached file. It takes the first half of this vector twice, but, I guess, it should take two different halves of this vector. For example, the assembly code, what is the result of LLC:

f_f: # @​f_f vmovups (%rsi), %zmm0 vcvtps2pd %ymm0, %zmm1 vextractf64x4 $2, %zmm0, %ymm0 vcvtps2pd %ymm0, %zmm0 vaddpd %zmm0, %zmm0, %zmm2 vaddpd %zmm1, %zmm1, %zmm3 vmaxpd %zmm3, %zmm1, %zmm1 vmaxpd %zmm2, %zmm0, %zmm0 vcvtpd2ps %zmm1, %ymm1 vcvtpd2ps %zmm0, %ymm0 vinsertf64x4 $1, %ymm0, %zmm1, %zmm0 vmovups %zmm0, (%rdi) retq

I think, the "vextractf64x4" takes the wrong half of %zmm0.

key for LLC launch: -mcpu=knl

llvmbot avatar Oct 22 '15 21:10 llvmbot

Fixed in rL251285

http://reviews.llvm.org/D14062

igor-breger avatar Oct 26 '15 15:10 igor-breger

Another reproducer Same problem with fptosi and fptoui

Vsevolod-Livinskij avatar Oct 26 '15 08:10 Vsevolod-Livinskij

In the title there is a mistake, "fmul" instead of "fpmul".

llvmbot avatar Oct 22 '15 22:10 llvmbot