https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115889
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazylht at gmail dot com --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- foo: .LFB6: .cfi_startproc movq %rsi, %rax subq %rdi, %rax subq $2, %rax cmpq $124, %rax jbe .L11 vmovdqu16 (%rdi), %zmm2 vmovdqa64 .LC0(%rip), %zmm1 kxord %k1, %k1, %k1 vpxor %xmm0, %xmm0, %xmm0 vpermi2w %zmm0, %zmm2, %zmm1 vcvtne2ps2bf16 %zmm2, %zmm0, %zmm0 vpsllw $1, %zmm1, %zmm1 vmovdqa64 .LC3(%rip), %zmm2 vpaddw .LC2(%rip), %zmm0, %zmm0 vpermi2w %zmm0, %zmm1, %zmm2 vmovdqu16 %zmm2, (%rsi) vmovdqa64 .LC4(%rip), %zmm2 vpermt2w %zmm0, %zmm2, %zmm1 vmovdqu16 %zmm1, 64(%rsi){%k1} vzeroupper huh, vcvtne2ps2bf16!? We're dealing with unsigned short integer data here. (insn:TI 22 68 73 3 (set (reg:V32HI 21 xmm1 [orig:125 vect__4.22_47 ] [125]) (unspec:V32HI [ (reg:V32HI 21 xmm1 [126]) (reg:V32HI 22 xmm2 [orig:123 MEM <vector(32) short unsigned int> [(short unsigned int *)in_12(D)] ] [123]) (reg:V32HI 20 xmm0 [orig:110 vect__4.21 ] [110]) ] UNSPEC_VPERMT2)) "/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-vfa-03.c":28:23 8855 {avx512bw_vpermt2varv32hi3} (nil)) (insn:TI 73 22 23 3 (set (reg:V32BF 20 xmm0 [150]) (vec_concat:V32BF (float_truncate:V16BF (reg:V16SF 22 xmm2 [orig:123 MEM <vector(32) short unsigned int> [(short unsigned int *)in_12(D)] ] [123])) (float_truncate:V16BF (reg:V16SF 20 xmm0 [orig:110 vect__4.21 ] [110])))) "/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-vfa-03.c":28:23 9758 {avx512f_cvtne2ps2bf16_v32bf} (expr_list:REG_DEAD (reg:V16SF 22 xmm2 [orig:123 MEM <vector(32) short unsigned int> [(short unsigned int *)in_12(D)] ] [123]) (nil))) this insn appears in IRA and before was not recognized: (insn 23 22 24 3 (set (reg:V32HI 112 [ vect__6.23 ]) (ashift:V32HI (reg:V32HI 125 [ vect__4.22_47 ]) (const_int 1 [0x1]))) "/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-vfa-03.c":28:16 7140 {ashlv32hi3} (expr_list:REG_DEAD (reg:V32HI 125 [ vect__4.22_47 ]) (nil))) (note 24 23 73 3 NOTE_INSN_DELETED) (insn 73 24 74 3 (set (reg:V32BF 150) (vec_concat:V32BF (float_truncate:V16BF (subreg:V16SF (reg:V32HI 123 [ MEM <vector(32) short unsigned int> [(short unsigned int *)in_12(D)] ]) 0)) (float_truncate:V16BF (subreg:V16SF (reg:V32HI 110 [ vect__4.21 ]) 0)))) "/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-vfa-03.c":28:23 -1 (nil)) (insn 74 73 26 3 (set (reg:V32HI 127 [ vect__4.28_54 ]) (subreg:V32HI (reg:V32BF 150) 0)) "/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-vfa-03.c":28:23 -1 (nil)) introduced by split1: +Splitting with gen_split_3597 (sse.md:31470) +scanning new insn with uid = 73. +scanning new insn with uid = 74. +deleting insn with uid = 25. +deleting insn with uid = 25. -(insn 25 24 26 3 (set (reg:V32HI 127 [ vect__4.28_54 ]) - (unspec:V32HI [ - (const_vector:V32HI [ - (const_int 1 [0x1]) - (const_int 3 [0x3]) - (const_int 5 [0x5]) - (const_int 7 [0x7]) - (const_int 9 [0x9]) - (const_int 11 [0xb]) - (const_int 13 [0xd]) - (const_int 15 [0xf]) - (const_int 17 [0x11]) - (const_int 19 [0x13]) - (const_int 21 [0x15]) - (const_int 23 [0x17]) - (const_int 25 [0x19]) - (const_int 27 [0x1b]) - (const_int 29 [0x1d]) - (const_int 31 [0x1f]) - (const_int 33 [0x21]) - (const_int 35 [0x23]) - (const_int 37 [0x25]) - (const_int 39 [0x27]) - (const_int 41 [0x29]) - (const_int 43 [0x2b]) - (const_int 45 [0x2d]) - (const_int 47 [0x2f]) - (const_int 49 [0x31]) - (const_int 51 [0x33]) - (const_int 53 [0x35]) - (const_int 55 [0x37]) - (const_int 57 [0x39]) - (const_int 59 [0x3b]) - (const_int 61 [0x3d]) - (const_int 63 [0x3f]) - ]) - (reg:V32HI 123 [ MEM <vector(32) short unsigned int> [(short unsigned int *)in_12(D)] ]) - (reg:V32HI 110 [ vect__4.21 ]) - ] UNSPEC_VPERMT2)) "/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-vfa-03.c":28:23 9827 {vpermt2_sepcial_bf16_shuffle_v32hi} - (expr_list:REG_DEAD (reg:V32HI 110 [ vect__4.21 ]) - (expr_list:REG_DEAD (reg:V32HI 123 [ MEM <vector(32) short unsigned int> [(short unsigned int *)in_12(D)] ]) - (nil)))) -(note 26 25 27 3 NOTE_INSN_DELETED) +(note 24 23 73 3 NOTE_INSN_DELETED) +(insn 73 24 74 3 (set (reg:V32BF 150) + (vec_concat:V32BF (float_truncate:V16BF (subreg:V16SF (reg:V32HI 123 [ MEM <vector(32) short unsigned int> [(short unsigned int *)in_12(D)] ]) 0)) + (float_truncate:V16BF (subreg:V16SF (reg:V32HI 110 [ vect__4.21 ]) 0)))) "/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-vfa-03.c":28:23 -1 + (nil)) +(insn 74 73 26 3 (set (reg:V32HI 127 [ vect__4.28_54 ]) + (subreg:V32HI (reg:V32BF 150) 0)) "/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-vfa-03.c":28:23 -1 + (nil))