1; Checks that speculative-execution only runs on divergent targets, if you pass 2; -spec-exec-only-if-divergent-target. 3 4; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -speculative-execution | \ 5; RUN: FileCheck --check-prefix=ON %s 6; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -speculative-execution \ 7; RUN: -spec-exec-only-if-divergent-target | \ 8; RUN: FileCheck --check-prefix=ON %s 9; RUN: opt < %s -S -speculative-execution -spec-exec-only-if-divergent-target | \ 10; RUN: FileCheck --check-prefix=OFF %s 11 12; Hoist in if-then pattern. 13define void @f() { 14; ON: %x = add i32 2, 3 15; ON: br i1 true 16; OFF: br i1 true 17; OFF: %x = add i32 2, 3 18 br i1 true, label %a, label %b 19a: 20 %x = add i32 2, 3 21 br label %b 22b: 23 ret void 24} 25