diff --git a/llvm/lib/Target/RISCV/RISCVInstrFormats.td b/llvm/lib/Target/RISCV/RISCVInstrFormats.td index 8d56637d8b281..088a6923fadb1 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrFormats.td +++ b/llvm/lib/Target/RISCV/RISCVInstrFormats.td @@ -99,6 +99,8 @@ def VMConstraint : RISCVVConstraint<0b100>; // // * vcompress: The destination vector register group cannot overlap the // source vector register group or the source mask register +def WidenVNoMask : RISCVVConstraint; def WidenV : RISCVVConstraint; diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td b/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td index 6981daa75d092..affe3a8476753 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td @@ -208,7 +208,7 @@ let Predicates = [HasVendorXSfvqmaccdod], DecoderNamespace = "XSfvector", } let Predicates = [HasVendorXSfvqmaccqoq], DecoderNamespace = "XSfvector", - DestEEW = EEWSEWx4, RVVConstraint=WidenV in { + DestEEW = EEWSEWx4, RVVConstraint=WidenVNoMask in { def VQMACCU_4x8x4 : CustomSiFiveVMACC<0b111100, OPMVV, "sf.vqmaccu.4x8x4">; def VQMACC_4x8x4 : CustomSiFiveVMACC<0b111101, OPMVV, "sf.vqmacc.4x8x4">; def VQMACCUS_4x8x4 : CustomSiFiveVMACC<0b111110, OPMVV, "sf.vqmaccus.4x8x4">; @@ -216,7 +216,7 @@ let Predicates = [HasVendorXSfvqmaccqoq], DecoderNamespace = "XSfvector", } let Predicates = [HasVendorXSfvfwmaccqqq], DecoderNamespace = "XSfvector", - DestEEW = EEWSEWx2, RVVConstraint=WidenV in { + DestEEW = EEWSEWx2, RVVConstraint=WidenVNoMask in { def VFWMACC_4x4x4 : CustomSiFiveVMACC<0b111100, OPFVV, "sf.vfwmacc.4x4x4">; } diff --git a/llvm/test/MC/RISCV/rvv/xsfvfwmacc.s b/llvm/test/MC/RISCV/rvv/xsfvfwmacc.s index a9843c350fc80..5168c42da70d9 100644 --- a/llvm/test/MC/RISCV/rvv/xsfvfwmacc.s +++ b/llvm/test/MC/RISCV/rvv/xsfvfwmacc.s @@ -13,3 +13,9 @@ sf.vfwmacc.4x4x4 v8, v4, v20 # CHECK-ENCODING: [0x5b,0x14,0x42,0xf3] # CHECK-ERROR: instruction requires the following: 'XSfvfwmaccqqq' (SiFive Matrix Multiply Accumulate Instruction and 4-by-4)) # CHECK-UNKNOWN: f342145b + +sf.vfwmacc.4x4x4 v0, v4, v20 +# CHECK-INST: sf.vfwmacc.4x4x4 v0, v4, v20 +# CHECK-ENCODING: [0x5b,0x10,0x42,0xf3] +# CHECK-ERROR: instruction requires the following: 'XSfvfwmaccqqq' (SiFive Matrix Multiply Accumulate Instruction and 4-by-4)) +# CHECK-UNKNOWN: f342105b diff --git a/llvm/test/MC/RISCV/rvv/xsfvqmacc.s b/llvm/test/MC/RISCV/rvv/xsfvqmacc.s index 81703c847d74e..d7d3cba41cbc6 100644 --- a/llvm/test/MC/RISCV/rvv/xsfvqmacc.s +++ b/llvm/test/MC/RISCV/rvv/xsfvqmacc.s @@ -55,3 +55,9 @@ sf.vqmaccsu.4x8x4 v8, v4, v20 # CHECK-ENCODING: [0x5b,0x24,0x42,0xff] # CHECK-ERROR: instruction requires the following: 'XSfvqmaccqoq' (SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4)) # CHECK-UNKNOWN: ff42245b + +sf.vqmaccu.4x8x4 v0, v4, v20 +# CHECK-INST: sf.vqmaccu.4x8x4 v0, v4, v20 +# CHECK-ENCODING: [0x5b,0x20,0x42,0xf3] +# CHECK-ERROR: instruction requires the following: 'XSfvqmaccqoq' (SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4)) +# CHECK-UNKNOWN: f342205b