diff options
author | Richard Biener <rguenther@suse.de> | 2020-11-26 16:11:43 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-11-26 16:17:36 +0100 |
commit | 5c197b83e12b634b65a449d8a7375a18f350708e (patch) | |
tree | 5cf0c54085514470df3249b737d565490fd3d733 /gcc | |
parent | d24a4c8c4256cc287ebf4ad80368b4f1edb1733e (diff) | |
download | gcc-5c197b83e12b634b65a449d8a7375a18f350708e.zip gcc-5c197b83e12b634b65a449d8a7375a18f350708e.tar.gz gcc-5c197b83e12b634b65a449d8a7375a18f350708e.tar.bz2 |
tree-optimization/98015 - fix VEC_COND_EXPR lowering condition
This fixes the condition to match the comment and only lower
VECTOR_BOOLEAN_TYPE_P VEC_COND_EXPRs.
2020-11-26 Richard Biener <rguenther@suse.de>
* gimple-isel.cc (gimple_expand_vec_cond_expr): Only
lower VECTOR_BOOLEAN_TYPE_P VEC_COND_EXPRs.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimple-isel.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/gimple-isel.cc b/gcc/gimple-isel.cc index 83281c0..048b407 100644 --- a/gcc/gimple-isel.cc +++ b/gcc/gimple-isel.cc @@ -139,10 +139,10 @@ gimple_expand_vec_cond_expr (gimple_stmt_iterator *gsi, Those can end up generated by folding and at least for integer mode masks we cannot expect vcond expanders to exist. We lower a ? b : c to (b & a) | (c & ~a). */ - if (!VECTOR_MODE_P (mode)) + if (VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (lhs)) + && !VECTOR_MODE_P (mode)) { - gcc_assert (VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (lhs)) - && types_compatible_p (TREE_TYPE (op0), TREE_TYPE (op1))); + gcc_assert (types_compatible_p (TREE_TYPE (op0), TREE_TYPE (op1))); gimple_seq stmts = NULL; tree type = TREE_TYPE (lhs); location_t loc = gimple_location (stmt); |