[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 33/43] tcg/aarch64: Use tcg_constant_vec with tcg vec expanders
From: |
Richard Henderson |
Subject: |
[PATCH 33/43] tcg/aarch64: Use tcg_constant_vec with tcg vec expanders |
Date: |
Tue, 8 Sep 2020 17:16:37 -0700 |
Improve rotrv_vec to reduce "t1 = -v2, t2 = t1 + c" to
"t1 = -v, t2 = c - v2". This avoids a serial dependency
between t1 and t2.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/aarch64/tcg-target.c.inc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc
index fdc118391c..d9d397075a 100644
--- a/tcg/aarch64/tcg-target.c.inc
+++ b/tcg/aarch64/tcg-target.c.inc
@@ -2511,7 +2511,7 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type,
unsigned vece,
TCGArg a0, ...)
{
va_list va;
- TCGv_vec v0, v1, v2, t1, t2;
+ TCGv_vec v0, v1, v2, t1, t2, c1;
TCGArg a2;
va_start(va, a0);
@@ -2543,8 +2543,8 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type,
unsigned vece,
case INDEX_op_rotlv_vec:
t1 = tcg_temp_new_vec(type);
- tcg_gen_dupi_vec(vece, t1, 8 << vece);
- tcg_gen_sub_vec(vece, t1, v2, t1);
+ c1 = tcg_constant_vec(type, vece, 8 << vece);
+ tcg_gen_sub_vec(vece, t1, v2, c1);
/* Right shifts are negative left shifts for AArch64. */
vec_gen_3(INDEX_op_shlv_vec, type, vece, tcgv_vec_arg(t1),
tcgv_vec_arg(v1), tcgv_vec_arg(t1));
@@ -2557,9 +2557,9 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type,
unsigned vece,
case INDEX_op_rotrv_vec:
t1 = tcg_temp_new_vec(type);
t2 = tcg_temp_new_vec(type);
+ c1 = tcg_constant_vec(type, vece, 8 << vece);
tcg_gen_neg_vec(vece, t1, v2);
- tcg_gen_dupi_vec(vece, t2, 8 << vece);
- tcg_gen_add_vec(vece, t2, t1, t2);
+ tcg_gen_sub_vec(vece, t2, c1, v2);
/* Right shifts are negative left shifts for AArch64. */
vec_gen_3(INDEX_op_shlv_vec, type, vece, tcgv_vec_arg(t1),
tcgv_vec_arg(v1), tcgv_vec_arg(t1));
--
2.25.1
- [PATCH 24/43] tcg: Use tcg_constant_{i32,i64} with tcg int expanders, (continued)
- [PATCH 24/43] tcg: Use tcg_constant_{i32,i64} with tcg int expanders, Richard Henderson, 2020/09/08
- [PATCH 25/43] tcg: Use tcg_constant_{i32,i64} with tcg plugins, Richard Henderson, 2020/09/08
- [PATCH 26/43] tcg: Use tcg_constant_{i32, i64, vec} with gvec expanders, Richard Henderson, 2020/09/08
- [PATCH 27/43] tcg/tci: Add special tci_movi_{i32,i64} opcodes, Richard Henderson, 2020/09/08
- [PATCH 28/43] tcg: Remove movi and dupi opcodes, Richard Henderson, 2020/09/08
- [PATCH 29/43] tcg: Add tcg_reg_alloc_dup2, Richard Henderson, 2020/09/08
- [PATCH 31/43] tcg: Remove tcg_gen_dup{8,16,32,64}i_vec, Richard Henderson, 2020/09/08
- [PATCH 34/43] tcg: Add tcg-constr.c.inc, Richard Henderson, 2020/09/08
- [PATCH 30/43] tcg/i386: Use tcg_constant_vec with tcg vec expanders, Richard Henderson, 2020/09/08
- [PATCH 32/43] tcg/ppc: Use tcg_constant_vec with tcg vec expanders, Richard Henderson, 2020/09/08
- [PATCH 33/43] tcg/aarch64: Use tcg_constant_vec with tcg vec expanders,
Richard Henderson <=
- [PATCH 35/43] tcg/i386: Convert to tcg-constr.c.inc, Richard Henderson, 2020/09/08
- [PATCH 36/43] tcg/aarch64: Convert to tcg-constr.c.inc, Richard Henderson, 2020/09/08
- [PATCH 37/43] tcg/arm: Convert to tcg-constr.c.inc, Richard Henderson, 2020/09/08
- [PATCH 38/43] tcg/mips: Convert to tcg-constr.c.inc, Richard Henderson, 2020/09/08
- [PATCH 39/43] tcg/ppc: Convert to tcg-constr.c.inc, Richard Henderson, 2020/09/08
- [PATCH 40/43] tcg/riscv: Convert to tcg-constr.c.inc, Richard Henderson, 2020/09/08
- [PATCH 41/43] tcg/s390: Convert to tcg-constr.c.inc, Richard Henderson, 2020/09/08
- [PATCH 42/43] tcg/sparc: Convert to tcg-constr.c.inc, Richard Henderson, 2020/09/08
- [PATCH 43/43] tcg/tci: Convert to tcg-constr.c.inc, Richard Henderson, 2020/09/08