diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-02-14 00:51:13 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-02-14 00:51:13 +0000 |
commit | 5cb9925acd13d94e7462e26fc7d493e2af8996dd (patch) | |
tree | 5f9fe2946bf381def5d41e34d30686ecc3d91e22 /lib/Target/X86/X86InstrInfo.td | |
parent | f222ebe86c944fc0f13afbb619bfa69880893f7a (diff) | |
download | llvm-5cb9925acd13d94e7462e26fc7d493e2af8996dd.tar.gz llvm-5cb9925acd13d94e7462e26fc7d493e2af8996dd.tar.bz2 llvm-5cb9925acd13d94e7462e26fc7d493e2af8996dd.tar.xz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrInfo.td')
-rw-r--r-- | lib/Target/X86/X86InstrInfo.td | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 776bd8145a..ac7ff500d3 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -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 { |