From 4bc89ef0ff8d1b727dc79e044980fbe9577c1e53 Mon Sep 17 00:00:00 2001 From: ktkachov Date: Mon, 14 Dec 2015 11:33:00 +0000 Subject: [PATCH] [combine] Don't create LSHIFTRT of zero bits in change_zero_ext * combine.c (change_zero_ext): Do not create a shift of zero length. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231613 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/combine.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6d3210f..c79b65c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-12-14 Kyrylo Tkachov + + * combine.c (change_zero_ext): Do not create a shift of zero length. + 2015-12-14 Claudiu Zissulescu * config/arc/arc.c (TARGET_NO_SPECULATION_IN_DELAY_SLOTS_P): diff --git a/gcc/combine.c b/gcc/combine.c index 71b1656..317a4b0 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -11045,7 +11045,8 @@ change_zero_ext (rtx *src) if (BITS_BIG_ENDIAN) start = GET_MODE_PRECISION (mode) - size - start; - x = gen_rtx_LSHIFTRT (mode, XEXP (x, 0), GEN_INT (start)); + x = simplify_gen_binary (LSHIFTRT, mode, + XEXP (x, 0), GEN_INT (start)); } else if (GET_CODE (x) == ZERO_EXTEND && GET_CODE (XEXP (x, 0)) == SUBREG -- 2.7.4