aboutsummaryrefslogtreecommitdiff
path: root/gcc/match.pd
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-01-12 08:33:48 +0100
committerRichard Biener <rguenther@suse.de>2024-01-12 09:51:16 +0100
commit160799b366c33246ca16b84020ec49c3feabb0a3 (patch)
treee706d75762405d097b91ccaa7b4f1592c2148022 /gcc/match.pd
parent72b3495dfdddc27753f66eb77fff647d619f75f0 (diff)
downloadgcc-160799b366c33246ca16b84020ec49c3feabb0a3.zip
gcc-160799b366c33246ca16b84020ec49c3feabb0a3.tar.gz
gcc-160799b366c33246ca16b84020ec49c3feabb0a3.tar.bz2
middle-end/113344 - is_truth_type_for vs GENERIC tcc_comparison
On GENERIC tcc_comparison can have int type so restrict the PR113126 fix to vector types. PR middle-end/113344 * match.pd ((double)float CMP (double)float -> float CMP float): Perform result type check only for vectors. * fold-const.cc (fold_binary_loc): Likewise.
Diffstat (limited to 'gcc/match.pd')
-rw-r--r--gcc/match.pd2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/match.pd b/gcc/match.pd
index 0bcf315..e42ecaf 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -6799,7 +6799,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
? TREE_TYPE (@00) : type1);
}
(if (element_precision (TREE_TYPE (@0)) > element_precision (newtype)
- && is_truth_type_for (newtype, type))
+ && (!VECTOR_TYPE_P (type) || is_truth_type_for (newtype, type)))
(cmp (convert:newtype @00) (convert:newtype @10))))))))