diff options
author | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-21 11:50:42 +0000 |
---|---|---|
committer | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-21 11:50:42 +0000 |
commit | e3a0dde2af4f9437f45dd6e296e8969c2a478542 (patch) | |
tree | 9ac919557fdac1b5fb2da7af700ccda6d7a9e938 /gcc/testsuite/gcc.target/i386/branch-cost1.c | |
parent | f5c29b0ec0b42e0cb651b123a9541f7f566b845e (diff) | |
download | gcc-e3a0dde2af4f9437f45dd6e296e8969c2a478542.tar.gz |
* gcc.target/i386/branch-cost1.c: New test.
* gcc.target/i386/branch-cost2.c: New test.
* gcc.target/i386/branch-cost3.c: New test.
* gcc.target/i386/branch-cost4.c: New test.
* fold-const.c (simple_operand_p_2): Handle integral
casts from boolean-operands.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/branch-cost1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/branch-cost1.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/branch-cost1.c b/gcc/testsuite/gcc.target/i386/branch-cost1.c new file mode 100644 index 00000000000..ed873fa7136 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/branch-cost1.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-gimple -mbranch-cost=0" } */ + +extern int doo (void); + +int +foo (int a, int b) +{ + if (a && b) + return doo (); + return 0; +} + +/* { dg-final { scan-tree-dump-times "if " 2 "gimple" } } */ +/* { dg-final { scan-tree-dump-not " & " "gimple" } } */ +/* { dg-final { cleanup-tree-dump "gimple" } } */ |