https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784
--- Comment #19 from rguenther at suse dot de <rguenther at suse dot de> --- On Mon, 27 May 2019, ffengqi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88784 > > --- Comment #18 from Qi Feng <ffengqi at gcc dot gnu.org> --- > I only learned gcc for about 2 months, and I have to say that I don't fully > understand what you guys were saying. Is match.pd the right place to fix this > issue? Am I in the wrong direction? Yes, match.pd is the correct place to add this kind of simplifications. No, please don't use *_{and,or}if codes there if possible. Yes, as I said upthread it might be necessary to rewrite some of GCCs infrastructure to get the pattern applied in all situations.