summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/hints.ll
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-07-12 21:20:49 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-07-12 21:20:49 +0000
commitf74d48a01151fc00c639b5848ccc89b1ce4c0c92 (patch)
tree4031514623c4faab2b65154eba9385697bf9fe39 /llvm/test/CodeGen/AArch64/hints.ll
parentdb514056dedd0fd2e279016e17a6517b691ce4f6 (diff)
downloadbcm5719-llvm-f74d48a01151fc00c639b5848ccc89b1ce4c0c92.tar.gz
bcm5719-llvm-f74d48a01151fc00c639b5848ccc89b1ce4c0c92.zip
AArch64: add support for llvm.aarch64.hint intrinsic
This adds a llvm.aarch64.hint intrinsic to mirror the llvm.arm.hint in order to support the various hint intrinsic functions in the ACLE. Add an optional pattern field that permits the subclass to specify the pattern that matches the selection. The intrinsic pattern is set as mayLoad, mayStore, so overload the value for the definition of the hint instruction. llvm-svn: 212883
Diffstat (limited to 'llvm/test/CodeGen/AArch64/hints.ll')
-rw-r--r--llvm/test/CodeGen/AArch64/hints.ll67
1 files changed, 67 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/hints.ll b/llvm/test/CodeGen/AArch64/hints.ll
new file mode 100644
index 00000000000..d7d9e23af1f
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/hints.ll
@@ -0,0 +1,67 @@
+; RUN: llc -mtriple aarch64-eabi -o - %s | FileCheck %s
+
+declare void @llvm.aarch64.hint(i32) nounwind
+
+define void @hint_nop() {
+entry:
+ tail call void @llvm.aarch64.hint(i32 0) nounwind
+ ret void
+}
+
+; CHECK-LABEL: hint_nop
+; CHECK: nop
+
+define void @hint_yield() {
+entry:
+ tail call void @llvm.aarch64.hint(i32 1) nounwind
+ ret void
+}
+
+; CHECK-LABEL: hint_yield
+; CHECK: yield
+
+define void @hint_wfe() {
+entry:
+ tail call void @llvm.aarch64.hint(i32 2) nounwind
+ ret void
+}
+
+; CHECK-LABEL: hint_wfe
+; CHECK: wfe
+
+define void @hint_wfi() {
+entry:
+ tail call void @llvm.aarch64.hint(i32 3) nounwind
+ ret void
+}
+
+; CHECK-LABEL: hint_wfi
+; CHECK: wfi
+
+define void @hint_sev() {
+entry:
+ tail call void @llvm.aarch64.hint(i32 4) nounwind
+ ret void
+}
+
+; CHECK-LABEL: hint_sev
+; CHECK: sev
+
+define void @hint_sevl() {
+entry:
+ tail call void @llvm.aarch64.hint(i32 5) nounwind
+ ret void
+}
+
+; CHECK-LABEL: hint_sevl
+; CHECK: sevl
+
+define void @hint_undefined() {
+entry:
+ tail call void @llvm.aarch64.hint(i32 8) nounwind
+ ret void
+}
+
+; CHECK-LABEL: hint_undefined
+; CHECK: hint #0x8
+
OpenPOWER on IntegriCloud