summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/predefined-arch-macros.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-03-20 21:12:53 +0000
committerEric Christopher <echristo@gmail.com>2017-03-20 21:12:53 +0000
commit74fa24ff279c51bc432cefbb26dbc753a16c1b51 (patch)
treefee161cfe190ba22d11ab95162f7a1aef1e6bfcc /clang/test/Preprocessor/predefined-arch-macros.c
parentd34a3631b272cce00301e70c89e651968e1a6588 (diff)
downloadbcm5719-llvm-74fa24ff279c51bc432cefbb26dbc753a16c1b51.tar.gz
bcm5719-llvm-74fa24ff279c51bc432cefbb26dbc753a16c1b51.zip
Turn on HTM on power8 and later (including powerpc64le) since it's
available by default on those cpus and configurations. llvm-svn: 298307
Diffstat (limited to 'clang/test/Preprocessor/predefined-arch-macros.c')
-rw-r--r--clang/test/Preprocessor/predefined-arch-macros.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c
index 73d0be6caa3..b63b6ddff59 100644
--- a/clang/test/Preprocessor/predefined-arch-macros.c
+++ b/clang/test/Preprocessor/predefined-arch-macros.c
@@ -1984,6 +1984,24 @@
// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_CRYPTO_M64
//
// CHECK_PPC_CRYPTO_M64: #define __CRYPTO__ 1
+
+// HTM is available on power8 or later which includes all of powerpc64le as an
+// ABI choice. Test that, the cpus, and the option.
+// RUN: %clang -mhtm -E -dM %s -o - 2>&1 \
+// RUN: -target powerpc64-unknown-linux \
+// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_HTM
+// RUN: %clang -E -dM %s -o - 2>&1 \
+// RUN: -target powerpc64le-unknown-linux \
+// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_HTM
+// RUN: %clang -mcpu=pwr8 -E -dM %s -o - 2>&1 \
+// RUN: -target powerpc64-unknown-linux \
+// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_HTM
+// RUN: %clang -mcpu=pwr9 -E -dM %s -o - 2>&1 \
+// RUN: -target powerpc64-unknown-linux \
+// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_HTM
+//
+// CHECK_PPC_HTM: #define __HTM__ 1
+
//
// RUN: %clang -mcpu=ppc64 -E -dM %s -o - 2>&1 \
// RUN: -target powerpc64-unknown-unknown \
OpenPOWER on IntegriCloud