summaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-09 12:40:40 +0000
committerzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-09 12:40:40 +0000
commit86018455de0f34b448969462e504137c4e0990cb (patch)
tree9508fa69374c5c758353add1e8af1f7ebf515d36 /gcc/simplify-rtx.c
parenteea1518285268f20f612b776921e806ea759511f (diff)
downloadgcc-86018455de0f34b448969462e504137c4e0990cb.tar.gz
2012-06-09 Kenneth Zadeck <zadeck@naturalbridge.com>
* simplify-rtx.c (simplify_const_binary_operation): Fixed shift count trucation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188359 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index e43ee5bdf38..e1bd3cf2e3b 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -3653,7 +3653,10 @@ simplify_const_binary_operation (enum rtx_code code, enum machine_mode mode,
unsigned HOST_WIDE_INT cnt;
if (SHIFT_COUNT_TRUNCATED)
- o1 = double_int_zext (o1, GET_MODE_PRECISION (mode));
+ {
+ o1.high = 0;
+ o1.low &= GET_MODE_PRECISION (mode) - 1;
+ }
if (!double_int_fits_in_uhwi_p (o1)
|| double_int_to_uhwi (o1) >= GET_MODE_PRECISION (mode))