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