diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoV.td b/llvm/lib/Target/RISCV/RISCVInstrInfoV.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoV.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoV.td @@ -508,19 +508,19 @@ def VSOXEI32_V : VIndexedStore; def VSOXEI64_V : VIndexedStore; -defm VL1R : VWholeLoad<1, "vl1r", VR>; -defm VL2R : VWholeLoad<2, "vl2r", VRM2>; -defm VL4R : VWholeLoad<4, "vl4r", VRM4>; -defm VL8R : VWholeLoad<8, "vl8r", VRM8>; +defm VL1R : VWholeLoad<0, "vl1r", VR>; +defm VL2R : VWholeLoad<1, "vl2r", VRM2>; +defm VL4R : VWholeLoad<3, "vl4r", VRM4>; +defm VL8R : VWholeLoad<7, "vl8r", VRM8>; def : InstAlias<"vl1r.v $vd, (${rs1})", (VL1RE8_V VR:$vd, GPR:$rs1)>; def : InstAlias<"vl2r.v $vd, (${rs1})", (VL2RE8_V VRM2:$vd, GPR:$rs1)>; def : InstAlias<"vl4r.v $vd, (${rs1})", (VL4RE8_V VRM4:$vd, GPR:$rs1)>; def : InstAlias<"vl8r.v $vd, (${rs1})", (VL8RE8_V VRM8:$vd, GPR:$rs1)>; -def VS1R_V : VWholeStore<1, "vs1r.v", VR>; -def VS2R_V : VWholeStore<2, "vs2r.v", VRM2>; -def VS4R_V : VWholeStore<4, "vs4r.v", VRM4>; -def VS8R_V : VWholeStore<8, "vs8r.v", VRM8>; +def VS1R_V : VWholeStore<0, "vs1r.v", VR>; +def VS2R_V : VWholeStore<1, "vs2r.v", VRM2>; +def VS4R_V : VWholeStore<3, "vs4r.v", VRM4>; +def VS8R_V : VWholeStore<7, "vs8r.v", VRM8>; // Vector Single-Width Integer Add and Subtract defm VADD_V : VALU_IV_V_X_I<"vadd", 0b000000>; diff --git a/llvm/test/MC/RISCV/rvv/aliases.s b/llvm/test/MC/RISCV/rvv/aliases.s --- a/llvm/test/MC/RISCV/rvv/aliases.s +++ b/llvm/test/MC/RISCV/rvv/aliases.s @@ -54,17 +54,17 @@ # ALIAS: vmnot.m v0, v1 # encoding: [0x57,0xa0,0x10,0x76] # NO-ALIAS: vmnand.mm v0, v1, v1 # encoding: [0x57,0xa0,0x10,0x76] vmnot.m v0, v1 -# ALIAS: vl1r.v v0, (a0) # encoding: [0x07,0x00,0x85,0x22] -# NO-ALIAS: vl1re8.v v0, (a0) # encoding: [0x07,0x00,0x85,0x22] +# ALIAS: vl1r.v v0, (a0) # encoding: [0x07,0x00,0x85,0x02] +# NO-ALIAS: vl1re8.v v0, (a0) # encoding: [0x07,0x00,0x85,0x02] vl1r.v v0, (a0) -# ALIAS: vl2r.v v0, (a0) # encoding: [0x07,0x00,0x85,0x42] -# NO-ALIAS: vl2re8.v v0, (a0) # encoding: [0x07,0x00,0x85,0x42] +# ALIAS: vl2r.v v0, (a0) # encoding: [0x07,0x00,0x85,0x22] +# NO-ALIAS: vl2re8.v v0, (a0) # encoding: [0x07,0x00,0x85,0x22] vl2r.v v0, (a0) -# ALIAS: vl4r.v v0, (a0) # encoding: [0x07,0x00,0x85,0x82] -# NO-ALIAS: vl4re8.v v0, (a0) # encoding: [0x07,0x00,0x85,0x82] +# ALIAS: vl4r.v v0, (a0) # encoding: [0x07,0x00,0x85,0x62] +# NO-ALIAS: vl4re8.v v0, (a0) # encoding: [0x07,0x00,0x85,0x62] vl4r.v v0, (a0) -# ALIAS: vl8r.v v0, (a0) # encoding: [0x07,0x00,0x85,0x02] -# NO-ALIAS: vl8re8.v v0, (a0) # encoding: [0x07,0x00,0x85,0x02] +# ALIAS: vl8r.v v0, (a0) # encoding: [0x07,0x00,0x85,0xe2] +# NO-ALIAS: vl8re8.v v0, (a0) # encoding: [0x07,0x00,0x85,0xe2] vl8r.v v0, (a0) # ALIAS: vneg.v v2, v1, v0.t # encoding: [0x57,0x41,0x10,0x0c] # NO-ALIAS: vrsub.vx v2, v1, zero, v0.t # encoding: [0x57,0x41,0x10,0x0c] diff --git a/llvm/test/MC/RISCV/rvv/load.s b/llvm/test/MC/RISCV/rvv/load.s --- a/llvm/test/MC/RISCV/rvv/load.s +++ b/llvm/test/MC/RISCV/rvv/load.s @@ -256,96 +256,96 @@ vl1re8.v v8, (a0) # CHECK-INST: vl1re8.v v8, (a0) -# CHECK-ENCODING: [0x07,0x04,0x85,0x22] +# CHECK-ENCODING: [0x07,0x04,0x85,0x02] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 04 85 22 +# CHECK-UNKNOWN: 07 04 85 02 vl1re16.v v8, (a0) # CHECK-INST: vl1re16.v v8, (a0) -# CHECK-ENCODING: [0x07,0x54,0x85,0x22] +# CHECK-ENCODING: [0x07,0x54,0x85,0x02] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 54 85 22 +# CHECK-UNKNOWN: 07 54 85 02 vl1re32.v v8, (a0) # CHECK-INST: vl1re32.v v8, (a0) -# CHECK-ENCODING: [0x07,0x64,0x85,0x22] +# CHECK-ENCODING: [0x07,0x64,0x85,0x02] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 64 85 22 +# CHECK-UNKNOWN: 07 64 85 02 vl1re64.v v8, (a0) # CHECK-INST: vl1re64.v v8, (a0) -# CHECK-ENCODING: [0x07,0x74,0x85,0x22] +# CHECK-ENCODING: [0x07,0x74,0x85,0x02] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 74 85 22 +# CHECK-UNKNOWN: 07 74 85 02 vl2re8.v v8, (a0) # CHECK-INST: vl2re8.v v8, (a0) -# CHECK-ENCODING: [0x07,0x04,0x85,0x42] +# CHECK-ENCODING: [0x07,0x04,0x85,0x22] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 04 85 42 +# CHECK-UNKNOWN: 07 04 85 22 vl2re16.v v8, (a0) # CHECK-INST: vl2re16.v v8, (a0) -# CHECK-ENCODING: [0x07,0x54,0x85,0x42] +# CHECK-ENCODING: [0x07,0x54,0x85,0x22] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 54 85 42 +# CHECK-UNKNOWN: 07 54 85 22 vl2re32.v v8, (a0) # CHECK-INST: vl2re32.v v8, (a0) -# CHECK-ENCODING: [0x07,0x64,0x85,0x42] +# CHECK-ENCODING: [0x07,0x64,0x85,0x22] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 64 85 42 +# CHECK-UNKNOWN: 07 64 85 22 vl2re64.v v8, (a0) # CHECK-INST: vl2re64.v v8, (a0) -# CHECK-ENCODING: [0x07,0x74,0x85,0x42] +# CHECK-ENCODING: [0x07,0x74,0x85,0x22] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 74 85 42 +# CHECK-UNKNOWN: 07 74 85 22 vl4re8.v v8, (a0) # CHECK-INST: vl4re8.v v8, (a0) -# CHECK-ENCODING: [0x07,0x04,0x85,0x82] +# CHECK-ENCODING: [0x07,0x04,0x85,0x62] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 04 85 82 +# CHECK-UNKNOWN: 07 04 85 62 vl4re16.v v8, (a0) # CHECK-INST: vl4re16.v v8, (a0) -# CHECK-ENCODING: [0x07,0x54,0x85,0x82] +# CHECK-ENCODING: [0x07,0x54,0x85,0x62] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 54 85 82 +# CHECK-UNKNOWN: 07 54 85 62 vl4re32.v v8, (a0) # CHECK-INST: vl4re32.v v8, (a0) -# CHECK-ENCODING: [0x07,0x64,0x85,0x82] +# CHECK-ENCODING: [0x07,0x64,0x85,0x62] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 64 85 82 +# CHECK-UNKNOWN: 07 64 85 62 vl4re64.v v8, (a0) # CHECK-INST: vl4re64.v v8, (a0) -# CHECK-ENCODING: [0x07,0x74,0x85,0x82] +# CHECK-ENCODING: [0x07,0x74,0x85,0x62] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 74 85 82 +# CHECK-UNKNOWN: 07 74 85 62 vl8re8.v v8, (a0) # CHECK-INST: vl8re8.v v8, (a0) -# CHECK-ENCODING: [0x07,0x04,0x85,0x02] +# CHECK-ENCODING: [0x07,0x04,0x85,0xe2] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 04 85 02 +# CHECK-UNKNOWN: 07 04 85 e2 vl8re16.v v8, (a0) # CHECK-INST: vl8re16.v v8, (a0) -# CHECK-ENCODING: [0x07,0x54,0x85,0x02] +# CHECK-ENCODING: [0x07,0x54,0x85,0xe2] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 54 85 02 +# CHECK-UNKNOWN: 07 54 85 e2 vl8re32.v v8, (a0) # CHECK-INST: vl8re32.v v8, (a0) -# CHECK-ENCODING: [0x07,0x64,0x85,0x02] +# CHECK-ENCODING: [0x07,0x64,0x85,0xe2] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 64 85 02 +# CHECK-UNKNOWN: 07 64 85 e2 vl8re64.v v8, (a0) # CHECK-INST: vl8re64.v v8, (a0) -# CHECK-ENCODING: [0x07,0x74,0x85,0x02] +# CHECK-ENCODING: [0x07,0x74,0x85,0xe2] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 07 74 85 02 +# CHECK-UNKNOWN: 07 74 85 e2 diff --git a/llvm/test/MC/RISCV/rvv/store.s b/llvm/test/MC/RISCV/rvv/store.s --- a/llvm/test/MC/RISCV/rvv/store.s +++ b/llvm/test/MC/RISCV/rvv/store.s @@ -208,24 +208,24 @@ vs1r.v v24, (a0) # CHECK-INST: vs1r.v v24, (a0) -# CHECK-ENCODING: [0x27,0x0c,0x85,0x22] +# CHECK-ENCODING: [0x27,0x0c,0x85,0x02] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 27 0c 85 22 +# CHECK-UNKNOWN: 27 0c 85 02 vs2r.v v24, (a0) # CHECK-INST: vs2r.v v24, (a0) -# CHECK-ENCODING: [0x27,0x0c,0x85,0x42] +# CHECK-ENCODING: [0x27,0x0c,0x85,0x22] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 27 0c 85 42 +# CHECK-UNKNOWN: 27 0c 85 22 vs4r.v v24, (a0) # CHECK-INST: vs4r.v v24, (a0) -# CHECK-ENCODING: [0x27,0x0c,0x85,0x82] +# CHECK-ENCODING: [0x27,0x0c,0x85,0x62] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 27 0c 85 82 +# CHECK-UNKNOWN: 27 0c 85 62 vs8r.v v24, (a0) # CHECK-INST: vs8r.v v24, (a0) -# CHECK-ENCODING: [0x27,0x0c,0x85,0x02] +# CHECK-ENCODING: [0x27,0x0c,0x85,0xe2] # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions) -# CHECK-UNKNOWN: 27 0c 85 02 +# CHECK-UNKNOWN: 27 0c 85 e2