1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 target triple = "hexagon"
8 define void @danny(i32* %p, i32 %n, i32 %k) #0 {
12 for.body: ; preds = %entry
13 %t0 = phi i32 [ 0, %entry ], [ %t1, %for.cont ]
15 %t2 = getelementptr i32, i32* %p, i32 %t0
16 store i32 %t1, i32* %t2, align 4
17 %c = icmp sgt i32 %t1, %k
18 br i1 %c, label %noret, label %for.cont
21 %cmp = icmp slt i32 %t0, %n
22 br i1 %cmp, label %for.body, label %for.end
24 for.end: ; preds = %for.cond
35 define void @sammy(i32* %p, i32 %n, i32 %k, void (...)* %f) #0 {
39 for.body: ; preds = %entry
40 %t0 = phi i32 [ 0, %entry ], [ %t1, %for.cont ]
42 %t2 = getelementptr i32, i32* %p, i32 %t0
43 store i32 %t1, i32* %t2, align 4
44 %c = icmp sgt i32 %t1, %k
45 br i1 %c, label %noret, label %for.cont
48 %cmp = icmp slt i32 %t0, %n
49 br i1 %cmp, label %for.body, label %for.end
51 for.end: ; preds = %for.cond
55 call void (...) %f() #1
59 declare void @trap() #1
61 attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b" }
62 attributes #1 = { nounwind noreturn }