xref: /llvm-project/llvm/test/Transforms/SpeculativeExecution/single-lane-execution.ll (revision fa90f6b9d0fa2742df4548156c498c48dc796ec4)
1; REQUIRES: amdgpu-registered-target
2; RUN: opt -S -passes=speculative-execution -mtriple=amdgcn--  \
3; RUN: -spec-exec-only-if-divergent-target \
4; RUN:   -spec-exec-max-speculation-cost 4 -spec-exec-max-not-hoisted 3 \
5; RUN:   %s | FileCheck %s
6
7; Hoist in if-then pattern.
8define void @skip_single_lane_ifThen() #0 {
9; CHECK-LABEL: @skip_single_lane_ifThen(
10; CHECK: br i1 true
11
12br i1 true, label %a, label %b
13; CHECK: a:
14; CHECK: %x = add i32 2, 3
15a:
16  %x = add i32 2, 3
17; CHECK: br label
18  br label %b
19; CHECK: b:
20b:
21; CHECK: ret void
22  ret void
23}
24
25attributes #0 = { "amdgpu-flat-work-group-size"="1,1" }
26