xref: /aosp_15_r20/external/llvm/test/CodeGen/Hexagon/reg-scavengebug-3.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 -march=hexagon -mcpu=hexagonv60 < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; CHECK: vmem
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workertarget triple = "hexagon"
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker@vecpreds = external global [15 x <16 x i32>], align 64
8*9880d681SAndroid Build Coastguard Worker@vectors = external global [15 x <16 x i32>], align 64
9*9880d681SAndroid Build Coastguard Worker@vector_pairs = external global [15 x <32 x i32>], align 128
10*9880d681SAndroid Build Coastguard Worker@.str1 = external hidden unnamed_addr constant [20 x i8], align 1
11*9880d681SAndroid Build Coastguard Worker@.str2 = external hidden unnamed_addr constant [43 x i8], align 1
12*9880d681SAndroid Build Coastguard Worker@Q6VecPredResult = external global <16 x i32>, align 64
13*9880d681SAndroid Build Coastguard Worker@.str52 = external hidden unnamed_addr constant [57 x i8], align 1
14*9880d681SAndroid Build Coastguard Worker@.str54 = external hidden unnamed_addr constant [59 x i8], align 1
15*9880d681SAndroid Build Coastguard Worker@VectorResult = external global <16 x i32>, align 64
16*9880d681SAndroid Build Coastguard Worker@.str243 = external hidden unnamed_addr constant [60 x i8], align 1
17*9880d681SAndroid Build Coastguard Worker@.str251 = external hidden unnamed_addr constant [77 x i8], align 1
18*9880d681SAndroid Build Coastguard Worker@.str290 = external hidden unnamed_addr constant [65 x i8], align 1
19*9880d681SAndroid Build Coastguard Worker@VectorPairResult = external global <32 x i32>, align 128
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
22*9880d681SAndroid Build Coastguard Workerdeclare void @print_vector(i32, i8*) #0
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
25*9880d681SAndroid Build Coastguard Workerdeclare i32 @printf(i8*, ...) #0
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
28*9880d681SAndroid Build Coastguard Workerdeclare void @print_vecpred(i32, i8*) #0
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone
31*9880d681SAndroid Build Coastguard Workerdeclare <16 x i32> @llvm.hexagon.V6.vandqrt(<512 x i1>, i32) #1
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
34*9880d681SAndroid Build Coastguard Workerdeclare void @init_vectors() #0
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone
37*9880d681SAndroid Build Coastguard Workerdeclare <512 x i1> @llvm.hexagon.V6.vandvrt(<16 x i32>, i32) #1
38*9880d681SAndroid Build Coastguard Worker
39*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone
40*9880d681SAndroid Build Coastguard Workerdeclare <16 x i32> @llvm.hexagon.V6.lvsplatw(i32) #1
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
43*9880d681SAndroid Build Coastguard Workerdeclare void @init_addresses() #0
44*9880d681SAndroid Build Coastguard Worker
45*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
46*9880d681SAndroid Build Coastguard Workerdeclare <16 x i32> @llvm.hexagon.V6.vsubhnq(<512 x i1>, <16 x i32>, <16 x i32>) #1
47*9880d681SAndroid Build Coastguard Worker
48*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
49*9880d681SAndroid Build Coastguard Workerdefine i32 @main() #0 {
50*9880d681SAndroid Build Coastguard Workerentry:
51*9880d681SAndroid Build Coastguard Worker  %0 = load <16 x i32>, <16 x i32>* getelementptr inbounds ([15 x <16 x i32>], [15 x <16 x i32>]* @vecpreds, i32 0, i32 0), align 64
52*9880d681SAndroid Build Coastguard Worker  %1 = load <16 x i32>, <16 x i32>* getelementptr inbounds ([15 x <16 x i32>], [15 x <16 x i32>]* @vectors, i32 0, i32 1), align 64
53*9880d681SAndroid Build Coastguard Worker  call void @print_vecpred(i32 64, i8* bitcast (<16 x i32>* @Q6VecPredResult to i8*))
54*9880d681SAndroid Build Coastguard Worker  %2 = load <16 x i32>, <16 x i32>* getelementptr inbounds ([15 x <16 x i32>], [15 x <16 x i32>]* @vectors, i32 0, i32 1), align 64
55*9880d681SAndroid Build Coastguard Worker  %call50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str52, i32 0, i32 0)) #3
56*9880d681SAndroid Build Coastguard Worker  %3 = load <16 x i32>, <16 x i32>* getelementptr inbounds ([15 x <16 x i32>], [15 x <16 x i32>]* @vectors, i32 0, i32 1), align 64
57*9880d681SAndroid Build Coastguard Worker  %call52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str54, i32 0, i32 0)) #3
58*9880d681SAndroid Build Coastguard Worker  %4 = load <16 x i32>, <16 x i32>* getelementptr inbounds ([15 x <16 x i32>], [15 x <16 x i32>]* @vectors, i32 0, i32 1), align 64
59*9880d681SAndroid Build Coastguard Worker  %call300 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str290, i32 0, i32 0)) #3
60*9880d681SAndroid Build Coastguard Worker  %5 = load <16 x i32>, <16 x i32>* getelementptr inbounds ([15 x <16 x i32>], [15 x <16 x i32>]* @vectors, i32 0, i32 0), align 64
61*9880d681SAndroid Build Coastguard Worker  %6 = load <16 x i32>, <16 x i32>* getelementptr inbounds ([15 x <16 x i32>], [15 x <16 x i32>]* @vectors, i32 0, i32 1), align 64
62*9880d681SAndroid Build Coastguard Worker  %call1373 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str1, i32 0, i32 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str2, i32 0, i32 0), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str243, i32 0, i32 0)) #3
63*9880d681SAndroid Build Coastguard Worker  %7 = call <16 x i32> @llvm.hexagon.V6.lvsplatw(i32 1)
64*9880d681SAndroid Build Coastguard Worker  %call1381 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str1, i32 0, i32 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str2, i32 0, i32 0), i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str251, i32 0, i32 0)) #3
65*9880d681SAndroid Build Coastguard Worker  %8 = call <16 x i32> @llvm.hexagon.V6.lvsplatw(i32 1)
66*9880d681SAndroid Build Coastguard Worker  %9 = call <512 x i1> @llvm.hexagon.V6.vandvrt(<16 x i32> %8, i32 16843009)
67*9880d681SAndroid Build Coastguard Worker  call void @print_vector(i32 64, i8* bitcast (<16 x i32>* @VectorResult to i8*))
68*9880d681SAndroid Build Coastguard Worker  %10 = call <16 x i32> @llvm.hexagon.V6.lvsplatw(i32 1)
69*9880d681SAndroid Build Coastguard Worker  %11 = call <512 x i1> @llvm.hexagon.V6.vandvrt(<16 x i32> %10, i32 16843009)
70*9880d681SAndroid Build Coastguard Worker  %12 = bitcast <512 x i1> %11 to <16 x i32>
71*9880d681SAndroid Build Coastguard Worker  %13 = bitcast <16 x i32> %12 to <512 x i1>
72*9880d681SAndroid Build Coastguard Worker  %14 = call <16 x i32> @llvm.hexagon.V6.vsubhnq(<512 x i1> %13, <16 x i32> undef, <16 x i32> undef)
73*9880d681SAndroid Build Coastguard Worker  store <16 x i32> %14, <16 x i32>* @VectorResult, align 64
74*9880d681SAndroid Build Coastguard Worker  ret i32 0
75*9880d681SAndroid Build Coastguard Worker}
76*9880d681SAndroid Build Coastguard Worker
77*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
78*9880d681SAndroid Build Coastguard Workerattributes #1 = { nounwind readnone }
79*9880d681SAndroid Build Coastguard Workerattributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
80*9880d681SAndroid Build Coastguard Workerattributes #3 = { nounwind }
81