forked from OSchip/llvm-project
Mark a few more pattern-less instructions with neverHasSideEffects. This is especially important on instructions like t2LEApcreal which are prime candidate for machine LICM.
llvm-svn: 104102
This commit is contained in:
parent
eba788efa6
commit
2c452fcd14
|
@ -848,6 +848,7 @@ def PICSTRB : AXI2stb<(outs), (ins GPR:$src, addrmodepc:$addr, pred:$p),
|
|||
|
||||
// LEApcrel - Load a pc-relative address into a register without offending the
|
||||
// assembler.
|
||||
let neverHasSideEffects = 1 in {
|
||||
def LEApcrel : AXI1<0x0, (outs GPR:$dst), (ins i32imm:$label, pred:$p),
|
||||
Pseudo, IIC_iALUi,
|
||||
!strconcat(!strconcat(".set ${:private}PCRELV${:uid}, ($label-(",
|
||||
|
@ -867,6 +868,7 @@ def LEApcrelJT : AXI1<0x0, (outs GPR:$dst),
|
|||
[]> {
|
||||
let Inst{25} = 1;
|
||||
}
|
||||
} // neverHasSideEffects
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Control Flow Instructions.
|
||||
|
@ -2203,6 +2205,7 @@ def : ARMPat<(ARMcmpZ GPR:$src, so_imm_neg:$imm),
|
|||
// Conditional moves
|
||||
// FIXME: should be able to write a pattern for ARMcmov, but can't use
|
||||
// a two-value operand where a dag node expects two operands. :(
|
||||
let neverHasSideEffects = 1 in {
|
||||
def MOVCCr : AI1<0b1101, (outs GPR:$dst), (ins GPR:$false, GPR:$true), DPFrm,
|
||||
IIC_iCMOVr, "mov", "\t$dst, $true",
|
||||
[/*(set GPR:$dst, (ARMcmov GPR:$false, GPR:$true, imm:$cc, CCR:$ccr))*/]>,
|
||||
|
@ -2226,6 +2229,7 @@ def MOVCCi : AI1<0b1101, (outs GPR:$dst),
|
|||
RegConstraint<"$false = $dst">, UnaryDP {
|
||||
let Inst{25} = 1;
|
||||
}
|
||||
} // neverHasSideEffects
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Atomic operations intrinsics
|
||||
|
|
|
@ -875,6 +875,7 @@ let usesCustomInserter = 1 in // Expanded after instruction selection.
|
|||
|
||||
|
||||
// 16-bit movcc in IT blocks for Thumb2.
|
||||
let neverHasSideEffects = 1 in {
|
||||
def tMOVCCr : T1pIt<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs), IIC_iCMOVr,
|
||||
"mov", "\t$dst, $rhs", []>,
|
||||
T1Special<{1,0,?,?}>;
|
||||
|
@ -882,9 +883,11 @@ def tMOVCCr : T1pIt<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs), IIC_iCMOVr,
|
|||
def tMOVCCi : T1pIt<(outs tGPR:$dst), (ins tGPR:$lhs, i32imm:$rhs), IIC_iCMOVi,
|
||||
"mov", "\t$dst, $rhs", []>,
|
||||
T1General<{1,0,0,?,?}>;
|
||||
} // neverHasSideEffects
|
||||
|
||||
// tLEApcrel - Load a pc-relative address into a register without offending the
|
||||
// assembler.
|
||||
let neverHasSideEffects = 1 in {
|
||||
def tLEApcrel : T1I<(outs tGPR:$dst), (ins i32imm:$label, pred:$p), IIC_iALUi,
|
||||
"adr$p\t$dst, #$label", []>,
|
||||
T1Encoding<{1,0,1,0,0,?}>; // A6.2 & A8.6.10
|
||||
|
@ -893,6 +896,7 @@ def tLEApcrelJT : T1I<(outs tGPR:$dst),
|
|||
(ins i32imm:$label, nohash_imm:$id, pred:$p),
|
||||
IIC_iALUi, "adr$p\t$dst, #${label}_${id}", []>,
|
||||
T1Encoding<{1,0,1,0,0,?}>; // A6.2 & A8.6.10
|
||||
} // neverHasSideEffects
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// TLS Instructions
|
||||
|
|
|
@ -777,6 +777,7 @@ multiclass T2I_bin_rrot_DO<bits<3> opcod, string opc> {
|
|||
|
||||
// LEApcrel - Load a pc-relative address into a register without offending the
|
||||
// assembler.
|
||||
let neverHasSideEffects = 1 in {
|
||||
def t2LEApcrel : T2XI<(outs GPR:$dst), (ins i32imm:$label, pred:$p), IIC_iALUi,
|
||||
"adr$p.w\t$dst, #$label", []> {
|
||||
let Inst{31-27} = 0b11110;
|
||||
|
@ -798,6 +799,7 @@ def t2LEApcrelJT : T2XI<(outs GPR:$dst),
|
|||
let Inst{19-16} = 0b1111; // Rn
|
||||
let Inst{15} = 0;
|
||||
}
|
||||
} // neverHasSideEffects
|
||||
|
||||
// ADD r, sp, {so_imm|i12}
|
||||
def t2ADDrSPi : T2sI<(outs GPR:$dst), (ins GPR:$sp, t2_so_imm:$imm),
|
||||
|
@ -2143,6 +2145,7 @@ defm t2TEQ : T2I_cmp_irs<0b0100, "teq",
|
|||
// Conditional moves
|
||||
// FIXME: should be able to write a pattern for ARMcmov, but can't use
|
||||
// a two-value operand where a dag node expects two operands. :(
|
||||
let neverHasSideEffects = 1 in {
|
||||
def t2MOVCCr : T2I<(outs GPR:$dst), (ins GPR:$false, GPR:$true), IIC_iCMOVr,
|
||||
"mov", ".w\t$dst, $true",
|
||||
[/*(set GPR:$dst, (ARMcmov GPR:$false, GPR:$true, imm:$cc, CCR:$ccr))*/]>,
|
||||
|
@ -2194,6 +2197,7 @@ def t2MOVCCror : T2I_movcc_sh<0b11, (outs GPR:$dst),
|
|||
(ins GPR:$false, GPR:$true, i32imm:$rhs),
|
||||
IIC_iCMOVsi, "ror", ".w\t$dst, $true, $rhs", []>,
|
||||
RegConstraint<"$false = $dst">;
|
||||
} // neverHasSideEffects
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Atomic operations intrinsics
|
||||
|
|
Loading…
Reference in New Issue