http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54231
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-08-12
CC| |uros at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #7 from Steven Bosscher <steven at gcc dot gnu.org> 2012-08-12
00:27:46 UTC ---
Actually, using the builtins also doesn't work. The instruction patterns are
the same and GCC recog's the "best" available one. E.g.:
#(insn:TI 14 12 27 3 (set (reg:V2DI 21 xmm0 [66])
# (const_vector:V2DI [
# (const_int 0 [0])
# (const_int 0 [0])
# ])) /home/stevenb/devel/build-test/gcc/include/emmintrin.h:1424
1111 {*avx_movv2di_internal}
# (expr_list:REG_EQUIV (const_vector:V2DI [
# (const_int 0 [0])
# (const_int 0 [0])
# ])
# (nil)))
vpxor %xmm0, %xmm0, %xmm0 # 14 *avx_movv2di_internal/1 [length
= 4]
vs.
#(insn:TI 14 12 27 3 (set (reg:V2DI 21 xmm0 [66])
# (const_vector:V2DI [
# (const_int 0 [0])
# (const_int 0 [0])
# ])) /home/stevenb/devel/build-test/gcc/include/emmintrin.h:1424
1124 {*movv2di_internal}
# (expr_list:REG_EQUIV (const_vector:V2DI [
# (const_int 0 [0])
# (const_int 0 [0])
# ])
# (nil)))
pxor %xmm0, %xmm0 # 14 *movv2di_internal/1 [length = 4]
These insns just look the same to GCC, so even if the sse2 builtin expander is
used, the AVX instruction is selected.
Thus a bug, confirmed. Adding i386 guy to CC.