This is a follow-up to r255656 which uses push-pop for materializing small constants with 3 bytes instead of a 5-byte (or more) mov.
Since it's slower, let's put it under 'minsize'.
Please take a look.
Paths
| Differential D15549
[X86] Use push-pop for materializing small constants under 'minsize' ClosedPublic Authored by hans on Dec 15 2015, 5:28 PM.
Details Summary This is a follow-up to r255656 which uses push-pop for materializing small constants with 3 bytes instead of a 5-byte (or more) mov. Since it's slower, let's put it under 'minsize'. Please take a look.
Diff Detail
Event TimelineComment Actions Hi Hans, Compiling int f() { return -1; } with x86_64-pc-win32 gives: f: # @f .Ltmp0: .seh_proc f # BB#0: # %entry .Ltmp1: .seh_endprologue pushl $-1 popl %eax retq .seh_handlerdata .text .Ltmp2: .seh_endproc I believe this is a violation of the x64 ABI because your program has stack pointer adjustments after the prologue without also having a frame pointer. Comment Actions
Thanks for pointing this out. Sounds like we should avoid the push/pop lowering for Win64 in functions without frame pointers, then.
Closed by commit rL255936: [X86] Use push-pop for materializing small constants under 'minsize' (authored by hans). · Explain WhyDec 17 2015, 3:21 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 43191 llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/trunk/lib/Target/X86/X86InstrCompiler.td
llvm/trunk/lib/Target/X86/X86InstrInfo.h
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
llvm/trunk/lib/Target/X86/X86InstrInfo.td
llvm/trunk/test/CodeGen/X86/materialize-one.ll
llvm/trunk/test/CodeGen/X86/materialize.ll
llvm/trunk/test/CodeGen/X86/powi.ll
|