1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \ 2# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 3# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \ 4# RUN: | FileCheck %s --check-prefix=CHECK-ERROR 5# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \ 6# RUN: | llvm-objdump -d --mattr=+v - \ 7# RUN: | FileCheck %s --check-prefix=CHECK-INST 8# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \ 9# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN 10 11vredsum.vs v8, v4, v20, v0.t 12# CHECK-INST: vredsum.vs v8, v4, v20, v0.t 13# CHECK-ENCODING: [0x57,0x24,0x4a,0x00] 14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 15# CHECK-UNKNOWN: 004a2457 <unknown> 16 17vredsum.vs v8, v4, v20 18# CHECK-INST: vredsum.vs v8, v4, v20 19# CHECK-ENCODING: [0x57,0x24,0x4a,0x02] 20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 21# CHECK-UNKNOWN: 024a2457 <unknown> 22 23vredmaxu.vs v8, v4, v20, v0.t 24# CHECK-INST: vredmaxu.vs v8, v4, v20, v0.t 25# CHECK-ENCODING: [0x57,0x24,0x4a,0x18] 26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 27# CHECK-UNKNOWN: 184a2457 <unknown> 28 29vredmaxu.vs v8, v4, v20 30# CHECK-INST: vredmaxu.vs v8, v4, v20 31# CHECK-ENCODING: [0x57,0x24,0x4a,0x1a] 32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 33# CHECK-UNKNOWN: 1a4a2457 <unknown> 34 35vredmax.vs v8, v4, v20, v0.t 36# CHECK-INST: vredmax.vs v8, v4, v20, v0.t 37# CHECK-ENCODING: [0x57,0x24,0x4a,0x1c] 38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 39# CHECK-UNKNOWN: 1c4a2457 <unknown> 40 41vredmax.vs v8, v4, v20 42# CHECK-INST: vredmax.vs v8, v4, v20 43# CHECK-ENCODING: [0x57,0x24,0x4a,0x1e] 44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 45# CHECK-UNKNOWN: 1e4a2457 <unknown> 46 47vredminu.vs v8, v4, v20, v0.t 48# CHECK-INST: vredminu.vs v8, v4, v20, v0.t 49# CHECK-ENCODING: [0x57,0x24,0x4a,0x10] 50# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 51# CHECK-UNKNOWN: 104a2457 <unknown> 52 53vredminu.vs v8, v4, v20 54# CHECK-INST: vredminu.vs v8, v4, v20 55# CHECK-ENCODING: [0x57,0x24,0x4a,0x12] 56# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 57# CHECK-UNKNOWN: 124a2457 <unknown> 58 59vredmin.vs v8, v4, v20, v0.t 60# CHECK-INST: vredmin.vs v8, v4, v20, v0.t 61# CHECK-ENCODING: [0x57,0x24,0x4a,0x14] 62# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 63# CHECK-UNKNOWN: 144a2457 <unknown> 64 65vredmin.vs v8, v4, v20 66# CHECK-INST: vredmin.vs v8, v4, v20 67# CHECK-ENCODING: [0x57,0x24,0x4a,0x16] 68# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 69# CHECK-UNKNOWN: 164a2457 <unknown> 70 71vredand.vs v8, v4, v20, v0.t 72# CHECK-INST: vredand.vs v8, v4, v20, v0.t 73# CHECK-ENCODING: [0x57,0x24,0x4a,0x04] 74# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 75# CHECK-UNKNOWN: 044a2457 <unknown> 76 77vredand.vs v8, v4, v20 78# CHECK-INST: vredand.vs v8, v4, v20 79# CHECK-ENCODING: [0x57,0x24,0x4a,0x06] 80# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 81# CHECK-UNKNOWN: 064a2457 <unknown> 82 83vredor.vs v8, v4, v20, v0.t 84# CHECK-INST: vredor.vs v8, v4, v20, v0.t 85# CHECK-ENCODING: [0x57,0x24,0x4a,0x08] 86# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 87# CHECK-UNKNOWN: 084a2457 <unknown> 88 89vredor.vs v8, v4, v20 90# CHECK-INST: vredor.vs v8, v4, v20 91# CHECK-ENCODING: [0x57,0x24,0x4a,0x0a] 92# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 93# CHECK-UNKNOWN: 0a4a2457 <unknown> 94 95vredxor.vs v8, v4, v20, v0.t 96# CHECK-INST: vredxor.vs v8, v4, v20, v0.t 97# CHECK-ENCODING: [0x57,0x24,0x4a,0x0c] 98# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 99# CHECK-UNKNOWN: 0c4a2457 <unknown> 100 101vredxor.vs v8, v4, v20 102# CHECK-INST: vredxor.vs v8, v4, v20 103# CHECK-ENCODING: [0x57,0x24,0x4a,0x0e] 104# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 105# CHECK-UNKNOWN: 0e4a2457 <unknown> 106 107vwredsumu.vs v8, v4, v20, v0.t 108# CHECK-INST: vwredsumu.vs v8, v4, v20, v0.t 109# CHECK-ENCODING: [0x57,0x04,0x4a,0xc0] 110# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 111# CHECK-UNKNOWN: c04a0457 <unknown> 112 113vwredsumu.vs v8, v4, v20 114# CHECK-INST: vwredsumu.vs v8, v4, v20 115# CHECK-ENCODING: [0x57,0x04,0x4a,0xc2] 116# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 117# CHECK-UNKNOWN: c24a0457 <unknown> 118 119vwredsum.vs v8, v4, v20, v0.t 120# CHECK-INST: vwredsum.vs v8, v4, v20, v0.t 121# CHECK-ENCODING: [0x57,0x04,0x4a,0xc4] 122# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 123# CHECK-UNKNOWN: c44a0457 <unknown> 124 125vwredsum.vs v8, v4, v20 126# CHECK-INST: vwredsum.vs v8, v4, v20 127# CHECK-ENCODING: [0x57,0x04,0x4a,0xc6] 128# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 129# CHECK-UNKNOWN: c64a0457 <unknown> 130 131vredsum.vs v0, v4, v20, v0.t 132# CHECK-INST: vredsum.vs v0, v4, v20, v0.t 133# CHECK-ENCODING: [0x57,0x20,0x4a,0x00] 134# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}} 135# CHECK-UNKNOWN: 004a2057 <unknown> 136