forked from OSchip/llvm-project
[X86] Don't mark movabsq as cheap-as-move - it isn't that cheap.
A simple register copy on X86 is just 3 bytes, whereas movabsq is a 10 byte instruction. Marking movabsq as not beeing cheap will allow LICM to move it out of the loop and it also prevents unnecessary rematerializations if the value is needed in more than one register. llvm-svn: 201377
This commit is contained in:
parent
aa689f5079
commit
b575878145
|
@ -1203,13 +1203,15 @@ def MOV16ri : Ii16<0xB8, AddRegFrm, (outs GR16:$dst), (ins i16imm:$src),
|
|||
def MOV32ri : Ii32<0xB8, AddRegFrm, (outs GR32:$dst), (ins i32imm:$src),
|
||||
"mov{l}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, imm:$src)], IIC_MOV>, OpSize32;
|
||||
def MOV64ri : RIi64<0xB8, AddRegFrm, (outs GR64:$dst), (ins i64imm:$src),
|
||||
"movabs{q}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, imm:$src)], IIC_MOV>;
|
||||
def MOV64ri32 : RIi32S<0xC7, MRM0r, (outs GR64:$dst), (ins i64i32imm:$src),
|
||||
"mov{q}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, i64immSExt32:$src)], IIC_MOV>;
|
||||
}
|
||||
let isReMaterializable = 1 in {
|
||||
def MOV64ri : RIi64<0xB8, AddRegFrm, (outs GR64:$dst), (ins i64imm:$src),
|
||||
"movabs{q}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, imm:$src)], IIC_MOV>;
|
||||
}
|
||||
} // SchedRW
|
||||
|
||||
let SchedRW = [WriteStore] in {
|
||||
|
|
Loading…
Reference in New Issue