1; RUN: llc < %s -march=nvptx 2>&1 | FileCheck %s 2; Make sure the example doesn't crash with segfault 3 4; CHECK: .visible .func ({{.*}}) loop 5define i32 @loop(i32, i32) { 6entry: 7 br label %loop 8 9loop: 10 %i = phi i32 [ %0, %entry ], [ %res, %loop ] 11 %res = call i32 @div(i32 %i, i32 %1) 12 13 %exitcond = icmp eq i32 %res, %0 14 br i1 %exitcond, label %exit, label %loop 15 16exit: 17 ret i32 %res 18} 19 20define i32 @div(i32, i32) { 21 ret i32 0 22} 23