19201fb9cSMichael Kuperstein; RUN: llvm-dis < %s.bc| FileCheck %s 2*c8eccd11SDuncan P. N. Exon Smith; RUN: verify-uselistorder < %s.bc 39201fb9cSMichael Kuperstein 49201fb9cSMichael Kuperstein; BinaryIntOperation.3.2.ll.bc was generated by passing this file to llvm-as-3.2. 59201fb9cSMichael Kuperstein; The test checks that LLVM does not misread binary integer instructions from 69201fb9cSMichael Kuperstein; older bitcode files. 79201fb9cSMichael Kuperstein 89201fb9cSMichael Kupersteindefine void @add(i1 %x1, i8 %x2 ,i16 %x3, i32 %x4, i64 %x5){ 99201fb9cSMichael Kupersteinentry: 109201fb9cSMichael Kuperstein; CHECK: %res1 = add i1 %x1, %x1 119201fb9cSMichael Kuperstein %res1 = add i1 %x1, %x1 129201fb9cSMichael Kuperstein 139201fb9cSMichael Kuperstein; CHECK-NEXT: %res2 = add i8 %x2, %x2 149201fb9cSMichael Kuperstein %res2 = add i8 %x2, %x2 159201fb9cSMichael Kuperstein 169201fb9cSMichael Kuperstein; CHECK-NEXT: %res3 = add i16 %x3, %x3 179201fb9cSMichael Kuperstein %res3 = add i16 %x3, %x3 189201fb9cSMichael Kuperstein 199201fb9cSMichael Kuperstein; CHECK-NEXT: %res4 = add i32 %x4, %x4 209201fb9cSMichael Kuperstein %res4 = add i32 %x4, %x4 219201fb9cSMichael Kuperstein 229201fb9cSMichael Kuperstein; CHECK-NEXT: %res5 = add i64 %x5, %x5 239201fb9cSMichael Kuperstein %res5 = add i64 %x5, %x5 249201fb9cSMichael Kuperstein 259201fb9cSMichael Kuperstein; CHECK: %res6 = add nuw i1 %x1, %x1 269201fb9cSMichael Kuperstein %res6 = add nuw i1 %x1, %x1 279201fb9cSMichael Kuperstein 289201fb9cSMichael Kuperstein; CHECK: %res7 = add nsw i1 %x1, %x1 299201fb9cSMichael Kuperstein %res7 = add nsw i1 %x1, %x1 309201fb9cSMichael Kuperstein 319201fb9cSMichael Kuperstein; CHECK: %res8 = add nuw nsw i1 %x1, %x1 329201fb9cSMichael Kuperstein %res8 = add nuw nsw i1 %x1, %x1 339201fb9cSMichael Kuperstein 349201fb9cSMichael Kuperstein ret void 359201fb9cSMichael Kuperstein} 369201fb9cSMichael Kuperstein 379201fb9cSMichael Kupersteindefine void @addvec8NuwNsw(<2 x i8> %x1, <3 x i8> %x2 ,<4 x i8> %x3, <8 x i8> %x4, <16 x i8> %x5){ 389201fb9cSMichael Kupersteinentry: 399201fb9cSMichael Kuperstein; CHECK: %res1 = add nuw nsw <2 x i8> %x1, %x1 409201fb9cSMichael Kuperstein %res1 = add nuw nsw <2 x i8> %x1, %x1 419201fb9cSMichael Kuperstein 429201fb9cSMichael Kuperstein; CHECK-NEXT: %res2 = add nuw nsw <3 x i8> %x2, %x2 439201fb9cSMichael Kuperstein %res2 = add nuw nsw <3 x i8> %x2, %x2 449201fb9cSMichael Kuperstein 459201fb9cSMichael Kuperstein; CHECK-NEXT: %res3 = add nuw nsw <4 x i8> %x3, %x3 469201fb9cSMichael Kuperstein %res3 = add nuw nsw <4 x i8> %x3, %x3 479201fb9cSMichael Kuperstein 489201fb9cSMichael Kuperstein; CHECK-NEXT: %res4 = add nuw nsw <8 x i8> %x4, %x4 499201fb9cSMichael Kuperstein %res4 = add nuw nsw <8 x i8> %x4, %x4 509201fb9cSMichael Kuperstein 519201fb9cSMichael Kuperstein; CHECK-NEXT: %res5 = add nuw nsw <16 x i8> %x5, %x5 529201fb9cSMichael Kuperstein %res5 = add nuw nsw <16 x i8> %x5, %x5 539201fb9cSMichael Kuperstein 549201fb9cSMichael Kuperstein ret void 559201fb9cSMichael Kuperstein} 569201fb9cSMichael Kuperstein 579201fb9cSMichael Kupersteindefine void @addvec16NuwNsw(<2 x i16> %x1, <3 x i16> %x2 ,<4 x i16> %x3, <8 x i16> %x4, <16 x i16> %x5){ 589201fb9cSMichael Kupersteinentry: 599201fb9cSMichael Kuperstein; CHECK: %res1 = add nuw nsw <2 x i16> %x1, %x1 609201fb9cSMichael Kuperstein %res1 = add nuw nsw <2 x i16> %x1, %x1 619201fb9cSMichael Kuperstein 629201fb9cSMichael Kuperstein; CHECK-NEXT: %res2 = add nuw nsw <3 x i16> %x2, %x2 639201fb9cSMichael Kuperstein %res2 = add nuw nsw <3 x i16> %x2, %x2 649201fb9cSMichael Kuperstein 659201fb9cSMichael Kuperstein; CHECK-NEXT: %res3 = add nuw nsw <4 x i16> %x3, %x3 669201fb9cSMichael Kuperstein %res3 = add nuw nsw <4 x i16> %x3, %x3 679201fb9cSMichael Kuperstein 689201fb9cSMichael Kuperstein; CHECK-NEXT: %res4 = add nuw nsw <8 x i16> %x4, %x4 699201fb9cSMichael Kuperstein %res4 = add nuw nsw <8 x i16> %x4, %x4 709201fb9cSMichael Kuperstein 719201fb9cSMichael Kuperstein; CHECK-NEXT: %res5 = add nuw nsw <16 x i16> %x5, %x5 729201fb9cSMichael Kuperstein %res5 = add nuw nsw <16 x i16> %x5, %x5 739201fb9cSMichael Kuperstein 749201fb9cSMichael Kuperstein ret void 759201fb9cSMichael Kuperstein} 769201fb9cSMichael Kuperstein 779201fb9cSMichael Kupersteindefine void @addvec32NuwNsw(<2 x i32> %x1, <3 x i32> %x2 ,<4 x i32> %x3, <8 x i32> %x4, <16 x i32> %x5){ 789201fb9cSMichael Kupersteinentry: 799201fb9cSMichael Kuperstein; CHECK: %res1 = add nuw nsw <2 x i32> %x1, %x1 809201fb9cSMichael Kuperstein %res1 = add nuw nsw <2 x i32> %x1, %x1 819201fb9cSMichael Kuperstein 829201fb9cSMichael Kuperstein; CHECK-NEXT: %res2 = add nuw nsw <3 x i32> %x2, %x2 839201fb9cSMichael Kuperstein %res2 = add nuw nsw <3 x i32> %x2, %x2 849201fb9cSMichael Kuperstein 859201fb9cSMichael Kuperstein; CHECK-NEXT: %res3 = add nuw nsw <4 x i32> %x3, %x3 869201fb9cSMichael Kuperstein %res3 = add nuw nsw <4 x i32> %x3, %x3 879201fb9cSMichael Kuperstein 889201fb9cSMichael Kuperstein; CHECK-NEXT: %res4 = add nuw nsw <8 x i32> %x4, %x4 899201fb9cSMichael Kuperstein %res4 = add nuw nsw <8 x i32> %x4, %x4 909201fb9cSMichael Kuperstein 919201fb9cSMichael Kuperstein; CHECK-NEXT: %res5 = add nuw nsw <16 x i32> %x5, %x5 929201fb9cSMichael Kuperstein %res5 = add nuw nsw <16 x i32> %x5, %x5 939201fb9cSMichael Kuperstein 949201fb9cSMichael Kuperstein ret void 959201fb9cSMichael Kuperstein} 969201fb9cSMichael Kuperstein 979201fb9cSMichael Kupersteindefine void @addvec64NuwNsw(<2 x i64> %x1, <3 x i64> %x2 ,<4 x i64> %x3, <8 x i64> %x4, <16 x i64> %x5){ 989201fb9cSMichael Kupersteinentry: 999201fb9cSMichael Kuperstein; CHECK: %res1 = add nuw nsw <2 x i64> %x1, %x1 1009201fb9cSMichael Kuperstein %res1 = add nuw nsw <2 x i64> %x1, %x1 1019201fb9cSMichael Kuperstein 1029201fb9cSMichael Kuperstein; CHECK-NEXT: %res2 = add nuw nsw <3 x i64> %x2, %x2 1039201fb9cSMichael Kuperstein %res2 = add nuw nsw <3 x i64> %x2, %x2 1049201fb9cSMichael Kuperstein 1059201fb9cSMichael Kuperstein; CHECK-NEXT: %res3 = add nuw nsw <4 x i64> %x3, %x3 1069201fb9cSMichael Kuperstein %res3 = add nuw nsw <4 x i64> %x3, %x3 1079201fb9cSMichael Kuperstein 1089201fb9cSMichael Kuperstein; CHECK-NEXT: %res4 = add nuw nsw <8 x i64> %x4, %x4 1099201fb9cSMichael Kuperstein %res4 = add nuw nsw <8 x i64> %x4, %x4 1109201fb9cSMichael Kuperstein 1119201fb9cSMichael Kuperstein; CHECK-NEXT: %res5 = add nuw nsw <16 x i64> %x5, %x5 1129201fb9cSMichael Kuperstein %res5 = add nuw nsw <16 x i64> %x5, %x5 1139201fb9cSMichael Kuperstein 1149201fb9cSMichael Kuperstein ret void 1159201fb9cSMichael Kuperstein} 1169201fb9cSMichael Kuperstein 1179201fb9cSMichael Kupersteindefine void @sub(i8 %x1){ 1189201fb9cSMichael Kupersteinentry: 1199201fb9cSMichael Kuperstein; CHECK: %res1 = sub i8 %x1, %x1 1209201fb9cSMichael Kuperstein %res1 = sub i8 %x1, %x1 1219201fb9cSMichael Kuperstein 1229201fb9cSMichael Kuperstein; CHECK: %res2 = sub nuw i8 %x1, %x1 1239201fb9cSMichael Kuperstein %res2 = sub nuw i8 %x1, %x1 1249201fb9cSMichael Kuperstein 1259201fb9cSMichael Kuperstein; CHECK: %res3 = sub nsw i8 %x1, %x1 1269201fb9cSMichael Kuperstein %res3 = sub nsw i8 %x1, %x1 1279201fb9cSMichael Kuperstein 1289201fb9cSMichael Kuperstein; CHECK: %res4 = sub nuw nsw i8 %x1, %x1 1299201fb9cSMichael Kuperstein %res4 = sub nuw nsw i8 %x1, %x1 1309201fb9cSMichael Kuperstein 1319201fb9cSMichael Kuperstein ret void 1329201fb9cSMichael Kuperstein} 1339201fb9cSMichael Kuperstein 1349201fb9cSMichael Kupersteindefine void @mul(i8 %x1){ 1359201fb9cSMichael Kupersteinentry: 1369201fb9cSMichael Kuperstein; CHECK: %res1 = mul i8 %x1, %x1 1379201fb9cSMichael Kuperstein %res1 = mul i8 %x1, %x1 1389201fb9cSMichael Kuperstein 1399201fb9cSMichael Kuperstein ret void 1409201fb9cSMichael Kuperstein} 1419201fb9cSMichael Kuperstein 1429201fb9cSMichael Kupersteindefine void @udiv(i8 %x1){ 1439201fb9cSMichael Kupersteinentry: 1449201fb9cSMichael Kuperstein; CHECK: %res1 = udiv i8 %x1, %x1 1459201fb9cSMichael Kuperstein %res1 = udiv i8 %x1, %x1 1469201fb9cSMichael Kuperstein 1479201fb9cSMichael Kuperstein; CHECK-NEXT: %res2 = udiv exact i8 %x1, %x1 1489201fb9cSMichael Kuperstein %res2 = udiv exact i8 %x1, %x1 1499201fb9cSMichael Kuperstein 1509201fb9cSMichael Kuperstein ret void 1519201fb9cSMichael Kuperstein} 1529201fb9cSMichael Kuperstein 1539201fb9cSMichael Kupersteindefine void @sdiv(i8 %x1){ 1549201fb9cSMichael Kupersteinentry: 1559201fb9cSMichael Kuperstein; CHECK: %res1 = sdiv i8 %x1, %x1 1569201fb9cSMichael Kuperstein %res1 = sdiv i8 %x1, %x1 1579201fb9cSMichael Kuperstein 1589201fb9cSMichael Kuperstein; CHECK-NEXT: %res2 = sdiv exact i8 %x1, %x1 1599201fb9cSMichael Kuperstein %res2 = sdiv exact i8 %x1, %x1 1609201fb9cSMichael Kuperstein 1619201fb9cSMichael Kuperstein ret void 1629201fb9cSMichael Kuperstein} 1639201fb9cSMichael Kuperstein 1649201fb9cSMichael Kupersteindefine void @urem(i32 %x1){ 1659201fb9cSMichael Kupersteinentry: 1669201fb9cSMichael Kuperstein; CHECK: %res1 = urem i32 %x1, %x1 1679201fb9cSMichael Kuperstein %res1 = urem i32 %x1, %x1 1689201fb9cSMichael Kuperstein 1699201fb9cSMichael Kuperstein ret void 1709201fb9cSMichael Kuperstein} 1719201fb9cSMichael Kuperstein 1729201fb9cSMichael Kupersteindefine void @srem(i32 %x1){ 1739201fb9cSMichael Kupersteinentry: 1749201fb9cSMichael Kuperstein; CHECK: %res1 = srem i32 %x1, %x1 1759201fb9cSMichael Kuperstein %res1 = srem i32 %x1, %x1 1769201fb9cSMichael Kuperstein 1779201fb9cSMichael Kuperstein ret void 1789201fb9cSMichael Kuperstein} 179