This patch is intended to fix a missed optimization in match.pd. It optimizes
(x >= 0 ? x : 0) + (x <= 0 ? -x : 0) to just abs(x). I had to write a second
simplification in match.pd to handle the commutative property as the match was
not ocurring otherwise. Additionally, the pattern (x <= 0 ? -x
On Wed, Jul 13, 2022 at 12:26 PM Sam Feifer via Gcc-patches
wrote:
>
> This patch is intended to fix a missed optimization in match.pd. It optimizes
> (x >= 0 ? x : 0) + (x <= 0 ? -x : 0) to just abs(x). I had to write a second
> simplification in match.pd to handle the commutative property as t
On Wed, Jul 13, 2022 at 9:36 PM Andrew Pinski via Gcc-patches
wrote:
>
> On Wed, Jul 13, 2022 at 12:26 PM Sam Feifer via Gcc-patches
> wrote:
> >
> > This patch is intended to fix a missed optimization in match.pd. It
> > optimizes (x >= 0 ? x : 0) + (x <= 0 ? -x : 0) to just abs(x). I had to
>
On Wed, Jul 13, 2022 at 3:36 PM Andrew Pinski wrote:
> On Wed, Jul 13, 2022 at 12:26 PM Sam Feifer via Gcc-patches
> wrote:
> >
> > This patch is intended to fix a missed optimization in match.pd. It
> optimizes (x >= 0 ? x : 0) + (x <= 0 ? -x : 0) to just abs(x). I had to
> write a second simpl
On Thu, Jul 14, 2022 at 7:09 AM Sam Feifer wrote:
>
>
> On Wed, Jul 13, 2022 at 3:36 PM Andrew Pinski wrote:
>>
>> On Wed, Jul 13, 2022 at 12:26 PM Sam Feifer via Gcc-patches
>> wrote:
>> >
>> > This patch is intended to fix a missed optimization in match.pd. It
>> > optimizes (x >= 0 ? x : 0)
On Thu, Jul 14, 2022 at 1:24 PM Andrew Pinski wrote:
> On Thu, Jul 14, 2022 at 7:09 AM Sam Feifer wrote:
> >
> >
> > On Wed, Jul 13, 2022 at 3:36 PM Andrew Pinski wrote:
> >>
> >> On Wed, Jul 13, 2022 at 12:26 PM Sam Feifer via Gcc-patches
> >> wrote:
> >> >
> >> > This patch is intended to fi
On Thu, Jul 14, 2022 at 12:38 PM Sam Feifer wrote:
>
>
>
> On Thu, Jul 14, 2022 at 1:24 PM Andrew Pinski wrote:
>>
>> On Thu, Jul 14, 2022 at 7:09 AM Sam Feifer wrote:
>> >
>> >
>> > On Wed, Jul 13, 2022 at 3:36 PM Andrew Pinski wrote:
>> >>
>> >> On Wed, Jul 13, 2022 at 12:26 PM Sam Feifer via
; +__attribute__((noipa)) unsigned int foo(int x) {
> >> >> > +return x <= 0 ? -x : 0;
> >> >> > +}
> >> >> > +
> >> >> > +/* Changed order. */
> >> >> > +__attribute__((noipa)) unsigned int bar(int x) {
&
Just realized I had mixed up the 9 and the 2 when labelling the patch. This
patch is referring to pr94920 not pr94290. Attached is a fixed patch file.
Sorry for any confusion.
On Mon, Jul 18, 2022 at 9:07 AM Sam Feifer wrote:
> Here's an updated version of the patch.
>
> Thanks
> -Sam
>
> On Thu
On Mon, Jul 18, 2022 at 7:31 PM Sam Feifer via Gcc-patches
wrote:
>
> Just realized I had mixed up the 9 and the 2 when labelling the patch. This
> patch is referring to pr94920 not pr94290. Attached is a fixed patch file.
> Sorry for any confusion.
Can you put the patterns somewhere related? Th
Attached is a patch file with those changes.
Thanks
-Sam
On Tue, Jul 19, 2022 at 2:36 AM Richard Biener
wrote:
> On Mon, Jul 18, 2022 at 7:31 PM Sam Feifer via Gcc-patches
> wrote:
> >
> > Just realized I had mixed up the 9 and the 2 when labelling the patch.
> This
> > patch is referring to p
11 matches
Mail list logo