summaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-05 14:58:07 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-05 14:58:07 +0000
commit64685a89ef451c911b6c451057863487061ec0bc (patch)
tree7defa2a131c1aee78633e3ed7d7b325c46ebf1dd /gcc/rtlanal.c
parent2080d5efc4fa305a790e89276c848b2da0e0aae3 (diff)
downloadgcc-64685a89ef451c911b6c451057863487061ec0bc.tar.gz
PR rtl-optimization/26087
* rtlanal.c (canonicalize_condition): Do not cross basic block boundaries. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110614 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 91fb4898b73..1390ad98529 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -4508,6 +4508,7 @@ canonicalize_condition (rtx insn, rtx cond, int reverse, rtx *earliest,
rtx op0, op1;
int reverse_code = 0;
enum machine_mode mode;
+ basic_block bb = BLOCK_FOR_INSN (insn);
code = GET_CODE (cond);
mode = GET_MODE (cond);
@@ -4569,7 +4570,11 @@ canonicalize_condition (rtx insn, rtx cond, int reverse, rtx *earliest,
if ((prev = prev_nonnote_insn (prev)) == 0
|| !NONJUMP_INSN_P (prev)
- || FIND_REG_INC_NOTE (prev, NULL_RTX))
+ || FIND_REG_INC_NOTE (prev, NULL_RTX)
+ /* In cfglayout mode, there do not have to be labels at the
+ beginning of a block, or jumps at the end, so the previous
+ conditions would not stop us when we reach bb boundary. */
+ || BLOCK_FOR_INSN (prev) != bb)
break;
set = set_of (op0, prev);