diff --git a/llvm/lib/Target/ARM/ARMInstrThumb2.td b/llvm/lib/Target/ARM/ARMInstrThumb2.td --- a/llvm/lib/Target/ARM/ARMInstrThumb2.td +++ b/llvm/lib/Target/ARM/ARMInstrThumb2.td @@ -581,7 +581,7 @@ /// changed to modify CPSR. multiclass T2I_bin_irs opcod, string opc, InstrItinClass iii, InstrItinClass iir, InstrItinClass iis, - SDPatternOperator opnode, bit Commutable = 0, + SDPatternOperator opnode, bit SB, bit Commutable = 0, string wide = ""> { // shifted imm def ri : T2sTwoRegImm< @@ -603,6 +603,7 @@ let Inst{31-27} = 0b11101; let Inst{26-25} = 0b01; let Inst{24-21} = opcod; + let Inst{15} = SB; let Inst{14-12} = 0b000; // imm3 let Inst{7-6} = 0b00; // imm2 let Inst{5-4} = 0b00; // type @@ -616,6 +617,7 @@ let Inst{31-27} = 0b11101; let Inst{26-25} = 0b01; let Inst{24-21} = opcod; + let Inst{15} = SB; } // Assembly aliases for optional destination operand when it's the same // as the source operand. @@ -637,8 +639,8 @@ // the ".w" suffix to indicate that they are wide. multiclass T2I_bin_w_irs opcod, string opc, InstrItinClass iii, InstrItinClass iir, InstrItinClass iis, - SDPatternOperator opnode, bit Commutable = 0> : - T2I_bin_irs { + SDPatternOperator opnode, bit SB, bit Commutable = 0> : + T2I_bin_irs { // Assembler aliases w/ the ".w" suffix. def : t2InstAlias(NAME#"ri") rGPR:$Rd, rGPR:$Rn, t2_so_imm:$imm, pred:$p, @@ -879,6 +881,7 @@ let Inst{31-27} = 0b11101; let Inst{26-21} = 0b010010; let Inst{19-16} = 0b1111; // Rn + let Inst{15} = 0b0; let Inst{5-4} = opcod; } // register @@ -1871,6 +1874,7 @@ let Inst{26-25} = 0b01; let Inst{24-21} = 0b0010; let Inst{19-16} = 0b1111; // Rn + let Inst{15} = 0; let Inst{14-12} = 0b000; let Inst{7-4} = 0b0000; } @@ -2399,6 +2403,7 @@ let Inst{26-25} = 0b01; let Inst{24-21} = 0b0010; let Inst{19-16} = 0b1111; // Rn + let Inst{15} = 0; let Inst{14-12} = 0b000; let Inst{7-4} = 0b0011; } @@ -2442,15 +2447,15 @@ // defm t2AND : T2I_bin_w_irs<0b0000, "and", - IIC_iBITi, IIC_iBITr, IIC_iBITsi, and, 1>; + IIC_iBITi, IIC_iBITr, IIC_iBITsi, and, ?, 1>; defm t2ORR : T2I_bin_w_irs<0b0010, "orr", - IIC_iBITi, IIC_iBITr, IIC_iBITsi, or, 1>; + IIC_iBITi, IIC_iBITr, IIC_iBITsi, or, 0, 1>; defm t2EOR : T2I_bin_w_irs<0b0100, "eor", - IIC_iBITi, IIC_iBITr, IIC_iBITsi, xor, 1>; + IIC_iBITi, IIC_iBITr, IIC_iBITsi, xor, ?, 1>; defm t2BIC : T2I_bin_w_irs<0b0001, "bic", IIC_iBITi, IIC_iBITr, IIC_iBITsi, - BinOpFrag<(and node:$LHS, (not node:$RHS))>>; + BinOpFrag<(and node:$LHS, (not node:$RHS))>, ?>; class T2BitFI pattern> @@ -2543,7 +2548,7 @@ defm t2ORN : T2I_bin_irs<0b0011, "orn", IIC_iBITi, IIC_iBITr, IIC_iBITsi, - BinOpFrag<(or node:$LHS, (not node:$RHS))>, 0, "">; + BinOpFrag<(or node:$LHS, (not node:$RHS))>, ?, 0, "">; /// T2I_un_irs - Defines a set of (op reg, {so_imm|r|so_reg}) patterns for a /// unary operation that produces a value. These are predicable and can be