Re: [PATCH, V2] Fix PR 118541, do not generate unordered fp cmoves for IEEE compares.

2025-02-10 Thread Peter Bergner
On 2/7/25 11:48 PM, Michael Meissner wrote: > On Fri, Feb 07, 2025 at 05:51:19PM -0600, Peter Bergner wrote: >> On 2/7/25 4:02 PM, Michael Meissner wrote: >>> (define_predicate "invert_fpmask_comparison_operator" >>> - (match_code "ne,unlt,unle")) >>> + (ior (match_code "ne") >>> + (and (m

Re: [PATCH, V2] Fix PR 118541, do not generate unordered fp cmoves for IEEE compares.

2025-02-07 Thread Michael Meissner
On Fri, Feb 07, 2025 at 05:51:19PM -0600, Peter Bergner wrote: > On 2/7/25 4:02 PM, Michael Meissner wrote: > > (define_predicate "invert_fpmask_comparison_operator" > > - (match_code "ne,unlt,unle")) > > + (ior (match_code "ne") > > + (and (match_code "unlt,unle") > > + (match_test

Re: [PATCH, V2] Fix PR 118541, do not generate unordered fp cmoves for IEEE compares.

2025-02-07 Thread Michael Meissner
On Fri, Feb 07, 2025 at 05:51:19PM -0600, Peter Bergner wrote: > On 2/7/25 4:02 PM, Michael Meissner wrote: > > (define_predicate "invert_fpmask_comparison_operator" > > - (match_code "ne,unlt,unle")) > > + (ior (match_code "ne") > > + (and (match_code "unlt,unle") > > + (match_test

Re: [PATCH, V2] Fix PR 118541, do not generate unordered fp cmoves for IEEE compares.

2025-02-07 Thread Peter Bergner
On 2/7/25 4:02 PM, Michael Meissner wrote: > (define_predicate "invert_fpmask_comparison_operator" > - (match_code "ne,unlt,unle")) > + (ior (match_code "ne") > + (and (match_code "unlt,unle") > + (match_test "!HONOR_NANS (DFmode) || !TARGET_P9_VECTOR" Is it always safe to use

[PATCH, V2] Fix PR 118541, do not generate unordered fp cmoves for IEEE compares.

2025-02-07 Thread Michael Meissner
This is version 2 of the patch. Changes from the V1 patch: 1: I added a test in invert_fpmask_comparison_operator to not allow UNLE and UNLT unless fast math is in force. Both invert_fpmask_comparison_operator and fpmask_comparison_operator are used to form floating point conditional moves on Po