[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/15] tcg/riscv: Do not accept zero operands for logicals, multi
From: |
Richard Henderson |
Subject: |
[PATCH 12/15] tcg/riscv: Do not accept zero operands for logicals, multiply or divide |
Date: |
Tue, 12 Mar 2024 04:38:36 -1000 |
Trust that the optimizer has folded all of these away.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/riscv/tcg-target-con-set.h | 1 -
tcg/riscv/tcg-target.c.inc | 4 +---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/tcg/riscv/tcg-target-con-set.h b/tcg/riscv/tcg-target-con-set.h
index 13a383aeb1..527d2fd4d9 100644
--- a/tcg/riscv/tcg-target-con-set.h
+++ b/tcg/riscv/tcg-target-con-set.h
@@ -16,7 +16,6 @@ C_O1_I1(r, r)
C_O1_I2(r, r, r)
C_O1_I2(r, r, ri)
C_O1_I2(r, r, rI)
-C_O1_I2(r, rZ, rZ)
C_N1_I2(r, r, rM)
C_O1_I4(r, r, rI, rM, rM)
C_O2_I4(r, r, rZ, rZ, rM, rM)
diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc
index 6b28f2f85d..0dc1b2d8f7 100644
--- a/tcg/riscv/tcg-target.c.inc
+++ b/tcg/riscv/tcg-target.c.inc
@@ -1929,8 +1929,6 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode
op)
case INDEX_op_sub_i32:
case INDEX_op_sub_i64:
- return C_O1_I2(r, r, r);
-
case INDEX_op_andc_i32:
case INDEX_op_andc_i64:
case INDEX_op_orc_i32:
@@ -1951,7 +1949,7 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode
op)
case INDEX_op_divu_i64:
case INDEX_op_rem_i64:
case INDEX_op_remu_i64:
- return C_O1_I2(r, rZ, rZ);
+ return C_O1_I2(r, r, r);
case INDEX_op_shl_i32:
case INDEX_op_shr_i32:
--
2.34.1
- [PATCH 08/15] tcg/loongarch64: Do not accept immediate operand for andc, orc, (continued)
- [PATCH 08/15] tcg/loongarch64: Do not accept immediate operand for andc, orc, Richard Henderson, 2024/03/12
- [PATCH 11/15] tcg/riscv: Do not accept immediate operands for sub, Richard Henderson, 2024/03/12
- [PATCH 02/15] tcg/optimize: Fold orc with immediate to or, Richard Henderson, 2024/03/12
- [PATCH 03/15] tcg/optimize: Fold eqv with immediate to xor, Richard Henderson, 2024/03/12
- [PATCH 05/15] tcg/aarch64: Do not accept immediate operand for andc, orc, eqv, Richard Henderson, 2024/03/12
- [PATCH 04/15] tcg/i386: Do not accept immediate operand for andc, Richard Henderson, 2024/03/12
- [PATCH 10/15] tcg/riscv: Do not accept immediate operand for andc, orc, eqv, Richard Henderson, 2024/03/12
- [PATCH 15/15] tcg/optimize: Lower unsupported deposit during optimize, Richard Henderson, 2024/03/12
- [PATCH 07/15] tcg/ppc: Do not accept immediate operand for andc, orc, eqv, Richard Henderson, 2024/03/12
- [PATCH 13/15] tcg/optimize: Fold and to extu during optimize, Richard Henderson, 2024/03/12
- [PATCH 12/15] tcg/riscv: Do not accept zero operands for logicals, multiply or divide,
Richard Henderson <=
- [PATCH 09/15] tcg/s390x: Do not accept immediate operand for andc, orc, Richard Henderson, 2024/03/12
- [PATCH 14/15] tcg: Use arg_is_const_val in fold_sub_to_neg, Richard Henderson, 2024/03/12