aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2015-11-09 15:53:26 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2015-11-09 15:53:26 +0000
commit2ca5b4303bd5ff0a01888dce671eb7f33eb99850 (patch)
tree7c9d269142da12b5932b050b41574d43ab13e224
parentc34311917ff87b75ea589afff6868437fc53c001 (diff)
downloadgcc-2ca5b4303bd5ff0a01888dce671eb7f33eb99850.zip
gcc-2ca5b4303bd5ff0a01888dce671eb7f33eb99850.tar.gz
gcc-2ca5b4303bd5ff0a01888dce671eb7f33eb99850.tar.bz2
[AArch64] PR target/68129: Define TARGET_SUPPORTS_WIDE_INT
PR target/68129 * config/aarch64/aarch64.h (TARGET_SUPPORTS_WIDE_INT): Define to 1. * config/aarch64/aarch64.c (aarch64_print_operand, CONST_DOUBLE): Delete VOIDmode case. Assert that mode is not VOIDmode. * config/aarch64/predicates.md (const0_operand): Remove const_double match. * gcc.dg/pr68129_1.c: New test. From-SVN: r230029
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/aarch64/aarch64.c9
-rw-r--r--gcc/config/aarch64/aarch64.h2
-rw-r--r--gcc/config/aarch64/predicates.md2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr68129_1.c10
6 files changed, 31 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bc9dbf1..c07c5d6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2015-11-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/68129
+ * config/aarch64/aarch64.h (TARGET_SUPPORTS_WIDE_INT): Define to 1.
+ * config/aarch64/aarch64.c (aarch64_print_operand, CONST_DOUBLE):
+ Delete VOIDmode case. Assert that mode is not VOIDmode.
+ * config/aarch64/predicates.md (const0_operand): Remove const_double
+ match.
+
2015-11-09 Martin Liska <mliska@suse.cz>
* ipa-inline-analysis.c (estimate_function_body_sizes): Call
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index d92ca07..83b7044 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -4391,11 +4391,10 @@ aarch64_print_operand (FILE *f, rtx x, int code)
break;
case CONST_DOUBLE:
- /* CONST_DOUBLE can represent a double-width integer.
- In this case, the mode of x is VOIDmode. */
- if (GET_MODE (x) == VOIDmode)
- ; /* Do Nothing. */
- else if (aarch64_float_const_zero_rtx_p (x))
+ /* Since we define TARGET_SUPPORTS_WIDE_INT we shouldn't ever
+ be getting CONST_DOUBLEs holding integers. */
+ gcc_assert (GET_MODE (x) != VOIDmode);
+ if (aarch64_float_const_zero_rtx_p (x))
{
fputc ('0', f);
break;
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index 5429b57..8834c9b 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -858,6 +858,8 @@ extern enum aarch64_code_model aarch64_cmodel;
(aarch64_cmodel == AARCH64_CMODEL_TINY \
|| aarch64_cmodel == AARCH64_CMODEL_TINY_PIC)
+#define TARGET_SUPPORTS_WIDE_INT 1
+
/* Modes valid for AdvSIMD D registers, i.e. that fit in half a Q register. */
#define AARCH64_VALID_SIMD_DREG_MODE(MODE) \
((MODE) == V2SImode || (MODE) == V4HImode || (MODE) == V8QImode \
diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md
index 046f852..e7f76e0 100644
--- a/gcc/config/aarch64/predicates.md
+++ b/gcc/config/aarch64/predicates.md
@@ -32,7 +32,7 @@
;; Return true if OP a (const_int 0) operand.
(define_predicate "const0_operand"
- (and (match_code "const_int, const_double")
+ (and (match_code "const_int")
(match_test "op == CONST0_RTX (mode)")))
(define_predicate "aarch64_ccmp_immediate"
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7408f52..ca1991b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/68129
+ * gcc.dg/pr68129_1.c: New test.
+
2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
PR debug/67192
diff --git a/gcc/testsuite/gcc.dg/pr68129_1.c b/gcc/testsuite/gcc.dg/pr68129_1.c
new file mode 100644
index 0000000..112331e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr68129_1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fno-split-wide-types" } */
+
+typedef int V __attribute__ ((vector_size (8 * sizeof (int))));
+
+void
+foo (V *p, V *q)
+{
+ *p = (*p == *q);
+}