aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-10-17 08:52:15 -0700
committerStephen Hines <srhines@google.com>2014-10-20 11:34:17 -0700
commit1aeaece93aae941bb1bbb3a226398a311dfe18e8 (patch)
treeb6f909dda92a6c200bccf62d69f58af2eca076c0 /test
parent8b0b2d671156262172b5a04b84cf191bd93fa59e (diff)
downloadclang-1aeaece93aae941bb1bbb3a226398a311dfe18e8.tar.gz
Bring in fixes for Cortex-A53 errata.lollipop-dev
Bug: 18034609 (cherry picked from commit 7fb0af86e33f382a8e4a8f23cc1ab471b7134995) Change-Id: Ifc04c2a8e3ec13efd3a5f5ed4879f0a657df50cf
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/aarch64-fix-cortex-a53-835769.c27
-rw-r--r--test/Driver/aarch64-fix-cortex-a53-835769.c13
2 files changed, 40 insertions, 0 deletions
diff --git a/test/CodeGen/aarch64-fix-cortex-a53-835769.c b/test/CodeGen/aarch64-fix-cortex-a53-835769.c
new file mode 100644
index 0000000000..7ad124012e
--- /dev/null
+++ b/test/CodeGen/aarch64-fix-cortex-a53-835769.c
@@ -0,0 +1,27 @@
+// REQUIRES: aarch64-registered-target
+
+// RUN: %clang -O3 -target aarch64-linux-eabi %s -S -o- \
+// RUN: | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
+// RUN: %clang -O3 -target aarch64-linux-eabi -mfix-cortex-a53-835769 %s -S -o- 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
+// RUN: %clang -O3 -target aarch64-linux-eabi -mno-fix-cortex-a53-835769 %s -S -o- 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
+
+// RUN: %clang -O3 -target aarch64-android-eabi %s -S -o- \
+// RUN: | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
+// RUN: %clang -O3 -target aarch64-android-eabi -mfix-cortex-a53-835769 %s -S -o- \
+// RUN: | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
+// RUN: %clang -O3 -target aarch64-android-eabi -mno-fix-cortex-a53-835769 %s -S -o- \
+// RUN: | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
+
+typedef long int64_t;
+
+int64_t f_load_madd_64(int64_t a, int64_t b, int64_t *c) {
+ int64_t result = a+b*(*c);
+ return result;
+}
+
+// CHECK: ldr
+// CHECK-YES-NEXT: nop
+// CHECK-NO-NEXT-NOT: nop
+// CHECK-NEXT: madd
diff --git a/test/Driver/aarch64-fix-cortex-a53-835769.c b/test/Driver/aarch64-fix-cortex-a53-835769.c
new file mode 100644
index 0000000000..3fe918adec
--- /dev/null
+++ b/test/Driver/aarch64-fix-cortex-a53-835769.c
@@ -0,0 +1,13 @@
+// RUN: %clang -target aarch64-linux-eabi %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-DEF %s
+// RUN: %clang -target aarch64-linux-eabi -mfix-cortex-a53-835769 %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-YES %s
+// RUN: %clang -target aarch64-linux-eabi -mno-fix-cortex-a53-835769 %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NO %s
+
+// RUN: %clang -target aarch64-android-eabi %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-YES %s
+
+// CHECK-DEF-NOT: "-backend-option" "-aarch64-fix-cortex-a53-835769"
+// CHECK-YES: "-backend-option" "-aarch64-fix-cortex-a53-835769=1"
+// CHECK-NO: "-backend-option" "-aarch64-fix-cortex-a53-835769=0"