1 ; RUN: llvm-dis < %s.bc| FileCheck %s
\r
3 ; BinaryIntOperation.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
\r
4 ; The test checks that LLVM does not misread binary integer instructions from
\r
5 ; older bitcode files.
\r
7 define void @add(i1 %x1, i8 %x2 ,i16 %x3, i32 %x4, i64 %x5){
\r
9 ; CHECK: %res1 = add i1 %x1, %x1
\r
10 %res1 = add i1 %x1, %x1
\r
12 ; CHECK-NEXT: %res2 = add i8 %x2, %x2
\r
13 %res2 = add i8 %x2, %x2
\r
15 ; CHECK-NEXT: %res3 = add i16 %x3, %x3
\r
16 %res3 = add i16 %x3, %x3
\r
18 ; CHECK-NEXT: %res4 = add i32 %x4, %x4
\r
19 %res4 = add i32 %x4, %x4
\r
21 ; CHECK-NEXT: %res5 = add i64 %x5, %x5
\r
22 %res5 = add i64 %x5, %x5
\r
24 ; CHECK: %res6 = add nuw i1 %x1, %x1
\r
25 %res6 = add nuw i1 %x1, %x1
\r
27 ; CHECK: %res7 = add nsw i1 %x1, %x1
\r
28 %res7 = add nsw i1 %x1, %x1
\r
30 ; CHECK: %res8 = add nuw nsw i1 %x1, %x1
\r
31 %res8 = add nuw nsw i1 %x1, %x1
\r
36 define void @addvec8NuwNsw(<2 x i8> %x1, <3 x i8> %x2 ,<4 x i8> %x3, <8 x i8> %x4, <16 x i8> %x5){
\r
38 ; CHECK: %res1 = add nuw nsw <2 x i8> %x1, %x1
\r
39 %res1 = add nuw nsw <2 x i8> %x1, %x1
\r
41 ; CHECK-NEXT: %res2 = add nuw nsw <3 x i8> %x2, %x2
\r
42 %res2 = add nuw nsw <3 x i8> %x2, %x2
\r
44 ; CHECK-NEXT: %res3 = add nuw nsw <4 x i8> %x3, %x3
\r
45 %res3 = add nuw nsw <4 x i8> %x3, %x3
\r
47 ; CHECK-NEXT: %res4 = add nuw nsw <8 x i8> %x4, %x4
\r
48 %res4 = add nuw nsw <8 x i8> %x4, %x4
\r
50 ; CHECK-NEXT: %res5 = add nuw nsw <16 x i8> %x5, %x5
\r
51 %res5 = add nuw nsw <16 x i8> %x5, %x5
\r
56 define void @addvec16NuwNsw(<2 x i16> %x1, <3 x i16> %x2 ,<4 x i16> %x3, <8 x i16> %x4, <16 x i16> %x5){
\r
58 ; CHECK: %res1 = add nuw nsw <2 x i16> %x1, %x1
\r
59 %res1 = add nuw nsw <2 x i16> %x1, %x1
\r
61 ; CHECK-NEXT: %res2 = add nuw nsw <3 x i16> %x2, %x2
\r
62 %res2 = add nuw nsw <3 x i16> %x2, %x2
\r
64 ; CHECK-NEXT: %res3 = add nuw nsw <4 x i16> %x3, %x3
\r
65 %res3 = add nuw nsw <4 x i16> %x3, %x3
\r
67 ; CHECK-NEXT: %res4 = add nuw nsw <8 x i16> %x4, %x4
\r
68 %res4 = add nuw nsw <8 x i16> %x4, %x4
\r
70 ; CHECK-NEXT: %res5 = add nuw nsw <16 x i16> %x5, %x5
\r
71 %res5 = add nuw nsw <16 x i16> %x5, %x5
\r
76 define void @addvec32NuwNsw(<2 x i32> %x1, <3 x i32> %x2 ,<4 x i32> %x3, <8 x i32> %x4, <16 x i32> %x5){
\r
78 ; CHECK: %res1 = add nuw nsw <2 x i32> %x1, %x1
\r
79 %res1 = add nuw nsw <2 x i32> %x1, %x1
\r
81 ; CHECK-NEXT: %res2 = add nuw nsw <3 x i32> %x2, %x2
\r
82 %res2 = add nuw nsw <3 x i32> %x2, %x2
\r
84 ; CHECK-NEXT: %res3 = add nuw nsw <4 x i32> %x3, %x3
\r
85 %res3 = add nuw nsw <4 x i32> %x3, %x3
\r
87 ; CHECK-NEXT: %res4 = add nuw nsw <8 x i32> %x4, %x4
\r
88 %res4 = add nuw nsw <8 x i32> %x4, %x4
\r
90 ; CHECK-NEXT: %res5 = add nuw nsw <16 x i32> %x5, %x5
\r
91 %res5 = add nuw nsw <16 x i32> %x5, %x5
\r
96 define void @addvec64NuwNsw(<2 x i64> %x1, <3 x i64> %x2 ,<4 x i64> %x3, <8 x i64> %x4, <16 x i64> %x5){
\r
98 ; CHECK: %res1 = add nuw nsw <2 x i64> %x1, %x1
\r
99 %res1 = add nuw nsw <2 x i64> %x1, %x1
\r
101 ; CHECK-NEXT: %res2 = add nuw nsw <3 x i64> %x2, %x2
\r
102 %res2 = add nuw nsw <3 x i64> %x2, %x2
\r
104 ; CHECK-NEXT: %res3 = add nuw nsw <4 x i64> %x3, %x3
\r
105 %res3 = add nuw nsw <4 x i64> %x3, %x3
\r
107 ; CHECK-NEXT: %res4 = add nuw nsw <8 x i64> %x4, %x4
\r
108 %res4 = add nuw nsw <8 x i64> %x4, %x4
\r
110 ; CHECK-NEXT: %res5 = add nuw nsw <16 x i64> %x5, %x5
\r
111 %res5 = add nuw nsw <16 x i64> %x5, %x5
\r
116 define void @sub(i8 %x1){
\r
118 ; CHECK: %res1 = sub i8 %x1, %x1
\r
119 %res1 = sub i8 %x1, %x1
\r
121 ; CHECK: %res2 = sub nuw i8 %x1, %x1
\r
122 %res2 = sub nuw i8 %x1, %x1
\r
124 ; CHECK: %res3 = sub nsw i8 %x1, %x1
\r
125 %res3 = sub nsw i8 %x1, %x1
\r
127 ; CHECK: %res4 = sub nuw nsw i8 %x1, %x1
\r
128 %res4 = sub nuw nsw i8 %x1, %x1
\r
133 define void @mul(i8 %x1){
\r
135 ; CHECK: %res1 = mul i8 %x1, %x1
\r
136 %res1 = mul i8 %x1, %x1
\r
141 define void @udiv(i8 %x1){
\r
143 ; CHECK: %res1 = udiv i8 %x1, %x1
\r
144 %res1 = udiv i8 %x1, %x1
\r
146 ; CHECK-NEXT: %res2 = udiv exact i8 %x1, %x1
\r
147 %res2 = udiv exact i8 %x1, %x1
\r
152 define void @sdiv(i8 %x1){
\r
154 ; CHECK: %res1 = sdiv i8 %x1, %x1
\r
155 %res1 = sdiv i8 %x1, %x1
\r
157 ; CHECK-NEXT: %res2 = sdiv exact i8 %x1, %x1
\r
158 %res2 = sdiv exact i8 %x1, %x1
\r
163 define void @urem(i32 %x1){
\r
165 ; CHECK: %res1 = urem i32 %x1, %x1
\r
166 %res1 = urem i32 %x1, %x1
\r
171 define void @srem(i32 %x1){
\r
173 ; CHECK: %res1 = srem i32 %x1, %x1
\r
174 %res1 = srem i32 %x1, %x1
\r