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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to ptomsich from comment #2)
> Created attachment 63960 [details]
> match.pd-based patch
> 
> For what it's worth...
> 
> I also took a shot at this today, as I was wondering whether this can be
> done with match.pd and narrowly matched for this pass.  Surprisingly I came
> across the 'op!' operator/qualifier which only works inside of VN.
> 
> Tested on aarch64 only.

Ah, yeah - this is an interesting use of ! (in theory it might also combine
with
a corresponding a - CST, though we have patterns to combine a + CST - CST
already that can look through conversions).  The visit_nary_op tricks
pre-date ! support, I wonder if all parts of the tricks used can be mapped
to match.pd now.

Reply via email to