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
5 target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
6 target triple = "nvptx64-nvidia-cuda"
8 define void @foo(i32 %x, float* %output) {
9 ; CHECK-LABEL: .visible .func foo(
12 %1 = icmp eq i32 %x, 1
13 br i1 %1, label %then, label %else
22 store float 2.0, float* %output
27 define ptx_kernel void @hoge() #0 {
28 ; CHECK-LABEL: .visible .entry hoge(
30 br i1 undef, label %bb1, label %bb4
32 bb1: ; preds = %bb1, %bb
33 %tmp = phi i64 [ %tmp2, %bb1 ], [ undef, %bb ]
34 %tmp2 = add nsw i64 %tmp, 1
35 %tmp3 = icmp sle i64 %tmp, 0
36 br i1 %tmp3, label %bb1, label %bb4
38 bb4: ; preds = %bb4, %bb1, %bb