diff options
Diffstat (limited to '0071-PHIOPT-Disable-the-match-A-CST1-0-when-the-CST1-is-n.patch')
-rw-r--r-- | 0071-PHIOPT-Disable-the-match-A-CST1-0-when-the-CST1-is-n.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/0071-PHIOPT-Disable-the-match-A-CST1-0-when-the-CST1-is-n.patch b/0071-PHIOPT-Disable-the-match-A-CST1-0-when-the-CST1-is-n.patch new file mode 100644 index 0000000..18c2e3b --- /dev/null +++ b/0071-PHIOPT-Disable-the-match-A-CST1-0-when-the-CST1-is-n.patch @@ -0,0 +1,31 @@ +From b57c55b282e7a9a7b2cc0d3843e58fd7998685e6 Mon Sep 17 00:00:00 2001 +From: zhongyunde <zhongyunde@huawei.com> +Date: Fri, 4 Nov 2022 23:19:44 +0800 +Subject: [PATCH 23/35] [PHIOPT] Disable the match A?CST1:0 when the CST1 is + negitive value + +Fix the regression of gcc.target/aarch64/sve/vcond_3.c + +gcc: + * match.pd (A?CST1:CST2): Disable the simplifcations A? (-CST1):0 +--- + gcc/match.pd | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/match.pd b/gcc/match.pd +index 79a0228d2..fc1a34dd3 100644 +--- a/gcc/match.pd ++++ b/gcc/match.pd +@@ -3347,7 +3347,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) + (if (integer_onep (@1)) + (convert (convert:boolean_type_node @0))) + /* a ? powerof2cst : 0 -> a << (log2(powerof2cst)) */ +- (if (INTEGRAL_TYPE_P (type) && integer_pow2p (@1)) ++ (if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (TREE_TYPE (@1)) ++ && integer_pow2p (@1)) + (with { + tree shift = build_int_cst (integer_type_node, tree_log2 (@1)); + } +-- +2.27.0.windows.1 + |