From bf42f4fd591f016a02916a7ff624e5d57e8731fa Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Tue, 4 Nov 2014 15:25:45 +0000 Subject: [PATCH] Fix up mode confusion in combine_simplify_rtx. The surrounding code was already fixed back when BImode was added. * combine.c (combine_simplify_rtx): In STORE_FLAG_VALUE == -1 case, also verify that mode is equal to the mode of op0. From-SVN: r217089 --- gcc/ChangeLog | 3 +++ gcc/combine.c | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e5f0c4621aa4..c6d729f0a9d5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2014-11-04 Bernd Schmidt + * combine.c (combine_simplify_rtx): In STORE_FLAG_VALUE == -1 case, + also verify that mode is equal to the mode of op0. + * bb-reorder.c (get_uncond_jump_length): Avoid using delete_insn, emit into a sequence instead. diff --git a/gcc/combine.c b/gcc/combine.c index 40f2875d5182..e240cfb9449c 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5811,10 +5811,11 @@ combine_simplify_rtx (rtx x, machine_mode op0_mode, int in_dest, ; else if (STORE_FLAG_VALUE == -1 - && new_code == NE && GET_MODE_CLASS (mode) == MODE_INT - && op1 == const0_rtx - && (num_sign_bit_copies (op0, mode) - == GET_MODE_PRECISION (mode))) + && new_code == NE && GET_MODE_CLASS (mode) == MODE_INT + && op1 == const0_rtx + && mode == GET_MODE (op0) + && (num_sign_bit_copies (op0, mode) + == GET_MODE_PRECISION (mode))) return gen_lowpart (mode, expand_compound_operation (op0));