diff --git a/llvm/lib/Target/VE/VE.td b/llvm/lib/Target/VE/VE.td --- a/llvm/lib/Target/VE/VE.td +++ b/llvm/lib/Target/VE/VE.td @@ -30,9 +30,7 @@ include "VECallingConv.td" include "VEInstrInfo.td" -def VEInstrInfo : InstrInfo { - let useDeprecatedPositionallyEncodedOperands = 1; -} +def VEInstrInfo : InstrInfo {} def VEAsmParser : AsmParser { // Use both VE register name matcher to accept "S0~S63" register names diff --git a/llvm/lib/Target/VE/VEInstrInfo.td b/llvm/lib/Target/VE/VEInstrInfo.td --- a/llvm/lib/Target/VE/VEInstrInfo.td +++ b/llvm/lib/Target/VE/VEInstrInfo.td @@ -764,14 +764,14 @@ def r : RR { bits<4> rd; - let sz{5-4} = 0; + let sz{6-4} = 0; let sz{3-0} = rd; } let cy = 0 in def i : RR { bits<4> rd; - let sz{5-4} = 0; + let sz{6-4} = 0; let sz{3-0} = rd; } } @@ -794,33 +794,33 @@ // e.g. PFCH let sx = 0, hasSideEffects = 0 in multiclass PFCHmopc> { - def rri : RM; let cy = 0 in - def rii : RM; let cz = 0 in - def zri : RM; let cy = 0, cz = 0 in - def zii : RM; } // Multiclass for CAS instructions. // e.g. TS1AML, TS1AMW, TS2AM, and etc. -let Constraints = "$dest = $sd", DisableEncoding = "$sd", +let Constraints = "$sx = $sd", DisableEncoding = "$sd", mayStore=1, mayLoad = 1, hasSideEffects = 0 in multiclass RRCAStgmopc, RegisterClass RC, ValueType Ty, Operand immOp, Operand MEM, ComplexPattern ADDR, SDPatternOperator OpNode = null_frag> { - def r : RRM; + def r : RRM; let cy = 0 in - def i : RRM; + def i : RRM; } multiclass RRCASmopc, RegisterClass RC, ValueType Ty, Operand immOp, SDPatternOperator OpNode = null_frag> { @@ -835,13 +835,13 @@ multiclass BCbpfm opc, dag cond, Operand ADDR> { let bpf = 0 /* NONE */ in - def "" : CF; let bpf = 2 /* NOT TAKEN */ in - def _nt : CF; let bpf = 3 /* TAKEN */ in - def _t : CF; } multiclass BCtgm opc, dag cond> { @@ -851,9 +851,9 @@ multiclass BCm opc, RegisterClass RC, Operand immOp> { let DecoderMethod = "DecodeBranchCondition" in - defm r : BCtgm; + defm r : BCtgm; let DecoderMethod = "DecodeBranchCondition", cy = 0 in - defm i : BCtgm; + defm i : BCtgm; let DecoderMethod = "DecodeBranchConditionAlways", cy = 0, sy = 0, cf = 15 /* AT */, isBarrier = 1 in defm a : BCtgm; @@ -951,20 +951,20 @@ // Multiclass for LHM instruction. let mayLoad = 1, hasSideEffects = 0 in multiclass LHMm opc, RegisterClass RC> { - def ri : RRMHM; + def ri : RRMHM; let cz = 0 in - def zi : RRMHM; + def zi : RRMHM; } // Multiclass for SHM instruction. let mayStore = 1, hasSideEffects = 0 in multiclass SHMm opc, RegisterClass RC> { - def ri : RRMHM; let cz = 0 in - def zi : RRMHM; } @@ -982,17 +982,17 @@ // Multiclass for generic RM instructions multiclass RMmopc, RegisterClass RC, bit MoveImm = 0> { - def rri : RM; + def rri : RM; let cy = 0 in - def rii : RM; + def rii : RM; let cz = 0 in - def zri : RM; + def zri : RM; let cy = 0, cz = 0 in - def zii : RM { + def zii : RM { // VE uses LEAzii and LEASLzii as a move immediate instruction, so declare // it here. An instruction declared as MoveImm will be optimized in // FoldImmediate later. @@ -1018,21 +1018,21 @@ let mayLoad = 1, hasSideEffects = 0 in multiclass LOADm opc, RegisterClass RC, ValueType Ty, SDPatternOperator OpNode = null_frag> { - def rri : RM; + def rri : RM; let cy = 0 in - def rii : RM; + def rii : RM; let cz = 0 in - def zri : RM; + def zri : RM; let cy = 0, cz = 0 in - def zii : RM; + def zii : RM; } // Section 8.2.2 - LDS @@ -1076,19 +1076,19 @@ let mayStore = 1 in multiclass STOREm opc, RegisterClass RC, ValueType Ty, SDPatternOperator OpNode = null_frag> { - def rri : RM; let cy = 0 in - def rii : RM; let cz = 0 in - def zri : RM; let cy = 0, cz = 0 in - def zii : RM; } @@ -1460,7 +1460,7 @@ //----------------------------------------------------------------------------- // Section 8.8.1 - BC (Branch on Codition) -defm BCFL : BCm<"b${cond}.l", "b.l", "baf.l", 0x19, I64, simm7>; +defm BCFL : BCm<"b${cf}.l", "b.l", "baf.l", 0x19, I64, simm7>; // Indirect branch aliases def : Pat<(brind I64:$reg), (BCFLari_t $reg, 0)>; @@ -1473,12 +1473,12 @@ def RET : CF<0x19, (outs), (ins), "b.l.t (, %s10)", [(retflag)]>; // Section 8.8.2 - BCS (Branch on Condition Single) -defm BCFW : BCm<"b${cond}.w", "b.w", "baf.w", 0x1B, I32, simm7>; +defm BCFW : BCm<"b${cf}.w", "b.w", "baf.w", 0x1B, I32, simm7>; // Section 8.8.3 - BCF (Branch on Condition Floating Point) -defm BCFD : BCm<"b${cond}.d", "b.d", "baf.d", 0x1C, I64, simm7fp>; +defm BCFD : BCm<"b${cf}.d", "b.d", "baf.d", 0x1C, I64, simm7fp>; let cx = 1 in -defm BCFS : BCm<"b${cond}.s", "b.s", "baf.s", 0x1C, F32, simm7fp>; +defm BCFS : BCm<"b${cf}.s", "b.s", "baf.s", 0x1C, F32, simm7fp>; // Section 8.8.4 - BCR (Branch on Condition Relative) let cx = 0, cx2 = 0 in