[Bug target/56944] Better isfinite in some cases?

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 19 15:12:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56944

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> 2013-04-19 15:11:58 UTC ---
(In reply to comment #5)
> For the vectorization, vectorizable_call should handle DF -> SI builtin
> vectorization, see e.g. how on i?86/x86_64 BUILT_IN_IFLOOR is vectorized.

I may try that. For cases where the result of __builtin_finite (really a bool)
is immediately used in a condition, that's going to be a waste compared to
pretending it returns a DI. However, detecting situations where we have a long
l and we use (int) l in an expression where we can remove the cast to int, and
making the necessary adjustments seems hard. Maybe restricting to the case
where the result is used once, as the first argument of a cond_expr where the
other arguments have a wider type would be doable...

Another thing worth trying would be to do this new __builtin_finite expansion
in the middle-end (same place as currently), and implement whatever is
necessary so that the back-end generates the right code from it. Even after the
patch for PR 54716, we are still not very good at turning integer logic
operations into float logic operations.



More information about the Gcc-bugs mailing list