1 ; RUN: llc -march=hexagon -mcpu=hexagonv60 -O2 -mattr=+hvxv60,hvx-length64b < %s | FileCheck %s
3 ; CHECK: vmem(r{{[0-9]+}}+#3) = v{{[0-9]+}}
5 ; CHECK: call print_vecpred
6 ; CHECK: v{{[0-9]+}} = vmem(r{{[0-9]+}}+#3)
8 target triple = "hexagon"
10 @K = global i64 0, align 8
11 @src = global i32 -1, align 4
12 @Q6VecPredResult = common global <16 x i32> zeroinitializer, align 64
13 @dst_addresses = common global [15 x i64] zeroinitializer, align 8
14 @ptr_addresses = common global [15 x ptr] zeroinitializer, align 8
15 @src_addresses = common global [15 x ptr] zeroinitializer, align 8
16 @ptr = common global [32768 x i32] zeroinitializer, align 8
17 @vecpreds = common global [15 x <16 x i32>] zeroinitializer, align 64
18 @VectorResult = common global <16 x i32> zeroinitializer, align 64
19 @vectors = common global [15 x <16 x i32>] zeroinitializer, align 64
20 @VectorPairResult = common global <32 x i32> zeroinitializer, align 128
21 @vector_pairs = common global [15 x <32 x i32>] zeroinitializer, align 128
22 @str = private unnamed_addr constant [106 x i8] c"Q6VecPred4 : Q6_Q_vandor_QVR(Q6_Q_vand_VR(Q6_V_vsplat_R(1+1),(0x01010101)),Q6_V_vsplat_R(0+1),INT32_MIN)\00"
23 @str3 = private unnamed_addr constant [99 x i8] c"Q6VecPred4 : Q6_Q_vandor_QVR(Q6_Q_vand_VR(Q6_V_vsplat_R(1+1),(0x01010101)),Q6_V_vsplat_R(0+1),-1)\00"
24 @str4 = private unnamed_addr constant [98 x i8] c"Q6VecPred4 : Q6_Q_vandor_QVR(Q6_Q_vand_VR(Q6_V_vsplat_R(1+1),(0x01010101)),Q6_V_vsplat_R(0+1),0)\00"
26 ; Function Attrs: nounwind
27 define i32 @main() #0 {
29 %call = tail call i32 @init_addresses() #3
30 %call1 = tail call i32 @acquire_vector_unit(i8 zeroext 0) #3
31 tail call void @init_vectors() #3
32 %0 = tail call <16 x i32> @llvm.hexagon.V6.lvsplatw(i32 2)
33 %1 = tail call <64 x i1> @llvm.hexagon.V6.vandvrt(<16 x i32> %0, i32 16843009)
34 %2 = tail call <16 x i32> @llvm.hexagon.V6.lvsplatw(i32 1)
35 %3 = tail call <64 x i1> @llvm.hexagon.V6.vandvrt.acc(<64 x i1> %1, <16 x i32> %2, i32 -2147483648)
36 %4 = tail call <16 x i32> @llvm.hexagon.V6.vandqrt(<64 x i1> %3, i32 -1)
37 store <16 x i32> %4, ptr @Q6VecPredResult, align 64, !tbaa !1
38 %puts = tail call i32 @puts(ptr @str)
39 tail call void @print_vecpred(i32 512, ptr @Q6VecPredResult) #3
40 %5 = tail call <64 x i1> @llvm.hexagon.V6.vandvrt.acc(<64 x i1> %1, <16 x i32> %2, i32 -1)
41 %6 = tail call <16 x i32> @llvm.hexagon.V6.vandqrt(<64 x i1> %5, i32 -1)
42 store <16 x i32> %6, ptr @Q6VecPredResult, align 64, !tbaa !1
43 %puts5 = tail call i32 @puts(ptr @str3)
44 tail call void @print_vecpred(i32 512, ptr @Q6VecPredResult) #3
45 %7 = tail call <64 x i1> @llvm.hexagon.V6.vandvrt.acc(<64 x i1> %1, <16 x i32> %2, i32 0)
46 %8 = tail call <16 x i32> @llvm.hexagon.V6.vandqrt(<64 x i1> %7, i32 -1)
47 store <16 x i32> %8, ptr @Q6VecPredResult, align 64, !tbaa !1
48 %puts6 = tail call i32 @puts(ptr @str4)
49 tail call void @print_vecpred(i32 512, ptr @Q6VecPredResult) #3
53 declare i32 @init_addresses(...) #1
55 declare i32 @acquire_vector_unit(i8 zeroext) #1
57 declare void @init_vectors() #1
59 ; Function Attrs: nounwind readnone
60 declare <64 x i1> @llvm.hexagon.V6.vandvrt.acc(<64 x i1>, <16 x i32>, i32) #2
62 ; Function Attrs: nounwind readnone
63 declare <64 x i1> @llvm.hexagon.V6.vandvrt(<16 x i32>, i32) #2
65 ; Function Attrs: nounwind readnone
66 declare <16 x i32> @llvm.hexagon.V6.vandqrt(<64 x i1>, i32) #2
68 ; Function Attrs: nounwind readnone
69 declare <16 x i32> @llvm.hexagon.V6.lvsplatw(i32) #2
71 declare void @print_vecpred(i32, ptr) #1
73 ; Function Attrs: nounwind
74 declare i32 @puts(ptr nocapture readonly) #3
76 attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
77 attributes #1 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
78 attributes #2 = { nounwind readnone }
79 attributes #3 = { nounwind }
82 !2 = !{!"omnipotent char", !3, i64 0}
83 !3 = !{!"Simple C/C++ TBAA"}