aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2016-01-28 15:41:46 +0000
committerWilco Dijkstra <wilco@gcc.gnu.org>2016-01-28 15:41:46 +0000
commit6dfeb7ceac74b61cb71b0c39dc3b02897aeb7087 (patch)
treebc7a7c873de37353cf30b98682c4cbb8d7781166 /gcc
parente448880c20c01a2925c7707838841c8c117c9e8d (diff)
downloadgcc-6dfeb7ceac74b61cb71b0c39dc3b02897aeb7087.zip
gcc-6dfeb7ceac74b61cb71b0c39dc3b02897aeb7087.tar.gz
gcc-6dfeb7ceac74b61cb71b0c39dc3b02897aeb7087.tar.bz2
A recent change added UNSPEC to the CCMP patterns to stop combine optimizing the immediate in a rare case.
A recent change added UNSPEC to the CCMP patterns to stop combine optimizing the immediate in a rare case. This requires a fix to the CCMP cost calculation as the CCMP instruction with unspec is no longer recognized. Fix the ccmp_1.c test by adding -ffinite-math-only so FCCMPE is emitted on relational compares. 2016-01-28 Wilco Dijkstra <wdijkstr@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_if_then_else_costs): Remove CONST_INT_P check in CCMP cost calculation. gcc/testsuite/ * gcc.target/aarch64/ccmp_1.c: Fix test issue. From-SVN: r232930
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/aarch64/aarch64.c2
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ccmp_1.c2
4 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1967e92..551dedf 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2016-01-28 Wilco Dijkstra <wdijkstr@arm.com>
+ * config/aarch64/aarch64.c (aarch64_if_then_else_costs):
+ Remove CONST_INT_P check in CCMP cost calculation.
+
+2016-01-28 Wilco Dijkstra <wdijkstr@arm.com>
+
* config/aarch64/aarch64.c (generic_vector_cost):
Set vec_permute_cost.
(cortexa57_vector_cost): Likewise.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 5b3771e..bba7a9b 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6010,7 +6010,7 @@ aarch64_if_then_else_costs (rtx op0, rtx op1, rtx op2, int *cost, bool speed)
else if (GET_MODE_CLASS (GET_MODE (inner)) == MODE_CC)
{
/* CCMP. */
- if ((GET_CODE (op1) == COMPARE) && CONST_INT_P (op2))
+ if (GET_CODE (op1) == COMPARE)
{
/* Increase cost of CCMP reg, 0, imm, CC to prefer CMP reg, 0. */
if (XEXP (op1, 1) == const0_rtx)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index afc6d6f..6e5e218 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-28 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * gcc.target/aarch64/ccmp_1.c: Fix test issue.
+
2016-01-28 David Edelsohn <dje.gcc@gmail.com>
* gcc.dg/pr65980.c: Skip on AIX.
diff --git a/gcc/testsuite/gcc.target/aarch64/ccmp_1.c b/gcc/testsuite/gcc.target/aarch64/ccmp_1.c
index 7c39b61..fd38b2c 100644
--- a/gcc/testsuite/gcc.target/aarch64/ccmp_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/ccmp_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -ffinite-math-only" } */
int
f1 (int a)