This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/62041] vector fneg codegen uses a subtract instead of an xor (x86-64)
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 07 Aug 2014 09:42:47 +0000
- Subject: [Bug rtl-optimization/62041] vector fneg codegen uses a subtract instead of an xor (x86-64)
- Auto-submitted: auto-generated
- References: <bug-62041-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62041
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-08-07
Component|target |rtl-optimization
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
That's because _mm_sub_ps is a builtin during gimple opts and on RTL we
generally don't do very many FP related optimizations (especially on vectors).
Confirmed.
(insn 6 5 7 (set (reg:V4SF 87)
(mem/u/c:V4SF (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [2 S16 A128]))
/usr/lib64/gcc/x86_64-suse-linux/4.9/include/xmmintrin.h:189 -1
(expr_list:REG_EQUAL (const_vector:V4SF [
(const_double:SF -0.0 [-0x0.0p+0])
(const_double:SF -0.0 [-0x0.0p+0])
(const_double:SF -0.0 [-0x0.0p+0])
(const_double:SF -0.0 [-0x0.0p+0])
])
(nil)))
(insn 7 6 8 (set (reg:V4SF 86)
(minus:V4SF (reg:V4SF 87)
(reg/v:V4SF 85 [ x ])))
/usr/lib64/gcc/x86_64-suse-linux/4.9/include/xmmintrin.h:189 -1
(nil))
could be optimized guarded with the appropriate flags (signed zeros?
nans/infs?).