1 ; RUN: split-file %s %t --leading-lines
2 ; RUN: not llvm-as < %t/scalable_fp_vector_atomicrmw_xchg.ll 2>&1 | FileCheck -check-prefix=ERR0 %s
3 ; RUN: not llvm-as < %t/scalable_int_vector_atomicrmw_xchg.ll 2>&1 | FileCheck -check-prefix=ERR1 %s
4 ; RUN: not llvm-as < %t/scalable_ptr_vector_atomicrmw_xchg.ll 2>&1 | FileCheck -check-prefix=ERR2 %s
5 ; RUN: not llvm-as < %t/scalable_fp_vector_atomicrmw_fadd.ll 2>&1 | FileCheck -check-prefix=ERR3 %s
6 ; RUN: not llvm-as < %t/scalable_int_vector_atomicrmw_add.ll 2>&1 | FileCheck -check-prefix=ERR4 %s
8 ;--- scalable_fp_vector_atomicrmw_xchg.ll
9 define <vscale x 2 x half> @scalable_fp_vector_atomicrmw_xchg(ptr %x, <vscale x 2 x half> %val) {
10 ; ERR0: :41: error: atomicrmw operand may not be scalable
11 %atomic.xchg = atomicrmw xchg ptr %x, <vscale x 2 x half> %val seq_cst
12 ret <vscale x 2 x half> %atomic.xchg
15 ;--- scalable_int_vector_atomicrmw_xchg.ll
16 define <vscale x 2 x i16> @scalable_int_vector_atomicrmw_xchg(ptr %x, <vscale x 2 x i16> %val) {
17 ; ERR1: :41: error: atomicrmw operand may not be scalable
18 %atomic.xchg = atomicrmw xchg ptr %x, <vscale x 2 x i16> %val seq_cst
19 ret <vscale x 2 x i16> %atomic.xchg
22 ;--- scalable_ptr_vector_atomicrmw_xchg.ll
23 define <vscale x 2 x ptr> @scalable_ptr_vector_atomicrmw_xchg(ptr %x, <vscale x 2 x ptr> %val) {
24 ; ERR2: :41: error: atomicrmw operand may not be scalable
25 %atomic.xchg = atomicrmw xchg ptr %x, <vscale x 2 x ptr> %val seq_cst
26 ret <vscale x 2 x ptr> %atomic.xchg
29 ;--- scalable_fp_vector_atomicrmw_fadd.ll
30 define <vscale x 2 x half> @scalable_fp_vector_atomicrmw_fadd(ptr %x, <vscale x 2 x half> %val) {
31 ; ERR3: :41: error: atomicrmw operand may not be scalable
32 %atomic.fadd = atomicrmw fadd ptr %x, <vscale x 2 x half> %val seq_cst
33 ret <vscale x 2 x half> %atomic.fadd
36 ;--- scalable_int_vector_atomicrmw_add.ll
37 define <vscale x 2 x i16> @scalable_int_vector_atomicrmw_add(ptr %x, <vscale x 2 x i16> %val) {
38 ; ERR4: :39: error: atomicrmw operand may not be scalable
39 %atomic.add = atomicrmw add ptr %x, <vscale x 2 x i16> %val seq_cst
40 ret <vscale x 2 x i16> %atomic.add