aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 912b0eab1f0..16048bf3557 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10485,6 +10485,11 @@ simplify_shift_const_1 (enum rtx_code code, machine_mode result_mode,
>> orig_count, result_mode,
&complement_p))
break;
+ /* For ((int) (cstLL >> count)) >> cst2 just give up. Queuing
+ up outer sign extension (often left and right shift) is
+ hardly more efficient than the original. See PR70429. */
+ if (code == ASHIFTRT && mode != result_mode)
+ break;
rtx new_rtx = simplify_const_binary_operation (code, mode,
XEXP (varop, 0),