https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32306
Bernd Schmidt <bernds at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernds at gcc dot gnu.org --- Comment #29 from Bernd Schmidt <bernds at gcc dot gnu.org> --- (In reply to Richard Biener from comment #19) > Shorter testcase, compilable and to the point. We are not able to CSE > the b1 && ... && b8 sequence because we produce control-flow for it > during gimplification. > > void bar (short *array, > short b1, short b2, short b3, short b4, > short b5, short b6, short b7, short b8) > { > array[0] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8; > array[1] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8; > } This seems to be optimized as of 4.7, but the original testcase still needs work. Maybe sccvn could be taught to recreate the conditionals?