[BranchFolding] do not iterate the aliases of virtual registers
[oota-llvm.git] / test / CodeGen / NVPTX / branch-fold.ll
1 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_35 -disable-cgp | FileCheck %s
2 ; Disable CGP which also folds branches, so that only BranchFolding is under
3 ; the spotlight.
4
5 target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
6 target triple = "nvptx64-nvidia-cuda"
7
8 define void @foo(i32 %x, float* %output) {
9 ; CHECK-LABEL: .visible .func foo(
10 ; CHECK-NOT: bra.uni
11 ; CHECK-NOT: LBB0_
12   %1 = icmp eq i32 %x, 1
13   br i1 %1, label %then, label %else
14
15 then:
16   br label %merge
17
18 else:
19   br label %merge
20
21 merge:
22   store float 2.0, float* %output
23   ret void
24 }