PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / combine-clobber.c
blob09e800067b95c6f7e9b83041d8618ef9968d9cb5
1 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-O2 -fdump-rtl-combine-all" } */
4 /* This testcase checks if combine tries to combine sequences where the last
5 insn has a clobber of a reg, and a previous insn sets that reg.
7 In this case, we have three insns
9 (set flags (compare a b))
10 (set tmp (eq flags 0))
11 (parallel [(set dst (neg tmp))
12 (clobber flags)])
14 Previously, combine would not try the three-insn combination because of
15 the set and clobber of flags. Now it does. Test that. */
18 int f(int a, int b) { return -(a == b); }
20 /* This regexp works for reg parameters as well as mem parameters. */
21 /* { dg-final { scan-rtl-dump {neg:SI[^:]*eq:SI[^:]*:SI} "combine" } } */