diff options
author | Richard Biener <rguenther@suse.de> | 2020-11-03 14:53:24 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-11-03 16:23:06 +0100 |
commit | d0d8a1658054258baae87b445678c1c0c08d9455 (patch) | |
tree | d81d9b8f325f85d36b2f025daadd58efd4b4e369 | |
parent | ea7df355ca4a4571d07d1fc9528cccd1393c2420 (diff) | |
download | gcc-d0d8a1658054258baae87b445678c1c0c08d9455.zip gcc-d0d8a1658054258baae87b445678c1c0c08d9455.tar.gz gcc-d0d8a1658054258baae87b445678c1c0c08d9455.tar.bz2 |
middle-end/97579 - fix VEC_COND_EXPR ISEL optab query
This fixes a mistake in the optab query done by ISEL. It
doesn't fix the PR but shifts the ICE elsewhere.
2020-11-03 Richard Biener <rguenther@suse.de>
PR middle-end/97579
* gimple-isel.cc (gimple_expand_vec_cond_expr): Use
the correct types for the vcond_mask/vec_cmp optab queries.
-rw-r--r-- | gcc/gimple-isel.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gimple-isel.cc b/gcc/gimple-isel.cc index b64e31f..9186ff5 100644 --- a/gcc/gimple-isel.cc +++ b/gcc/gimple-isel.cc @@ -162,11 +162,12 @@ gimple_expand_vec_cond_expr (gimple_stmt_iterator *gsi, op0a = gimple_assign_rhs1 (def_stmt); op0b = gimple_assign_rhs2 (def_stmt); + tree op0_type = TREE_TYPE (op0); tree op0a_type = TREE_TYPE (op0a); if (used_vec_cond_exprs >= 2 - && (get_vcond_mask_icode (mode, TYPE_MODE (op0a_type)) + && (get_vcond_mask_icode (mode, TYPE_MODE (op0_type)) != CODE_FOR_nothing) - && expand_vec_cmp_expr_p (op0a_type, TREE_TYPE (lhs), tcode)) + && expand_vec_cmp_expr_p (op0a_type, op0_type, tcode)) { /* Keep the SSA name and use vcond_mask. */ tcode = TREE_CODE (op0); |