brintos

brintos / llvm-project-archived public Read only

0
0
Text · 503 B · 60975bb Raw
25 lines · plain
1; RUN: llc < %s -mtriple=nvptx64 2>&1 | FileCheck %s2; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 | %ptxas-verify %}3 4; Make sure the example doesn't crash with segfault5 6; CHECK: .visible .func ({{.*}}) loop7define i32 @loop(i32, i32) {8entry:9  br label %loop10 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, %016  br i1 %exitcond, label %exit, label %loop17 18exit:19  ret i32 %res20}21 22define i32 @div(i32, i32) {23  ret i32 024}25