This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve ifcvt (PR tree-optimization/79389)
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>, Eric Botcazou <ebotcazou at adacore dot com>, Uros Bizjak <ubizjak at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Feb 2017 14:47:11 +0100
- Subject: Re: [PATCH] Improve ifcvt (PR tree-optimization/79389)
- Authentication-results: sourceware.org; auth=none
- References: <20170223114654.GE1849@tucnak> <a59c1160-ffe7-3ae0-bf2e-883a7d5f3029@redhat.com> <20170223133653.GF1849@tucnak>
On 02/23/2017 02:36 PM, Jakub Jelinek wrote:
and both UNLT and GE can be reversed. But if the arguments of the condition
are canonicalized, we run into:
/* Test for an integer condition, or a floating-point comparison
in which NaNs can be ignored. */
if (CONST_INT_P (arg0)
|| (GET_MODE (arg0) != VOIDmode
&& GET_MODE_CLASS (mode) != MODE_CC
&& !HONOR_NANS (mode)))
return reverse_condition (code);
and thus always return UNKNOWN.
So... do you think we could add (in gcc-8, probably, although if it
fixes this regression...)
else if (GET_MODE (arg0) != VOIDmode
&& GET_MODE_CLASS (mode) != MODE_CC
&& HONOR_NANS (mode))
return reverse_condition_maybe_unordered (code);
to make this work?
Bernd