https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82120
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This is a total mess. I've copied a boilerplate from other tests that require branch cost of 2. I guess 2017-09-06 Jakub Jelinek <ja...@redhat.com> PR testsuite/82120 * gcc.dg/tree-ssa/pr81588.c: Don't run on logical_op_short_circuit targets. --- gcc/testsuite/gcc.dg/tree-ssa/pr81588.c.jj 2017-08-02 12:10:36.000000000 +0200 +++ gcc/testsuite/gcc.dg/tree-ssa/pr81588.c 2017-09-06 16:09:57.373505808 +0200 @@ -1,5 +1,5 @@ /* PR tree-optimization/81588 */ -/* { dg-do compile { target { ! "m68k*-*-* mmix*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-*" } } } */ +/* { dg-do compile { target { ! { logical_op_short_circuit || { m68k*-*-* bfin*-*-* v850*-*-* moxie*-*-* m32c*-*-* fr30*-*-* mcore*-*-* xtensa*-*-* hppa*-*-* } } } } } */ /* { dg-options "-O2 -fdump-tree-reassoc1-details" } */ /* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */ could fix that, but that will mean it will be untested even on mips, avr and s390 when it could be tested there. So perhaps better: 2017-09-06 Jakub Jelinek <ja...@redhat.com> PR testsuite/82120 * gcc.dg/tree-ssa/pr81588.c: Don't run on logical_op_short_circuit targets except for those where -mbranch-cost=2 is supported. --- gcc/testsuite/gcc.dg/tree-ssa/pr81588.c.jj 2017-08-02 12:10:36.000000000 +0200 +++ gcc/testsuite/gcc.dg/tree-ssa/pr81588.c 2017-09-06 16:17:30.563118589 +0200 @@ -1,5 +1,5 @@ /* PR tree-optimization/81588 */ -/* { dg-do compile { target { ! "m68k*-*-* mmix*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-*" } } } */ +/* { dg-do compile { target { ! { { logical_op_short_circuit && { ! "mips*-*-* avr-*-* s390*-*-*" } } || { m68k*-*-* bfin*-*-* v850*-*-* moxie*-*-* m32c*-*-* fr30*-*-* mcore*-*-* xtensa*-*-* hppa*-*-* } } } } } */ /* { dg-options "-O2 -fdump-tree-reassoc1-details" } */ /* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */ Can you test it on the various arm configurations (just make check-gcc RUNTESTFLAGS=tree-ssa.exp=pr81588.c)? Wonder about the targets that aren't included in logical_op_short_circuit, what they actually do and why they are in the lists in the other testcases.