Mark some pattern-less instructions as neverHasSideEffects.

llvm-svn: 103683
This commit is contained in:
Evan Cheng 2010-05-13 00:16:46 +00:00
parent 8cb4728a15
commit 79efd71962
2 changed files with 9 additions and 1 deletions

View File

@ -2796,6 +2796,7 @@ def VSWPq : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 1, 0,
// VMOV : Vector Move (Register) // VMOV : Vector Move (Register)
let neverHasSideEffects = 1 in {
def VMOVDneon: N3VX<0, 0, 0b10, 0b0001, 0, 1, (outs DPR:$dst), (ins DPR:$src), def VMOVDneon: N3VX<0, 0, 0b10, 0b0001, 0, 1, (outs DPR:$dst), (ins DPR:$src),
N3RegFrm, IIC_VMOVD, "vmov", "$dst, $src", "", []>; N3RegFrm, IIC_VMOVD, "vmov", "$dst, $src", "", []>;
def VMOVQ : N3VX<0, 0, 0b10, 0b0001, 1, 1, (outs QPR:$dst), (ins QPR:$src), def VMOVQ : N3VX<0, 0, 0b10, 0b0001, 1, 1, (outs QPR:$dst), (ins QPR:$src),
@ -2805,6 +2806,7 @@ def VMOVQ : N3VX<0, 0, 0b10, 0b0001, 1, 1, (outs QPR:$dst), (ins QPR:$src),
// be expanded after register allocation is completed. // be expanded after register allocation is completed.
def VMOVQQ : PseudoInst<(outs QQPR:$dst), (ins QQPR:$src), def VMOVQQ : PseudoInst<(outs QQPR:$dst), (ins QQPR:$src),
NoItinerary, "@ vmov\t$dst, $src", []>; NoItinerary, "@ vmov\t$dst, $src", []>;
} // neverHasSideEffects
// VMOV : Vector Move (Immediate) // VMOV : Vector Move (Immediate)

View File

@ -313,6 +313,7 @@ def VMOVSR : AVConv4I<0b11100000, 0b1010, (outs SPR:$dst), (ins GPR:$src),
IIC_fpMOVIS, "vmov", "\t$dst, $src", IIC_fpMOVIS, "vmov", "\t$dst, $src",
[(set SPR:$dst, (bitconvert GPR:$src))]>; [(set SPR:$dst, (bitconvert GPR:$src))]>;
let neverHasSideEffects = 1 in {
def VMOVRRD : AVConv3I<0b11000101, 0b1011, def VMOVRRD : AVConv3I<0b11000101, 0b1011,
(outs GPR:$wb, GPR:$dst2), (ins DPR:$src), (outs GPR:$wb, GPR:$dst2), (ins DPR:$src),
IIC_fpMOVDI, "vmov", "\t$wb, $dst2, $src", IIC_fpMOVDI, "vmov", "\t$wb, $dst2, $src",
@ -326,6 +327,7 @@ def VMOVRRS : AVConv3I<0b11000101, 0b1010,
[/* For disassembly only; pattern left blank */]> { [/* For disassembly only; pattern left blank */]> {
let Inst{7-6} = 0b00; let Inst{7-6} = 0b00;
} }
} // neverHasSideEffects
// FMDHR: GPR -> SPR // FMDHR: GPR -> SPR
// FMDLR: GPR -> SPR // FMDLR: GPR -> SPR
@ -337,6 +339,7 @@ def VMOVDRR : AVConv5I<0b11000100, 0b1011,
let Inst{7-6} = 0b00; let Inst{7-6} = 0b00;
} }
let neverHasSideEffects = 1 in
def VMOVSRR : AVConv5I<0b11000100, 0b1010, def VMOVSRR : AVConv5I<0b11000100, 0b1010,
(outs SPR:$dst1, SPR:$dst2), (ins GPR:$src1, GPR:$src2), (outs SPR:$dst1, SPR:$dst2), (ins GPR:$src1, GPR:$src2),
IIC_fpMOVID, "vmov", "\t$dst1, $dst2, $src1, $src2", IIC_fpMOVID, "vmov", "\t$dst1, $dst2, $src1, $src2",
@ -606,6 +609,7 @@ def VNMLAS : ASbI<0b11100, 0b01, 1, 0,
// FP Conditional moves. // FP Conditional moves.
// //
let neverHasSideEffects = 1 in {
def VMOVDcc : ADuI<0b11101, 0b11, 0b0000, 0b01, 0, def VMOVDcc : ADuI<0b11101, 0b11, 0b0000, 0b01, 0,
(outs DPR:$dst), (ins DPR:$false, DPR:$true), (outs DPR:$dst), (ins DPR:$false, DPR:$true),
IIC_fpUNA64, "vmov", ".f64\t$dst, $true", IIC_fpUNA64, "vmov", ".f64\t$dst, $true",
@ -629,7 +633,7 @@ def VNEGScc : ASuI<0b11101, 0b11, 0b0001, 0b01, 0,
IIC_fpUNA32, "vneg", ".f32\t$dst, $true", IIC_fpUNA32, "vneg", ".f32\t$dst, $true",
[/*(set SPR:$dst, (ARMcneg SPR:$false, SPR:$true, imm:$cc))*/]>, [/*(set SPR:$dst, (ARMcneg SPR:$false, SPR:$true, imm:$cc))*/]>,
RegConstraint<"$false = $dst">; RegConstraint<"$false = $dst">;
} // neverHasSideEffects
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Misc. // Misc.
@ -651,6 +655,7 @@ def FMSTAT : VFPAI<(outs), (ins), VFPMiscFrm, IIC_fpSTAT, "vmrs",
// FPSCR <-> GPR (for disassembly only) // FPSCR <-> GPR (for disassembly only)
let neverHasSideEffects = 1 in {
let Uses = [FPSCR] in { let Uses = [FPSCR] in {
def VMRS : VFPAI<(outs GPR:$dst), (ins), VFPMiscFrm, IIC_fpSTAT, "vmrs", def VMRS : VFPAI<(outs GPR:$dst), (ins), VFPMiscFrm, IIC_fpSTAT, "vmrs",
"\t$dst, fpscr", "\t$dst, fpscr",
@ -674,6 +679,7 @@ def VMSR : VFPAI<(outs), (ins GPR:$src), VFPMiscFrm, IIC_fpSTAT, "vmsr",
let Inst{4} = 1; let Inst{4} = 1;
} }
} }
} // neverHasSideEffects
// Materialize FP immediates. VFP3 only. // Materialize FP immediates. VFP3 only.
let isReMaterializable = 1 in { let isReMaterializable = 1 in {