- Mar 06, 2010
-
-
Anton Korobeynikov authored
We cannot use a normal call here since it has extra unmodelled side effects (it changes stack pointer). This should fix PR5292. llvm-svn: 97884
-
- Mar 05, 2010
-
-
Evan Cheng authored
llvm-svn: 97818
-
Evan Cheng authored
Fix an oops in x86 sibcall optimization. If the ByVal callee argument is itself passed as a pointer, then it's obviously not safe to do a tail call. llvm-svn: 97797
-
Evan Cheng authored
llvm-svn: 97782
-
Bill Wendling authored
llvm-svn: 97768
-
Bill Wendling authored
This code: float floatingPointComparison(float x, float y) { double product = (double)x * y; if (product == 0.0) return product; return product - 1.0; } produces this: _floatingPointComparison: 0000000000000000 cvtss2sd %xmm1,%xmm1 0000000000000004 cvtss2sd %xmm0,%xmm0 0000000000000008 mulsd %xmm1,%xmm0 000000000000000c pxor %xmm1,%xmm1 0000000000000010 ucomisd %xmm1,%xmm0 0000000000000014 jne 0x00000004 0000000000000016 jp 0x00000002 0000000000000018 jmp 0x00000008 000000000000001a addsd 0x00000006(%rip),%xmm0 0000000000000022 cvtsd2ss %xmm0,%xmm0 0000000000000026 ret The "jne/jp/jmp" sequence can be reduced to this instead: _floatingPointComparison: 0000000000000000 cvtss2sd %xmm1,%xmm1 0000000000000004 cvtss2sd %xmm0,%xmm0 0000000000000008 mulsd %xmm1,%xmm0 000000000000000c pxor %xmm1,%xmm1 0000000000000010 ucomisd %xmm1,%xmm0 0000000000000014 jp 0x00000002 0000000000000016 je 0x00000008 0000000000000018 addsd 0x00000006(%rip),%xmm0 0000000000000020 cvtsd2ss %xmm0,%xmm0 0000000000000024 ret for a savings of 2 bytes. This xform can happen when we recognize that jne and jp jump to the same "true" MBB, the unconditional jump would jump to the "false" MBB, and the "true" branch is the fall-through MBB. llvm-svn: 97766
-
- Mar 04, 2010
-
-
Jakob Stoklund Olesen authored
These instructions technically define AL,AH, but a trick in X86ISelDAGToDAG reads AX in order to avoid reading AH with a REX instruction. Fix PR6489. llvm-svn: 97742
-
Dan Gohman authored
clobber registers in a different order. llvm-svn: 97741
-
Chris Lattner authored
llvm-svn: 97740
-
Chris Lattner authored
register if it isn't possible to match the indexes *and* the base. This fixes some fast isel rejects of load instructions on oggenc. llvm-svn: 97739
-
Chris Lattner authored
llvm-svn: 97709
-
- Mar 03, 2010
-
-
Chris Lattner authored
better done by dag combine. llvm-svn: 97633
-
Chris Lattner authored
'dsload' pattern. tblgen doesn't check patterns to see if they're textually identical. This allows better factoring. llvm-svn: 97630
-
Chris Lattner authored
that they are not destination type specific. This allows tblgen to factor them and the type check is redundant with what the isel does anyway. llvm-svn: 97629
-
Chris Lattner authored
llvm-svn: 97606
-
- Mar 02, 2010
-
-
Chris Lattner authored
We still preprocess calls and fp return stuff. llvm-svn: 97598
-
Chris Lattner authored
CopyToReg/CopyFromReg/INLINEASM. These are annoying because they have the same opcode before an after isel. Fix this by setting their NodeID to -1 to indicate that they are selected, just like what automatically happens when selecting things that end up being machine nodes. With that done, give IsLegalToFold a new flag that causes it to ignore chains. This lets the HandleMergeInputChains routine be the one place that validates chains after a match is successful, enabling the new hotness in chain processing. This smarter chain processing eliminates the need for "PreprocessRMW" in the X86 and MSP430 backends and enables MSP to start matching it's multiple mem operand instructions more aggressively. I currently #if out the dead code in the X86 backend and MSP backend, I'll remove it for real in a follow-on patch. The testcase changes are: test/CodeGen/X86/sse3.ll: we generate better code test/CodeGen/X86/store_op_load_fold2.ll: PreprocessRMW was miscompiling this before, we now generate correct code Convert it to filecheck while I'm at it. test/CodeGen/MSP430/Inst16mm.ll: Add a testcase for mem/mem folding to make anton happy. :) llvm-svn: 97596
-
Chris Lattner authored
DoInstructionSelection. Inline "SelectRoot" into it from DAGISelHeader. Sink some other stuff out of DAGISelHeader into SDISel. Eliminate the various 'Indent' stuff from various targets, which dates to when isel was recursive. 17 files changed, 114 insertions(+), 430 deletions(-) llvm-svn: 97555
-
Bill Wendling authored
llvm-svn: 97536
-
Dan Gohman authored
respectively. llvm-svn: 97531
-
- Mar 01, 2010
-
-
Chris Lattner authored
now that it is gone. llvm-svn: 97516
-
Evan Cheng authored
Remove the optimize for code size limitation on r67917. Optimize 64-bit imul by constants into leas + shl regardless if optimizing for code size. The size saving from using imulq isn't worth it. Also, the lea and shl instructions may expose further optimization. llvm-svn: 97507
-
Chris Lattner authored
problems. rdar://7697850. llvm-svn: 97500
-
Dan Gohman authored
llvm-svn: 97450
-
- Feb 28, 2010
-
-
Mikhail Glushenkov authored
llvm-svn: 97427
-
Dan Gohman authored
Extracting the low element of a vector is now done with EXTRACT_SUBREG, and the zero-extension performed by load movss is now modeled with SUBREG_TO_REG, and so on. Register-to-register movss and movsd are no longer considered copies; they are two-address instructions which insert a scalar into a vector. llvm-svn: 97354
-
Dan Gohman authored
llvm-svn: 97348
-
- Feb 27, 2010
-
-
Chris Lattner authored
llvm-svn: 97316
-
Evan Cheng authored
llvm-svn: 97310
-
- Feb 26, 2010
-
-
Dale Johannesen authored
as X86 is currently the only FastISel target. Per review. llvm-svn: 97255
-
Dan Gohman authored
llvm-svn: 97227
-
Dan Gohman authored
llvm-svn: 97201
-
- Feb 25, 2010
-
-
Daniel Dunbar authored
llvm-svn: 97151
-
Dan Gohman authored
just discarding one of the registers. llvm-svn: 97100
-
- Feb 24, 2010
-
-
Daniel Dunbar authored
the hopes of fixing PPC bootstrap. llvm-svn: 97040
-
Dan Gohman authored
necessary to swap the operands to handle NaN and negative zero properly. Also, reintroduce logic for checking for NaN conditions when forming SSE min and max instructions, fixed to take into consideration NaNs and negative zeros. This allows forming min and max instructions in more cases. llvm-svn: 97025
-
Evan Cheng authored
llvm-svn: 97011
-
Jakob Stoklund Olesen authored
instead of %AL/%AH. llvm-svn: 97006
-
- Feb 23, 2010
-
-
Evan Cheng authored
llvm-svn: 96990
-
Chris Lattner authored
disables load folding at -O0. llvm-svn: 96973
-