xref: /aosp_15_r20/external/llvm/test/Bitcode/binaryIntInstructions.3.2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis < %s.bc| FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: verify-uselistorder < %s.bc
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; BinaryIntOperation.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
5*9880d681SAndroid Build Coastguard Worker; The test checks that LLVM does not misread binary integer instructions from
6*9880d681SAndroid Build Coastguard Worker; older bitcode files.
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerdefine void @add(i1 %x1, i8 %x2 ,i16 %x3, i32 %x4, i64 %x5){
9*9880d681SAndroid Build Coastguard Workerentry:
10*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = add i1 %x1, %x1
11*9880d681SAndroid Build Coastguard Worker  %res1 = add i1 %x1, %x1
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res2 = add i8 %x2, %x2
14*9880d681SAndroid Build Coastguard Worker  %res2 = add i8 %x2, %x2
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res3 = add i16 %x3, %x3
17*9880d681SAndroid Build Coastguard Worker  %res3 = add i16 %x3, %x3
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res4 = add i32 %x4, %x4
20*9880d681SAndroid Build Coastguard Worker  %res4 = add i32 %x4, %x4
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res5 = add i64 %x5, %x5
23*9880d681SAndroid Build Coastguard Worker  %res5 = add i64 %x5, %x5
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Worker; CHECK: %res6 = add nuw i1 %x1, %x1
26*9880d681SAndroid Build Coastguard Worker  %res6 = add nuw i1 %x1, %x1
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Worker; CHECK: %res7 = add nsw i1 %x1, %x1
29*9880d681SAndroid Build Coastguard Worker  %res7 = add nsw i1 %x1, %x1
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Worker; CHECK: %res8 = add nuw nsw i1 %x1, %x1
32*9880d681SAndroid Build Coastguard Worker  %res8 = add nuw nsw i1 %x1, %x1
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard Worker  ret void
35*9880d681SAndroid Build Coastguard Worker}
36*9880d681SAndroid Build Coastguard Worker
37*9880d681SAndroid Build Coastguard Workerdefine void @addvec8NuwNsw(<2 x i8> %x1, <3 x i8> %x2 ,<4 x i8> %x3, <8 x i8> %x4, <16 x i8> %x5){
38*9880d681SAndroid Build Coastguard Workerentry:
39*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = add nuw nsw <2 x i8> %x1, %x1
40*9880d681SAndroid Build Coastguard Worker  %res1 = add nuw nsw <2 x i8> %x1, %x1
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res2 = add nuw nsw <3 x i8> %x2, %x2
43*9880d681SAndroid Build Coastguard Worker  %res2 = add nuw nsw <3 x i8> %x2, %x2
44*9880d681SAndroid Build Coastguard Worker
45*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res3 = add nuw nsw <4 x i8> %x3, %x3
46*9880d681SAndroid Build Coastguard Worker  %res3 = add nuw nsw <4 x i8> %x3, %x3
47*9880d681SAndroid Build Coastguard Worker
48*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res4 = add nuw nsw <8 x i8> %x4, %x4
49*9880d681SAndroid Build Coastguard Worker  %res4 = add nuw nsw <8 x i8> %x4, %x4
50*9880d681SAndroid Build Coastguard Worker
51*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res5 = add nuw nsw <16 x i8> %x5, %x5
52*9880d681SAndroid Build Coastguard Worker  %res5 = add nuw nsw <16 x i8> %x5, %x5
53*9880d681SAndroid Build Coastguard Worker
54*9880d681SAndroid Build Coastguard Worker  ret void
55*9880d681SAndroid Build Coastguard Worker}
56*9880d681SAndroid Build Coastguard Worker
57*9880d681SAndroid Build Coastguard Workerdefine void @addvec16NuwNsw(<2 x i16> %x1, <3 x i16> %x2 ,<4 x i16> %x3, <8 x i16> %x4, <16 x i16> %x5){
58*9880d681SAndroid Build Coastguard Workerentry:
59*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = add nuw nsw <2 x i16> %x1, %x1
60*9880d681SAndroid Build Coastguard Worker  %res1 = add nuw nsw <2 x i16> %x1, %x1
61*9880d681SAndroid Build Coastguard Worker
62*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res2 = add nuw nsw <3 x i16> %x2, %x2
63*9880d681SAndroid Build Coastguard Worker  %res2 = add nuw nsw <3 x i16> %x2, %x2
64*9880d681SAndroid Build Coastguard Worker
65*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res3 = add nuw nsw <4 x i16> %x3, %x3
66*9880d681SAndroid Build Coastguard Worker  %res3 = add nuw nsw <4 x i16> %x3, %x3
67*9880d681SAndroid Build Coastguard Worker
68*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res4 = add nuw nsw <8 x i16> %x4, %x4
69*9880d681SAndroid Build Coastguard Worker  %res4 = add nuw nsw <8 x i16> %x4, %x4
70*9880d681SAndroid Build Coastguard Worker
71*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res5 = add nuw nsw <16 x i16> %x5, %x5
72*9880d681SAndroid Build Coastguard Worker  %res5 = add nuw nsw <16 x i16> %x5, %x5
73*9880d681SAndroid Build Coastguard Worker
74*9880d681SAndroid Build Coastguard Worker  ret void
75*9880d681SAndroid Build Coastguard Worker}
76*9880d681SAndroid Build Coastguard Worker
77*9880d681SAndroid Build Coastguard Workerdefine void @addvec32NuwNsw(<2 x i32> %x1, <3 x i32> %x2 ,<4 x i32> %x3, <8 x i32> %x4, <16 x i32> %x5){
78*9880d681SAndroid Build Coastguard Workerentry:
79*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = add nuw nsw <2 x i32> %x1, %x1
80*9880d681SAndroid Build Coastguard Worker  %res1 = add nuw nsw <2 x i32> %x1, %x1
81*9880d681SAndroid Build Coastguard Worker
82*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res2 = add nuw nsw <3 x i32> %x2, %x2
83*9880d681SAndroid Build Coastguard Worker  %res2 = add nuw nsw <3 x i32> %x2, %x2
84*9880d681SAndroid Build Coastguard Worker
85*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res3 = add nuw nsw <4 x i32> %x3, %x3
86*9880d681SAndroid Build Coastguard Worker  %res3 = add nuw nsw <4 x i32> %x3, %x3
87*9880d681SAndroid Build Coastguard Worker
88*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res4 = add nuw nsw <8 x i32> %x4, %x4
89*9880d681SAndroid Build Coastguard Worker  %res4 = add nuw nsw <8 x i32> %x4, %x4
90*9880d681SAndroid Build Coastguard Worker
91*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res5 = add nuw nsw <16 x i32> %x5, %x5
92*9880d681SAndroid Build Coastguard Worker  %res5 = add nuw nsw <16 x i32> %x5, %x5
93*9880d681SAndroid Build Coastguard Worker
94*9880d681SAndroid Build Coastguard Worker  ret void
95*9880d681SAndroid Build Coastguard Worker}
96*9880d681SAndroid Build Coastguard Worker
97*9880d681SAndroid Build Coastguard Workerdefine void @addvec64NuwNsw(<2 x i64> %x1, <3 x i64> %x2 ,<4 x i64> %x3, <8 x i64> %x4, <16 x i64> %x5){
98*9880d681SAndroid Build Coastguard Workerentry:
99*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = add nuw nsw <2 x i64> %x1, %x1
100*9880d681SAndroid Build Coastguard Worker  %res1 = add nuw nsw <2 x i64> %x1, %x1
101*9880d681SAndroid Build Coastguard Worker
102*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res2 = add nuw nsw <3 x i64> %x2, %x2
103*9880d681SAndroid Build Coastguard Worker  %res2 = add nuw nsw <3 x i64> %x2, %x2
104*9880d681SAndroid Build Coastguard Worker
105*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res3 = add nuw nsw <4 x i64> %x3, %x3
106*9880d681SAndroid Build Coastguard Worker  %res3 = add nuw nsw <4 x i64> %x3, %x3
107*9880d681SAndroid Build Coastguard Worker
108*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res4 = add nuw nsw <8 x i64> %x4, %x4
109*9880d681SAndroid Build Coastguard Worker  %res4 = add nuw nsw <8 x i64> %x4, %x4
110*9880d681SAndroid Build Coastguard Worker
111*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res5 = add nuw nsw <16 x i64> %x5, %x5
112*9880d681SAndroid Build Coastguard Worker  %res5 = add nuw nsw <16 x i64> %x5, %x5
113*9880d681SAndroid Build Coastguard Worker
114*9880d681SAndroid Build Coastguard Worker  ret void
115*9880d681SAndroid Build Coastguard Worker}
116*9880d681SAndroid Build Coastguard Worker
117*9880d681SAndroid Build Coastguard Workerdefine void @sub(i8 %x1){
118*9880d681SAndroid Build Coastguard Workerentry:
119*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = sub i8 %x1, %x1
120*9880d681SAndroid Build Coastguard Worker  %res1 = sub i8 %x1, %x1
121*9880d681SAndroid Build Coastguard Worker
122*9880d681SAndroid Build Coastguard Worker; CHECK: %res2 = sub nuw i8 %x1, %x1
123*9880d681SAndroid Build Coastguard Worker  %res2 = sub nuw i8 %x1, %x1
124*9880d681SAndroid Build Coastguard Worker
125*9880d681SAndroid Build Coastguard Worker; CHECK: %res3 = sub nsw i8 %x1, %x1
126*9880d681SAndroid Build Coastguard Worker  %res3 = sub nsw i8 %x1, %x1
127*9880d681SAndroid Build Coastguard Worker
128*9880d681SAndroid Build Coastguard Worker; CHECK: %res4 = sub nuw nsw i8 %x1, %x1
129*9880d681SAndroid Build Coastguard Worker  %res4 = sub nuw nsw i8 %x1, %x1
130*9880d681SAndroid Build Coastguard Worker
131*9880d681SAndroid Build Coastguard Worker  ret void
132*9880d681SAndroid Build Coastguard Worker}
133*9880d681SAndroid Build Coastguard Worker
134*9880d681SAndroid Build Coastguard Workerdefine void @mul(i8 %x1){
135*9880d681SAndroid Build Coastguard Workerentry:
136*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = mul i8 %x1, %x1
137*9880d681SAndroid Build Coastguard Worker  %res1 = mul i8 %x1, %x1
138*9880d681SAndroid Build Coastguard Worker
139*9880d681SAndroid Build Coastguard Worker  ret void
140*9880d681SAndroid Build Coastguard Worker}
141*9880d681SAndroid Build Coastguard Worker
142*9880d681SAndroid Build Coastguard Workerdefine void @udiv(i8 %x1){
143*9880d681SAndroid Build Coastguard Workerentry:
144*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = udiv i8 %x1, %x1
145*9880d681SAndroid Build Coastguard Worker  %res1 = udiv i8 %x1, %x1
146*9880d681SAndroid Build Coastguard Worker
147*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res2 = udiv exact i8 %x1, %x1
148*9880d681SAndroid Build Coastguard Worker  %res2 = udiv exact i8 %x1, %x1
149*9880d681SAndroid Build Coastguard Worker
150*9880d681SAndroid Build Coastguard Worker  ret void
151*9880d681SAndroid Build Coastguard Worker}
152*9880d681SAndroid Build Coastguard Worker
153*9880d681SAndroid Build Coastguard Workerdefine void @sdiv(i8 %x1){
154*9880d681SAndroid Build Coastguard Workerentry:
155*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = sdiv i8 %x1, %x1
156*9880d681SAndroid Build Coastguard Worker  %res1 = sdiv i8 %x1, %x1
157*9880d681SAndroid Build Coastguard Worker
158*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res2 = sdiv exact i8 %x1, %x1
159*9880d681SAndroid Build Coastguard Worker  %res2 = sdiv exact i8 %x1, %x1
160*9880d681SAndroid Build Coastguard Worker
161*9880d681SAndroid Build Coastguard Worker  ret void
162*9880d681SAndroid Build Coastguard Worker}
163*9880d681SAndroid Build Coastguard Worker
164*9880d681SAndroid Build Coastguard Workerdefine void @urem(i32 %x1){
165*9880d681SAndroid Build Coastguard Workerentry:
166*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = urem i32 %x1, %x1
167*9880d681SAndroid Build Coastguard Worker  %res1 = urem i32 %x1, %x1
168*9880d681SAndroid Build Coastguard Worker
169*9880d681SAndroid Build Coastguard Worker  ret void
170*9880d681SAndroid Build Coastguard Worker}
171*9880d681SAndroid Build Coastguard Worker
172*9880d681SAndroid Build Coastguard Workerdefine void @srem(i32 %x1){
173*9880d681SAndroid Build Coastguard Workerentry:
174*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = srem i32 %x1, %x1
175*9880d681SAndroid Build Coastguard Worker  %res1 = srem i32 %x1, %x1
176*9880d681SAndroid Build Coastguard Worker
177*9880d681SAndroid Build Coastguard Worker  ret void
178*9880d681SAndroid Build Coastguard Worker}
179