aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorWei Guozhi <carrot@google.com>2011-07-29 01:27:29 +0000
committerWei Guozhi <carrot@gcc.gnu.org>2011-07-29 01:27:29 +0000
commit154516d9d2011112deeb5becd98819d63397b2b1 (patch)
tree04bc619662014eaed8079e64815b5d6ac56e7ce9 /gcc/combine.c
parent4bd1d898d253cbe668033d3ae85e203b090ba05c (diff)
downloadgcc-154516d9d2011112deeb5becd98819d63397b2b1.zip
gcc-154516d9d2011112deeb5becd98819d63397b2b1.tar.gz
gcc-154516d9d2011112deeb5becd98819d63397b2b1.tar.bz2
re PR rtl-optimization/49799 (gcc arm generates illegal sbfx instruction)
PR rtl-optimization/49799 * combine.c (make_compound_operation): Check if the bit field is valid before change it to bit field extraction. * gcc.dg/pr49799.c: New test case. From-SVN: r176911
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 4dbf022..b5cf245 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7787,6 +7787,7 @@ make_compound_operation (rtx x, enum rtx_code in_code)
&& GET_CODE (lhs) == ASHIFT
&& CONST_INT_P (XEXP (lhs, 1))
&& INTVAL (rhs) >= INTVAL (XEXP (lhs, 1))
+ && INTVAL (XEXP (lhs, 1)) >= 0
&& INTVAL (rhs) < mode_width)
{
new_rtx = make_compound_operation (XEXP (lhs, 0), next_code);