diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-18 08:17:06 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-18 08:17:06 +0000 |
commit | 30641a0808b44eda78d976e63a15cac86cfbc877 (patch) | |
tree | 454922e216b8e55458271a4dd8cad1c5803279a6 /gcc/ifcvt.c | |
parent | 27c4194f83ece4d472b442815879fa4cef0dadff (diff) | |
download | gcc-30641a0808b44eda78d976e63a15cac86cfbc877.tar.gz |
* cfgcleanup.c (cleanup_cfg): Detect cfglayout mode and set
the CLEANUP_CFGLAYOUT flag when in cfglayout mode.
* Makefile.c (GTFILES): Add cfglayout.h.
* gengtype.c (open_base_files): Likewise.
* cfglayout.c (cfg_layout_function_footer,
cfg_layout_function_header) Reindent to make gengtype happy.
* cfglayout.h (cfg_layout_function_footer,
cfg_layout_function_header): Add GTY(()) marker.
* ifcvt.c (noce_try_sign_mask): Make sure INSN_B is non-null.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120893 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 9e65a25bd7b..99228a8fa7e 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -1866,6 +1866,7 @@ noce_try_sign_mask (struct noce_if_info *if_info) rtx cond, t, m, c, seq; enum machine_mode mode; enum rtx_code code; + bool b_unconditional; if (no_new_pseudos) return FALSE; @@ -1899,9 +1900,12 @@ noce_try_sign_mask (struct noce_if_info *if_info) /* This is only profitable if T is cheap, or T is unconditionally executed/evaluated in the original insn sequence. The latter - happens if INSN_B was taken from TEST_BB. */ + happens if INSN_B was taken from TEST_BB, or if there was no + INSN_B which can happen for e.g. conditional stores to memory. */ + b_unconditional = (if_info->insn_b == NULL_RTX + || BLOCK_FOR_INSN (if_info->insn_b) == if_info->test_bb); if (rtx_cost (t, SET) >= COSTS_N_INSNS (2) - && (BLOCK_FOR_INSN (if_info->insn_b) != if_info->test_bb + && (!b_unconditional || t != if_info->b)) return FALSE; |