brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 464250d Raw
41 lines · plain
1; RUN: rm -rf %t && split-file %s %t2 3; RUN: not llvm-as < %t/not_a_constant.ll -o /dev/null 2>&1 | FileCheck -check-prefix=NOT_A_CONSTANT %s4; RUN: not llvm-as < %t/not_a_sclar.ll -o /dev/null 2>&1 | FileCheck -check-prefix=NOT_A_SCALAR %s5; RUN: not llvm-as < %t/not_a_vector.ll -o /dev/null 2>&1 | FileCheck -check-prefix=NOT_A_VECTOR %s6; RUN: not llvm-as < %t/wrong_explicit_type.ll -o /dev/null 2>&1 | FileCheck -check-prefix=WRONG_EXPLICIT_TYPE %s7; RUN: not llvm-as < %t/wrong_implicit_type.ll -o /dev/null 2>&1 | FileCheck -check-prefix=WRONG_IMPLICIT_TYPE %s8 9;--- not_a_constant.ll10; NOT_A_CONSTANT: error: expected instruction opcode11define <4 x i32> @not_a_constant(i32 %a) {12  %splat = splat (i32 %a)13  ret <vscale x 4 x i32> %splat14}15 16;--- not_a_sclar.ll17; NOT_A_SCALAR: error: constant expression type mismatch: got type '<1 x i32>' but expected 'i32'18define <4 x i32> @not_a_scalar() {19  ret <4 x i32> splat (<1 x i32> <i32 7>)20}21 22;--- not_a_vector.ll23; NOT_A_VECTOR: error: vector constant must have vector type24define <4 x i32> @not_a_vector() {25  ret i32 splat (i32 7)26}27 28;--- wrong_explicit_type.ll29; WRONG_EXPLICIT_TYPE: error: constant expression type mismatch: got type 'i8' but expected 'i32'30define <4 x i32> @wrong_explicit_type() {31  ret <4 x i32> splat (i8 7)32}33 34;--- wrong_implicit_type.ll35; WRONG_IMPLICIT_TYPE: error: constant expression type mismatch: got type 'i8' but expected 'i32'36define void @wrong_implicit_type(<4 x i32> %a) {37  %add = add <4 x i32> %a, splat (i8 7)38  ret void39}40 41