aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-08-28 11:47:32 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2007-08-28 11:47:32 +0200
commit71cca28908fd6715721704da2fe4f8929879cd86 (patch)
tree422461cc69ae75f8496e5b267fb5f1e251b48a6b /gcc/simplify-rtx.c
parenta7d0852d3f7d3e0a596f53efb2d75cf522ffb43f (diff)
downloadgcc-71cca28908fd6715721704da2fe4f8929879cd86.zip
gcc-71cca28908fd6715721704da2fe4f8929879cd86.tar.gz
gcc-71cca28908fd6715721704da2fe4f8929879cd86.tar.bz2
re PR rtl-optimization/33148 (ICE in trunc_int_for_mode, at explow.c:56 during combine)
PR rtl-optimization/33148 * simplify-rtx.c (simplify_unary_operation_1): Only optimize (neg (lt X 0)) if X has scalar int mode. * gcc.c-torture/compile/20070827-1.c: New test. From-SVN: r127855
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 40337a5..97c4d93 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -583,7 +583,8 @@ simplify_unary_operation_1 (enum rtx_code code, enum machine_mode mode, rtx op)
/* (neg (lt x 0)) is (ashiftrt X C) if STORE_FLAG_VALUE is 1. */
/* (neg (lt x 0)) is (lshiftrt X C) if STORE_FLAG_VALUE is -1. */
if (GET_CODE (op) == LT
- && XEXP (op, 1) == const0_rtx)
+ && XEXP (op, 1) == const0_rtx
+ && SCALAR_INT_MODE_P (GET_MODE (XEXP (op, 0))))
{
enum machine_mode inner = GET_MODE (XEXP (op, 0));
int isize = GET_MODE_BITSIZE (inner);