summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/NVPTX
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-04-15 01:20:52 +0000
committerJustin Lebar <jlebar@google.com>2016-04-15 01:20:52 +0000
commitf04e678e36f9cc1755f6e797f7b8a322d8cd4acc (patch)
tree22c27db69922b436f72b0f0bb52750447e4ffecf /llvm/test/CodeGen/NVPTX
parent12f4f8be904b16855952b0ea0355107b508cfbc3 (diff)
downloadbcm5719-llvm-f04e678e36f9cc1755f6e797f7b8a322d8cd4acc.tar.gz
bcm5719-llvm-f04e678e36f9cc1755f6e797f7b8a322d8cd4acc.zip
Move divergent-target test into CodeGen/NVPTX because it requires an NVPTX target.
llvm-svn: 266403
Diffstat (limited to 'llvm/test/CodeGen/NVPTX')
-rw-r--r--llvm/test/CodeGen/NVPTX/speculative-execution-divergent-target.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/NVPTX/speculative-execution-divergent-target.ll b/llvm/test/CodeGen/NVPTX/speculative-execution-divergent-target.ll
new file mode 100644
index 00000000000..128e9e9ba2a
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/speculative-execution-divergent-target.ll
@@ -0,0 +1,24 @@
+; Checks that speculative-execution only runs on divergent targets, if you pass
+; -spec-exec-only-if-divergent-target.
+
+; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -speculative-execution | \
+; RUN: FileCheck --check-prefix=ON %s
+; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -speculative-execution \
+; RUN: -spec-exec-only-if-divergent-target | \
+; RUN: FileCheck --check-prefix=ON %s
+; RUN: opt < %s -S -speculative-execution -spec-exec-only-if-divergent-target | \
+; RUN: FileCheck --check-prefix=OFF %s
+
+; Hoist in if-then pattern.
+define void @f() {
+; ON: %x = add i32 2, 3
+; ON: br i1 true
+; OFF: br i1 true
+; OFF: %x = add i32 2, 3
+ br i1 true, label %a, label %b
+a:
+ %x = add i32 2, 3
+ br label %b
+b:
+ ret void
+}
OpenPOWER on IntegriCloud