summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/headmerge-1.c
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-23 10:04:33 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-23 10:04:33 +0000
commit4899856f3f2fdefaffa0d5355d8dae034da9ec26 (patch)
tree5a8f0323c12091c2776f698fa75f292d39574f04 /gcc/testsuite/gcc.target/i386/headmerge-1.c
parent0c320ed3adce118bba55e81b27c9dbcc31efa243 (diff)
downloadgcc-4899856f3f2fdefaffa0d5355d8dae034da9ec26.tar.gz
PR rtl-optimization/44374
* basic-block.h (enum bb_flags): Add BB_MODIFIED. * df-core.c (df_set_bb_dirty): Set it. * ifcvt.c (find_memory): Remove function. (dead_or_predicable): Use can_move_insns_across. * df.h (can_move_insns_across): Declare function. * cfgcleanup.c (block_was_dirty): New static variable. (try_crossjump_bb, try_forward_edges): Test BB_MODIFIED flag rather than df_get_bb_dirty. (try_head_merge_bb): New static function. (try_optimize_cfg): Call it. Call df_analyze if block_was_dirty is set. * df-problems.c: Include "target.h" (df_simulate_find_uses): New static function. (MEMREF_NORMAL, MEMREF_VOLATILE): New macros. (find_memory, find_memory_store): New static functions. (can_move_insns_across): New function. * Makefile.in (df-problems.o): Update dependencies. testsuite/ PR rtl-optimization/44374 * gcc.target/arm/headmerge-1.c: New test. * gcc.target/arm/headmerge-2.c: New test. * gcc.target/i386/headmerge-1.c: New test. * gcc.target/i386/headmerge-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164552 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/headmerge-1.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/headmerge-1.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/headmerge-1.c b/gcc/testsuite/gcc.target/i386/headmerge-1.c
new file mode 100644
index 00000000000..941028c31db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/headmerge-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "120" 1 } } */
+
+extern void foo1 (int);
+extern void foo2 (int);
+
+void t (int x, int y)
+{
+ if (y < 5)
+ foo1 (120);
+ else
+ foo2 (120);
+}