[AVX-512] LLC Turns "fpext" and "fmul" into a wrong splitting and addition.
| 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
Fixed in rL251285
http://reviews.llvm.org/D14062
Another reproducer Same problem with fptosi and fptoui
In the title there is a mistake, "fmul" instead of "fpmul".