1 ; RUN: rm -rf %t && split-file %s %t
3 ; RUN: not llvm-as < %t/not_a_constant.ll -o /dev/null 2>&1 | FileCheck -check-prefix=NOT_A_CONSTANT %s
4 ; RUN: not llvm-as < %t/not_a_sclar.ll -o /dev/null 2>&1 | FileCheck -check-prefix=NOT_A_SCALAR %s
5 ; RUN: not llvm-as < %t/not_a_vector.ll -o /dev/null 2>&1 | FileCheck -check-prefix=NOT_A_VECTOR %s
6 ; RUN: not llvm-as < %t/wrong_explicit_type.ll -o /dev/null 2>&1 | FileCheck -check-prefix=WRONG_EXPLICIT_TYPE %s
7 ; RUN: not llvm-as < %t/wrong_implicit_type.ll -o /dev/null 2>&1 | FileCheck -check-prefix=WRONG_IMPLICIT_TYPE %s
10 ; NOT_A_CONSTANT: error: expected instruction opcode
11 define <4 x i32> @not_a_constant(i32 %a) {
12 %splat = splat (i32 %a)
13 ret <vscale x 4 x i32> %splat
17 ; NOT_A_SCALAR: error: constant expression type mismatch: got type '<1 x i32>' but expected 'i32'
18 define <4 x i32> @not_a_scalar() {
19 ret <4 x i32> splat (<1 x i32> <i32 7>)
23 ; NOT_A_VECTOR: error: vector constant must have vector type
24 define <4 x i32> @not_a_vector() {
28 ;--- wrong_explicit_type.ll
29 ; WRONG_EXPLICIT_TYPE: error: constant expression type mismatch: got type 'i8' but expected 'i32'
30 define <4 x i32> @wrong_explicit_type() {
31 ret <4 x i32> splat (i8 7)
34 ;--- wrong_implicit_type.ll
35 ; WRONG_IMPLICIT_TYPE: error: constant expression type mismatch: got type 'i8' but expected 'i32'
36 define void @wrong_implicit_type(<4 x i32> %a) {
37 %add = add <4 x i32> %a, splat (i8 7)