llvm.org GIT mirror llvm / b3c92d3
Move divergent-target test into CodeGen/NVPTX because it requires an NVPTX target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266403 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Lebar 3 years ago
2 changed file(s) with 24 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
0 ; Checks that speculative-execution only runs on divergent targets, if you pass
1 ; -spec-exec-only-if-divergent-target.
2
3 ; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -speculative-execution | \
4 ; RUN: FileCheck --check-prefix=ON %s
5 ; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -speculative-execution \
6 ; RUN: -spec-exec-only-if-divergent-target | \
7 ; RUN: FileCheck --check-prefix=ON %s
8 ; RUN: opt < %s -S -speculative-execution -spec-exec-only-if-divergent-target | \
9 ; RUN: FileCheck --check-prefix=OFF %s
10
11 ; Hoist in if-then pattern.
12 define void @f() {
13 ; ON: %x = add i32 2, 3
14 ; ON: br i1 true
15 ; OFF: br i1 true
16 ; OFF: %x = add i32 2, 3
17 br i1 true, label %a, label %b
18 a:
19 %x = add i32 2, 3
20 br label %b
21 b:
22 ret void
23 }
+0
-22
test/Transforms/SpeculativeExecution/divergent-target.ll less more
None ; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -speculative-execution | \
1 ; RUN: FileCheck --check-prefix=ON %s
2 ; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -speculative-execution \
3 ; RUN: -spec-exec-only-if-divergent-target | \
4 ; RUN: FileCheck --check-prefix=ON %s
5 ; RUN: opt < %s -S -march=x86_64 -speculative-execution \
6 ; RUN: -spec-exec-only-if-divergent-target | \
7 ; RUN: FileCheck --check-prefix=OFF %s
8
9 ; Hoist in if-then pattern.
10 define void @f() {
11 ; ON: %x = add i32 2, 3
12 ; ON: br i1 true
13 ; OFF: br i1 true
14 ; OFF: %x = add i32 2, 3
15 br i1 true, label %a, label %b
16 a:
17 %x = add i32 2, 3
18 br label %b
19 b:
20 ret void
21 }