diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-29 19:31:27 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-29 19:31:27 +0000 |
commit | a2d7077285dc5628253bb2095e2056581304cd3c (patch) | |
tree | 86a8af3425174dbca3e3da668860226d4c4c670a /gcc/ifcvt.c | |
parent | 952f3892254990bdb086e3dc25e9f63ee28848a6 (diff) | |
download | gcc-a2d7077285dc5628253bb2095e2056581304cd3c.tar.gz |
* ifcvt.c (noce_emit_store_flag): If using condition from original
jump, reverse it if if_info->cond was reversed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140764 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 341174ab02f..a0b49a3979c 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -666,7 +666,15 @@ noce_emit_store_flag (struct noce_if_info *if_info, rtx x, int reversep, build the store_flag insn directly. */ if (cond_complex) - cond = XEXP (SET_SRC (pc_set (if_info->jump)), 0); + { + rtx set = pc_set (if_info->jump); + cond = XEXP (SET_SRC (set), 0); + if (GET_CODE (XEXP (SET_SRC (set), 2)) == LABEL_REF + && XEXP (XEXP (SET_SRC (set), 2), 0) == JUMP_LABEL (if_info->jump)) + reversep = !reversep; + if (if_info->then_else_reversed) + reversep = !reversep; + } if (reversep) code = reversed_comparison_code (cond, if_info->jump); |