1 /* PR tree-optimization/102232 */
3 /* { dg-options "-O -fdump-tree-optimized" } */
4 /* { dg-require-effective-target int32plus } */
6 int __attribute__ ((noipa
)) foo (int a
, int b
)
8 return b
* (1 + a
/ b
) - a
;
14 // few randomly generated test cases
15 if (foo (71856034, 238) != 212)
19 if (foo (71856034, 10909) != 1549)
23 if (foo (20350, 1744) != 578)
27 if (foo (444813, 88563) != 86565)
31 if (foo (112237, 63004) != 13771)
35 if (foo (68268386, 787116) != 210706)
39 if (foo (-444813, 88563) != 90561)
43 if (foo (-68268386, 787116) != 1363526)
51 /* Verify that multiplication and division has been removed. */
52 /* { dg-final { scan-tree-dump-not " \\* " "optimized" } } */
53 /* { dg-final { scan-tree-dump-not " / " "optimized" } } */