Chris Lattner
17819d971e
eliminate additions of 0.0 when they are obviously dead. This has to be careful to
...
avoid turning -0.0 + 0.0 -> -0.0 which is incorrect.
llvm-svn: 46499
2008-01-29 06:52:45 +00:00
Owen Anderson
95bf1d4d7b
Add a testcase for eliminating memcpy's at the end of functions. Forgot to commit this with my last commit.
...
llvm-svn: 46497
2008-01-29 06:40:32 +00:00
Chris Lattner
f4e5e556fd
Add target triples to these so they don't fail on linux.
...
llvm-svn: 46496
2008-01-29 06:26:07 +00:00
Duncan Sands
05837edae7
Use getPreferredAlignmentLog or getPreferredAlignment
...
to get the alignment of global variables, rather than
using hand-made versions.
llvm-svn: 46495
2008-01-29 06:23:44 +00:00
Owen Anderson
48d37806e2
Add support for eliminating memcpy's at the end of functions. Also fix some errors I noticed in
...
the handling of eliminating stores to byval arguments.
llvm-svn: 46494
2008-01-29 06:18:36 +00:00
Duncan Sands
1e7ec74ad3
This would be better done as an executable test.
...
llvm-svn: 46493
2008-01-29 06:04:54 +00:00
Duncan Sands
aaaeee2ac0
After recent changes we fail to optimize this test
...
sufficiently to have it pass. I'm removing it from
the testsuite and adding it to PR452 instead.
llvm-svn: 46492
2008-01-29 05:57:23 +00:00
Owen Anderson
5aa1615add
RegAllocBigBlock doesn't need LiveVariables either.
...
llvm-svn: 46488
2008-01-29 02:32:13 +00:00
Scott Michel
167502a508
Fix to bug 1951: tblgen gratuitously renames variables when no temporary was
...
generated. This feature would only show up in fairly complex patterns, such
as this one in CellSPU:
def : Pat<(add (SPUhi tconstpool:$in, 0), (SPUlo tconstpool:$in, 0)),
(IOHLlo (ILHUhi tconstpool:$in), tconstpool:$in)>;
which generated the following emit code:
SDNode *Emit_0(const SDOperand &N, unsigned Opc0, unsigned Opc1, MVT::ValueType VT0, MVT::ValueType VT1) DISABLE_INLINE {
SDOperand N0 = N.getOperand(0);
SDOperand N00 = N0.getOperand(0);
SDOperand N01 = N0.getOperand(1);
SDOperand N1 = N.getOperand(1);
SDOperand N10 = N1.getOperand(0);
SDOperand N11 = N1.getOperand(1);
SDOperand Tmp3(CurDAG->getTargetNode(Opc0, VT0, N00), 0);
return CurDAG->SelectNodeTo(N.Val, Opc1, VT1, Tmp3, Tmp2); /* Tmp2 s/b N00 */
}
Tested against the test suites without incident.
llvm-svn: 46487
2008-01-29 02:29:31 +00:00
Nate Begeman
ef33767efb
Properly expand extract-element for non-power-of-2 codegen
...
llvm-svn: 46486
2008-01-29 02:24:00 +00:00
Dale Johannesen
2b3bc30420
Handle 'X' constraint in asm's better.
...
llvm-svn: 46485
2008-01-29 02:21:21 +00:00
Devang Patel
67fa0521b6
Filter loops that subtract induction variables.
...
These loops are not yet handled.
Fix PR 1912.
llvm-svn: 46484
2008-01-29 02:20:41 +00:00
Scott Michel
ceae3bbf4d
Overhaul Cell SPU's addressing mode internals so that there are now
...
only two addressing mode nodes, SPUaform and SPUindirect (vice the
three previous ones, SPUaform, SPUdform and SPUxform). This improves
code somewhat because we now avoid using reg+reg addressing when
it can be avoided. It also simplifies the address selection logic,
which was the main point for doing this.
Also, for various global variables that would be loaded using SPU's
A-form addressing, prefer D-form offs[reg] addressing, keeping the
base in a register if the variable is used more than once.
llvm-svn: 46483
2008-01-29 02:16:57 +00:00
Devang Patel
7bcf58f8a4
New test.
...
llvm-svn: 46479
2008-01-29 01:10:04 +00:00
Bill Wendling
f0b7d4993f
Add test to make sure that #pragma mark/error doesn't error if there are
...
unbalanced quotes.
llvm-svn: 46476
2008-01-29 00:41:29 +00:00
Ted Kremenek
9fd577a22c
Added destructor for template class FoldingSetNodeWrapper.
...
Added getValue() to FoldingSetNodeWrapper.
llvm-svn: 46465
2008-01-28 22:05:23 +00:00
Lauro Ramos Venancio
0f54a09163
Simplify the code and fix a typo.
...
llvm-svn: 46458
2008-01-28 20:02:51 +00:00
Duncan Sands
2a80ba8c7c
Pure/const functions with ByVal parameters cannot
...
be marked readonly either.
llvm-svn: 46456
2008-01-28 19:25:47 +00:00
Lauro Ramos Venancio
99929d20e7
Fix fpcmp infinite loop when comparing "29-266" with "29-268".
...
llvm-svn: 46455
2008-01-28 18:23:23 +00:00
Chris Lattner
a116071547
this test is now compiled into the right thing.
...
llvm-svn: 46454
2008-01-28 17:38:46 +00:00
Duncan Sands
9f6f4d39f7
Unbreak builds with differing object and source
...
directories. Patch by Sam Bishop.
llvm-svn: 46453
2008-01-28 17:38:30 +00:00
Duncan Sands
54af54fe08
Make this more likely to be passed byval.
...
llvm-svn: 46451
2008-01-28 10:35:11 +00:00
Bill Wendling
96a1b810ec
If the function has no machine instructions, then emit a "nop" so that
...
the function label isn't associated with something it shouldn't be.
llvm-svn: 46449
2008-01-28 09:15:03 +00:00
Chris Lattner
a8b4a56061
Transform calls to memcpy into llvm.memcpy calls, patch by Eli Friedman.
...
llvm-svn: 46433
2008-01-28 04:41:43 +00:00
Chris Lattner
6379fc68ff
reduce duplicate -I flags passed to the compiler, cleaning up the VERBOSE
...
output. Patch contributed by Sam Bishop!
llvm-svn: 46432
2008-01-28 04:18:41 +00:00
Nick Lewycky
8ea81e8ba4
Handle some more combinations of extend and icmp. Fixes PR1940.
...
llvm-svn: 46431
2008-01-28 03:48:02 +00:00
Chris Lattner
710b441174
Fix PR1932 by disabling an xform invalid for fdiv.
...
llvm-svn: 46429
2008-01-28 00:58:18 +00:00
Chris Lattner
2f2427e5aa
make handling of overflow and undefined results much more clear.
...
Patch by Eli Friedman, thanks!
llvm-svn: 46428
2008-01-28 00:36:27 +00:00
Chris Lattner
1b706dd680
Fix PR1938 by forcing the code that uses an undefined value to branch one
...
way or the other. Rewriting the code itself prevents subsequent analysis
passes from making contradictory conclusions about the code that could
cause an infeasible path to be made feasible.
llvm-svn: 46427
2008-01-28 00:32:30 +00:00
Chris Lattner
9422fb70fe
Always for PACKAGEVERSION to 'mainline' for teh llvm web page.
...
llvm-svn: 46425
2008-01-27 23:43:26 +00:00
Chris Lattner
2ee91f4300
Fix PowerPC/./2007-10-18-PtrArithmetic.ll
...
llvm-svn: 46424
2008-01-27 23:32:17 +00:00
Chris Lattner
34d6b6a319
Update this test. Due to dag combiner improvements, we now compile
...
f7/f11 to:
_f7:
eor r0, r0, #2 , 2 @ -2147483648
bx lr
_f11:
bic r0, r0, #2 , 2 @ -2147483648
bx lr
instead of:
_f7:
fmsr s0, r0
fnegs s0, s0
fmrs r0, s0
bx lr
_f11:
fmsr s0, r0
fabss s0, s0
fmrs r0, s0
bx lr
llvm-svn: 46423
2008-01-27 23:26:37 +00:00
Chris Lattner
d0496d0433
fix a crash on CodeGen/X86/vector-rem.ll
...
llvm-svn: 46422
2008-01-27 23:21:58 +00:00
Chris Lattner
d329270854
Add support for frameworks. Patch by Shantonu Sen!
...
llvm-svn: 46421
2008-01-27 22:58:59 +00:00
Owen Anderson
9a8c890c02
Reg alloc doesn't really need LiveVariables.
...
llvm-svn: 46420
2008-01-27 22:00:00 +00:00
Owen Anderson
e913aad94e
Fixes for BreakCriticalMachineCodeEdge by Fernando.
...
llvm-svn: 46419
2008-01-27 19:51:03 +00:00
Nick Lewycky
efb16f7057
Be more careful modifying the use_list while also iterating through it.
...
llvm-svn: 46417
2008-01-27 18:35:00 +00:00
Duncan Sands
053c9871cd
Revert r46393: readonly/readnone functions are no
...
longer allowed to write through byval arguments.
llvm-svn: 46416
2008-01-27 18:12:58 +00:00
Chris Lattner
888560d62c
Implement some dag combines that allow doing fneg/fabs/fcopysign in integer
...
registers if used by a bitconvert or using a bitconvert. This allows us to
avoid constant pool loads and use cheaper integer instructions when the
values come from or end up in integer regs anyway. For example, we now
compile CodeGen/X86/fp-in-intregs.ll to:
_test1:
movl $2147483648, %eax
xorl 4(%esp), %eax
ret
_test2:
movl $1065353216, %eax
orl 4(%esp), %eax
andl $3212836864, %eax
ret
Instead of:
_test1:
movss 4(%esp), %xmm0
xorps LCPI2_0, %xmm0
movd %xmm0, %eax
ret
_test2:
movss 4(%esp), %xmm0
andps LCPI3_0, %xmm0
movss LCPI3_1, %xmm1
andps LCPI3_2, %xmm1
orps %xmm0, %xmm1
movd %xmm1, %eax
ret
bitconverts can happen due to various calling conventions that require
fp values to passed in integer regs in some cases, e.g. when returning
a complex.
llvm-svn: 46414
2008-01-27 17:42:27 +00:00
Chris Lattner
2e4719ec55
add a note
...
llvm-svn: 46413
2008-01-27 07:31:41 +00:00
Chris Lattner
d05d2011d0
Use fldz and fld1 for long double constants instead of a constant pool load.
...
llvm-svn: 46411
2008-01-27 06:19:31 +00:00
Chris Lattner
5e8bf5673b
make isExactlyValue work for long double.
...
llvm-svn: 46410
2008-01-27 06:19:08 +00:00
Bill Wendling
8c491162d2
The CorrelatedExpressions pass is now no more.
...
llvm-svn: 46409
2008-01-27 06:13:32 +00:00
Bill Wendling
60361a16f8
The CorrelatedExpressionElimination pass is known to be buggy. Remove it.
...
This fixes PR1769.
llvm-svn: 46408
2008-01-27 06:11:41 +00:00
Chris Lattner
f1a6c9fe86
For long double constants, print an approximation of their value to the .s file to make it easier to read.
...
llvm-svn: 46407
2008-01-27 06:09:28 +00:00
Chris Lattner
fa1e7eef30
Fold fptrunc(add (fpextend x), (fpextend y)) -> add(x,y), as GCC does.
...
llvm-svn: 46406
2008-01-27 05:29:54 +00:00
Chris Lattner
2dd23b9f32
Add some notes.
...
llvm-svn: 46405
2008-01-26 20:12:07 +00:00
Chris Lattner
250789f1bd
Remove some code for inferring alignment info from the x86 backend
...
now that the dag combiner does it.
llvm-svn: 46404
2008-01-26 20:07:42 +00:00
Chris Lattner
596704405f
New test to verify that "merging 4 loads into a vec load" continues to work and
...
continues to infer alignment info.
llvm-svn: 46403
2008-01-26 20:06:45 +00:00
Chris Lattner
1472c7fe76
make this 64-bit safe
...
llvm-svn: 46402
2008-01-26 19:50:30 +00:00