1 ; RUN: llc < %s -march=nvptx64 2>&1 | FileCheck %s
2 ; RUN: %if ptxas %{ llc < %s -march=nvptx64 | %ptxas-verify %}
4 ; Make sure the example doesn't crash with segfault
6 ; CHECK: .visible .func ({{.*}}) loop
7 define i32 @loop(i32, i32) {
12 %i = phi i32 [ %0, %entry ], [ %res, %loop ]
13 %res = call i32 @div(i32 %i, i32 %1)
15 %exitcond = icmp eq i32 %res, %0
16 br i1 %exitcond, label %exit, label %loop
22 define i32 @div(i32, i32) {