1 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
2 ; Check handling of bswap with unsupported sizes.
4 declare i8 @llvm.bswap.i8(i8)
5 declare <2 x i8> @llvm.bswap.v2i8(<2 x i8>)
7 declare i12 @llvm.bswap.i12(i12)
8 declare <2 x i12> @llvm.bswap.v2i12(<2 x i12>)
10 declare i18 @llvm.bswap.i18(i18)
11 declare <2 x i18> @llvm.bswap.v2i18(<2 x i18>)
13 define i8 @bswap_i8(i8 %arg) {
14 ; CHECK: bswap must be an even number of bytes
15 ; CHECK-NEXT: %res = call i8 @llvm.bswap.i8(i8 %arg)
16 %res = call i8 @llvm.bswap.i8(i8 %arg)
20 define <2 x i8> @bswap_v2i8(<2 x i8> %arg) {
21 ; CHECK: bswap must be an even number of bytes
22 ; CHECK-NEXT: %res = call <2 x i8> @llvm.bswap.v2i8(<2 x i8> %arg)
23 %res = call <2 x i8> @llvm.bswap.v2i8(<2 x i8> %arg)
27 define i12 @bswap_i12(i12 %arg) {
28 ; CHECK: bswap must be an even number of bytes
29 ; CHECK-NEXT: %res = call i12 @llvm.bswap.i12(i12 %arg)
30 %res = call i12 @llvm.bswap.i12(i12 %arg)
34 define <2 x i12> @bswap_v2i12(<2 x i12> %arg) {
35 ; CHECK: bswap must be an even number of bytes
36 ; CHECK-NEXT: %res = call <2 x i12> @llvm.bswap.v2i12(<2 x i12> %arg)
37 %res = call <2 x i12> @llvm.bswap.v2i12(<2 x i12> %arg)
41 define i18 @bswap_i18(i18 %arg) {
42 ; CHECK: bswap must be an even number of bytes
43 ; CHECK-NEXT: %res = call i18 @llvm.bswap.i18(i18 %arg)
44 %res = call i18 @llvm.bswap.i18(i18 %arg)
48 define <2 x i18> @bswap_v2i18(<2 x i18> %arg) {
49 ; CHECK: bswap must be an even number of bytes
50 ; CHECK-NEXT: %res = call <2 x i18> @llvm.bswap.v2i18(<2 x i18> %arg)
51 %res = call <2 x i18> @llvm.bswap.v2i18(<2 x i18> %arg)