This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/72867] SSE/AVX/AVX512: incorrect optimization of VMINPS/VMAXPS at compile time


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72867

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #1)
> So shall we use the UNSPEC_IEEE_MIN/MAX patterns instead of the max/min RTL
> for the non-fast-math case?  Either generate those unspecs in the expanders
> if honoring nans or signed zeros, or use different expanders for the
> intrinsics that do that?
> 
> There is:
> ;; ??? For !flag_finite_math_only, the representation with SMIN/SMAX
> ;; isn't really correct, as those rtl operators aren't defined when
> ;; applied to NaNs.  Hopefully the optimizers won't get too smart on us.
> comment, as the intrinsics are preserved as md builtin calls during GIMPLE
> and I don't think we have gimple folders for those, it means the RTL
> optimizers are finally smart enough...

Yes, we should take the same approach as in i386.md (the iterators and
attributes for the implementation are already defined in i386.md). IEEE unspecs
with VF iterators are already present in sse.md, so I wonder why they are not
used in the above case.

(Please also note that another instance of SMIN/SMAX patterns is in mmx.md).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]