1 ; RUN: llc -march=hexagon < %s | FileCheck %s
6 target triple = "hexagon-unknown--elf"
8 %struct.0 = type { [5 x i32] }
9 %struct.2 = type { i32, i32, i32, ptr }
10 %struct.1 = type { ptr, i32, i32, i32 }
12 @g0 = external hidden unnamed_addr constant [52 x i8], align 1
13 @g1 = external hidden unnamed_addr constant [3 x i8], align 1
15 declare extern_weak void @f0(i32, ptr, i32, ptr, ...) #0
16 declare void @f1(ptr, i32) #0
18 define void @fred(ptr %a0) #0 {
20 %v2 = alloca %struct.0, align 4
21 %v3 = alloca %struct.2, i32 undef, align 8
22 br i1 undef, label %b5, label %b4
27 b5: ; preds = %b5, %b1
28 %v6 = getelementptr inbounds %struct.2, ptr %v3, i32 undef, i32 3
29 store ptr undef, ptr %v6, align 4
32 b7: ; preds = %b10, %b4
33 %v8 = call i32 @llvm.hexagon.V6.extractw(<16 x i32> zeroinitializer, i32 0)
34 %cmp = icmp eq ptr @f0, null
35 br i1 %cmp, label %b11, label %b9
38 call void (i32, ptr, i32, ptr, ...) @f0(i32 2, ptr @g0, i32 2346, ptr @g1, i32 %v8)
42 call void @f1(ptr nonnull %v2, i32 28)
45 b11: ; preds = %b11, %b7
46 br i1 undef, label %b10, label %b11
49 declare i32 @llvm.hexagon.V6.extractw(<16 x i32>, i32) #1
51 attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" }
52 attributes #1 = { nounwind readnone }