aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/riscv/riscv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
index 6aef3d3..5387bfc 100644
--- a/gcc/config/riscv/riscv.c
+++ b/gcc/config/riscv/riscv.c
@@ -2014,8 +2014,8 @@ riscv_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno ATTRIBUTE_UN
(TARGET_64BIT && (mode == DImode)))
&& (GET_CODE (XEXP (x, 0)) == ASHIFT)
&& REG_P (XEXP (XEXP (x, 0), 0))
- && CONST_INT_P (XEXP (XEXP (x, 0), 0))
- && IN_RANGE (INTVAL (XEXP (XEXP (x, 0), 0)), 1, 3))
+ && CONST_INT_P (XEXP (XEXP (x, 0), 1))
+ && IN_RANGE (INTVAL (XEXP (XEXP (x, 0), 1)), 1, 3))
{
*total = COSTS_N_INSNS (1);
return true;
@@ -2044,7 +2044,6 @@ riscv_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno ATTRIBUTE_UN
if (!CONST_INT_P (and_rhs))
break;
- rtx ashift_lhs = XEXP (and_lhs, 0);
rtx ashift_rhs = XEXP (and_lhs, 1);
if (!CONST_INT_P (ashift_rhs)