aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2015-10-29 16:07:55 +0000
committerMartin Jambor <mjambor@suse.cz>2015-10-29 16:07:55 +0000
commit1064a1270eb021de09fa57baa766fb03212adc86 (patch)
treea7963ea26ac33420d520715612b56adb8393c409 /gcc/combine.c
parent599ff395e4417e4429ffb296c6d082b0be2ae7e1 (diff)
Merged trunk revision 229518 into the hsa branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/hsa@229536 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index fd3e19c1f40..f0265d72c24 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -112,6 +112,7 @@ along with GCC; see the file COPYING3. If not see
#include "valtrack.h"
#include "cgraph.h"
#include "rtl-iter.h"
+#include "print-rtl.h"
#ifndef LOAD_EXTEND_OP
#define LOAD_EXTEND_OP(M) UNKNOWN
@@ -11529,8 +11530,8 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
tmode != GET_MODE (op0); tmode = GET_MODE_WIDER_MODE (tmode))
if ((unsigned HOST_WIDE_INT) c0 == GET_MODE_MASK (tmode))
{
- op0 = gen_lowpart (tmode, inner_op0);
- op1 = gen_lowpart (tmode, inner_op1);
+ op0 = gen_lowpart_or_truncate (tmode, inner_op0);
+ op1 = gen_lowpart_or_truncate (tmode, inner_op1);
code = unsigned_condition (code);
changed = 1;
break;
@@ -12048,12 +12049,9 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
& GET_MODE_MASK (mode))
+ 1)) >= 0
&& const_op >> i == 0
- && (tmode = mode_for_size (i, MODE_INT, 1)) != BLKmode
- && (TRULY_NOOP_TRUNCATION_MODES_P (tmode, GET_MODE (op0))
- || (REG_P (XEXP (op0, 0))
- && reg_truncated_to_mode (tmode, XEXP (op0, 0)))))
+ && (tmode = mode_for_size (i, MODE_INT, 1)) != BLKmode)
{
- op0 = gen_lowpart (tmode, XEXP (op0, 0));
+ op0 = gen_lowpart_or_truncate (tmode, XEXP (op0, 0));
continue;
}