提交 ac383dde 编写于 作者: R Richard Henderson

tcg: Do not recreate INDEX_op_neg_vec unless supported

Use tcg_can_emit_vec_op instead of just TCG_TARGET_HAS_neg_vec,
so that we check the type and vece for the actual operation.
Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
上级 e1227bb6
...@@ -734,9 +734,13 @@ void tcg_optimize(TCGContext *s) ...@@ -734,9 +734,13 @@ void tcg_optimize(TCGContext *s)
} else if (opc == INDEX_op_sub_i64) { } else if (opc == INDEX_op_sub_i64) {
neg_op = INDEX_op_neg_i64; neg_op = INDEX_op_neg_i64;
have_neg = TCG_TARGET_HAS_neg_i64; have_neg = TCG_TARGET_HAS_neg_i64;
} else { } else if (TCG_TARGET_HAS_neg_vec) {
TCGType type = TCGOP_VECL(op) + TCG_TYPE_V64;
unsigned vece = TCGOP_VECE(op);
neg_op = INDEX_op_neg_vec; neg_op = INDEX_op_neg_vec;
have_neg = TCG_TARGET_HAS_neg_vec; have_neg = tcg_can_emit_vec_op(neg_op, type, vece) > 0;
} else {
break;
} }
if (!have_neg) { if (!have_neg) {
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册