1 ; Checks that speculative-execution only runs on divergent targets, if you pass
2 ; -spec-exec-only-if-divergent-target.
4 ; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -passes=speculative-execution | \
5 ; RUN: FileCheck --check-prefix=ON %s
6 ; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -passes=speculative-execution \
7 ; RUN: -spec-exec-only-if-divergent-target | \
8 ; RUN: FileCheck --check-prefix=ON %s
9 ; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda \
10 ; RUN: -passes='speculative-execution<only-if-divergent-target>' | \
11 ; RUN: FileCheck --check-prefix=ON %s
12 ; RUN: opt < %s -S -passes=speculative-execution -spec-exec-only-if-divergent-target | \
13 ; RUN: FileCheck --check-prefix=OFF %s
14 ; RUN: opt < %s -S -passes='speculative-execution<only-if-divergent-target>' | \
15 ; RUN: FileCheck --check-prefix=OFF %s
17 ; Hoist in if-then pattern.
19 ; ON: %x = add i32 2, 3
22 ; OFF: %x = add i32 2, 3
23 br i1 true, label %a, label %b