[Bug target/73350] AVX512: GCC optimizes away rounding flags
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 11 09:50:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=73350
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu.org
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The "simplest" way would be to have separate UNSPECs for all ops (but that
explodes the number of unspecs I guess). Currently we get
(insn 21 20 22 (parallel [
(set (reg:V16SF 110)
(vec_merge:V16SF (plus:V16SF (reg:V16SF 111)
(reg:V16SF 112))
(reg:V16SF 113)
(reg:HI 114)))
(unspec [
(const_int 9 [0x9])
] UNSPEC_EMBEDDED_ROUNDING)
])
"/home/space/rguenther/install/gcc-7.0/lib64/gcc/x86_64-pc-linux-gnu/7.0.0/include/avx512fintrin.h":2113
-1
(nil))
and CSE happily looks into parallels, not interpreting the unspec to affect
the set. So another way would be sth like
(insn (set (reg:V16SF 110)
(vec_merge:V16SF (plus:V16SF (reg:V16SF 111)
(reg:V16SF 112))
(reg:V16SF 113)
(reg:HI 114))))
(insn (set (reg:V16SF 110) (unspec [ (reg:V16SF 110) (const_int 9) ]
UNSPEC_EMBEDDED_ROUNDING) ])
or merging this "rounding operation" into the operation (around the
plus, one of its operands or around the merge).
More information about the Gcc-bugs
mailing list