1 /* PR tree-optimization/46309 */
2 /* { dg-do compile { target { { ! logical_op_short_circuit } || { mips*-*-* avr*-*-* } } } } */
3 /* { dg-options "-O2 -fdump-tree-reassoc-details" } */
4 /* The transformation depends on BRANCH_COST being greater than 1
5 (see the notes in the PR), so try to force that. */
6 /* { dg-additional-options "-mtune=octeon2" { target mips*-*-* } } */
7 /* { dg-additional-options "-mbranch-cost=2" { target avr*-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
16 return v1
|| v2
|| v3
|| v4
;
26 return v1
|| v2
|| v3
|| v4
;
49 int v2
= (a
>= 64 && a
<= 95);
57 int v2
= (a
>= 64 && a
<= 95);
58 int v3
= (a
>= 128 && a
<= 159);
59 int v4
= (a
>= 192 && a
<= 223);
60 return v1
|| v2
|| v3
|| v4
;
63 /* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.1, 1. and -.2, 2. and -.3, 3. and -.4, 4.\[\n\r\]* into" 2 "reassoc1" } } */
64 /* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.1, 1. and -.3, 3.\[\n\r\]* into" 1 "reassoc1" } } */
65 /* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.1, 1. and -.2, 2.\[\n\r\]* into" 1 "reassoc1" } } */
66 /* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.0, 31. and -.64, 95.\[\n\r\]* into" 2 "reassoc1" } } */
67 /* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.128, 159. and -.192, 223.\[\n\r\]* into" 1 "reassoc1" } } */
68 /* { dg-final { scan-tree-dump-times "Optimizing range tests \[^\r\n\]*_\[0-9\]* -.0, 0. and -.128, 128.\[\n\r\]* into" 1 "reassoc2" } } */