Tanya Lattner [Wed, 30 Jan 2008 05:15:15 +0000 (05:15 +0000)]
Pointers change size depending upon the target. Remove them to make the test more stable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46548
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 30 Jan 2008 03:57:33 +0000 (03:57 +0000)]
Skip over the label which marks the beginning of the function before inserting prologue code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46546
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Wed, 30 Jan 2008 03:10:00 +0000 (03:10 +0000)]
Back out mods to llvmAsmParser, incorrectly committed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46545
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Wed, 30 Jan 2008 02:55:46 +0000 (02:55 +0000)]
More cleanups for CellSPU:
- Expand tabs... (poss 80-col violations, will get them later...)
- Consolidate logic for SelectDFormAddr and SelectDForm2Addr into a single
function, simplifying maintenance. Also reduced custom instruction
generation for SPUvecinsert/INSERT_MASK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46544
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 30 Jan 2008 01:24:47 +0000 (01:24 +0000)]
Make DSE much more aggressive by performing DCE earlier. Update a testcase to reflect this increased aggressiveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46542
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 30 Jan 2008 01:24:05 +0000 (01:24 +0000)]
Fix an issue where, under very specific circumstances, memdep could end up dereferencing the end
of one of its internal maps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46541
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 00:39:15 +0000 (00:39 +0000)]
Fix a bug where scalarrepl would discard offset if type would match.
In practice this can only happen on code with already undefined behavior,
but this is still a good thing to handle correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46539
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 30 Jan 2008 00:15:11 +0000 (00:15 +0000)]
Factor the addressing mode and the load/store VT out of LoadSDNode
and StoreSDNode into their common base class LSBaseSDNode. Member
functions getLoadedVT and getStoredVT are replaced with the common
getMemoryVT to simplify code that will handle both loads and stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46538
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 29 Jan 2008 19:34:22 +0000 (19:34 +0000)]
Work in progress. This patch *fixes* x86-64 calls which are modelled as StructRet but really should be return in registers, e.g. _Complex long double, some 128-bit aggregates. This is a short term solution that is necessary only because llvm, for now, cannot model i128 nor call's with multiple results.
Status: This only works for direct calls, and only the caller side is done. Disabled for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46527
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 29 Jan 2008 19:30:05 +0000 (19:30 +0000)]
Update this test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46526
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 29 Jan 2008 19:29:08 +0000 (19:29 +0000)]
When expanding an operand, it's not the result value
type that matters but the operand type. This fixes
2008-01-08-IllegalCMP.ll which crashed with the new
legalize infrastructure because SETCC with result
type i8 and operand type i64 was being custom expanded
by the X86 backend. With this fix, the gcc build gets
as far as the first libcall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46525
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Jan 2008 19:01:37 +0000 (19:01 +0000)]
Don't let globalopt hack on volatile loads or stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46523
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 18:55:14 +0000 (18:55 +0000)]
Altered ctor for APSInt to accept an optional "isUnsigned" flag. Default
behavior is unchanged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46521
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jan 2008 13:02:09 +0000 (13:02 +0000)]
Use empty() instead of comparing size() with zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46514
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jan 2008 12:43:50 +0000 (12:43 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46513
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jan 2008 12:35:50 +0000 (12:35 +0000)]
Update this file for 2.0 syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46512
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jan 2008 12:12:40 +0000 (12:12 +0000)]
Add comments describing what the loop depth values mean. Also, make a
minor simplification to the loop depth calculation code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46511
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jan 2008 12:09:55 +0000 (12:09 +0000)]
Fix 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46510
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jan 2008 12:08:20 +0000 (12:08 +0000)]
Remove top-level const qualifiers from casts, avoiding associated
compiler warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46509
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jan 2008 12:07:11 +0000 (12:07 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46508
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jan 2008 12:06:33 +0000 (12:06 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46507
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 29 Jan 2008 11:36:12 +0000 (11:36 +0000)]
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46506
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Jan 2008 07:00:44 +0000 (07:00 +0000)]
llvm.sqrt(-0.0) is defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46500
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Jan 2008 06:52:45 +0000 (06:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46499
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 29 Jan 2008 06:40:32 +0000 (06:40 +0000)]
Add a testcase for eliminating memcpy's at the end of functions. Forgot to commit this with my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46497
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Jan 2008 06:26:07 +0000 (06:26 +0000)]
Add target triples to these so they don't fail on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46496
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 29 Jan 2008 06:23:44 +0000 (06:23 +0000)]
Use getPreferredAlignmentLog or getPreferredAlignment
to get the alignment of global variables, rather than
using hand-made versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46495
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 29 Jan 2008 06:18:36 +0000 (06:18 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46494
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 29 Jan 2008 06:04:54 +0000 (06:04 +0000)]
This would be better done as an executable test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46493
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 29 Jan 2008 05:57:23 +0000 (05:57 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46492
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 29 Jan 2008 02:32:13 +0000 (02:32 +0000)]
RegAllocBigBlock doesn't need LiveVariables either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46488
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Tue, 29 Jan 2008 02:29:31 +0000 (02:29 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46487
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 29 Jan 2008 02:24:00 +0000 (02:24 +0000)]
Properly expand extract-element for non-power-of-2 codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46486
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 29 Jan 2008 02:21:21 +0000 (02:21 +0000)]
Handle 'X' constraint in asm's better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46485
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 29 Jan 2008 02:20:41 +0000 (02:20 +0000)]
Filter loops that subtract induction variables.
These loops are not yet handled.
Fix PR 1912.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46484
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Tue, 29 Jan 2008 02:16:57 +0000 (02:16 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46483
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 29 Jan 2008 01:10:04 +0000 (01:10 +0000)]
New test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46479
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 29 Jan 2008 00:41:29 +0000 (00:41 +0000)]
Add test to make sure that #pragma mark/error doesn't error if there are
unbalanced quotes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46476
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 28 Jan 2008 22:05:23 +0000 (22:05 +0000)]
Added destructor for template class FoldingSetNodeWrapper.
Added getValue() to FoldingSetNodeWrapper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46465
91177308-0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Mon, 28 Jan 2008 20:02:51 +0000 (20:02 +0000)]
Simplify the code and fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46458
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 28 Jan 2008 19:25:47 +0000 (19:25 +0000)]
Pure/const functions with ByVal parameters cannot
be marked readonly either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46456
91177308-0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Mon, 28 Jan 2008 18:23:23 +0000 (18:23 +0000)]
Fix fpcmp infinite loop when comparing "29-266" with "29-268".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46455
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Jan 2008 17:38:46 +0000 (17:38 +0000)]
this test is now compiled into the right thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46454
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 28 Jan 2008 17:38:30 +0000 (17:38 +0000)]
Unbreak builds with differing object and source
directories. Patch by Sam Bishop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46453
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 28 Jan 2008 10:35:11 +0000 (10:35 +0000)]
Make this more likely to be passed byval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46451
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 28 Jan 2008 09:15:03 +0000 (09:15 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Jan 2008 04:41:43 +0000 (04:41 +0000)]
Transform calls to memcpy into llvm.memcpy calls, patch by Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46433
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Jan 2008 04:18:41 +0000 (04:18 +0000)]
reduce duplicate -I flags passed to the compiler, cleaning up the VERBOSE
output. Patch contributed by Sam Bishop!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46432
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 28 Jan 2008 03:48:02 +0000 (03:48 +0000)]
Handle some more combinations of extend and icmp. Fixes PR1940.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46431
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Jan 2008 00:58:18 +0000 (00:58 +0000)]
Fix PR1932 by disabling an xform invalid for fdiv.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46429
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Jan 2008 00:36:27 +0000 (00:36 +0000)]
make handling of overflow and undefined results much more clear.
Patch by Eli Friedman, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46428
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Jan 2008 00:32:30 +0000 (00:32 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46427
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 23:43:26 +0000 (23:43 +0000)]
Always for PACKAGEVERSION to 'mainline' for teh llvm web page.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46425
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 23:32:17 +0000 (23:32 +0000)]
Fix PowerPC/./2007-10-18-PtrArithmetic.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46424
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 23:26:37 +0000 (23:26 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46423
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 23:21:58 +0000 (23:21 +0000)]
fix a crash on CodeGen/X86/vector-rem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46422
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 22:58:59 +0000 (22:58 +0000)]
Add support for frameworks. Patch by Shantonu Sen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46421
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sun, 27 Jan 2008 22:00:00 +0000 (22:00 +0000)]
Reg alloc doesn't really need LiveVariables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46420
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sun, 27 Jan 2008 19:51:03 +0000 (19:51 +0000)]
Fixes for BreakCriticalMachineCodeEdge by Fernando.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46419
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 27 Jan 2008 18:35:00 +0000 (18:35 +0000)]
Be more careful modifying the use_list while also iterating through it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46417
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 27 Jan 2008 18:12:58 +0000 (18:12 +0000)]
Revert r46393: readonly/readnone functions are no
longer allowed to write through byval arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46416
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 17:42:27 +0000 (17:42 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46414
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 07:31:41 +0000 (07:31 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46413
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 06:19:31 +0000 (06:19 +0000)]
Use fldz and fld1 for long double constants instead of a constant pool load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46411
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 06:19:08 +0000 (06:19 +0000)]
make isExactlyValue work for long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46410
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 27 Jan 2008 06:13:32 +0000 (06:13 +0000)]
The CorrelatedExpressions pass is now no more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46409
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 27 Jan 2008 06:11:41 +0000 (06:11 +0000)]
The CorrelatedExpressionElimination pass is known to be buggy. Remove it.
This fixes PR1769.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46408
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 06:09:28 +0000 (06:09 +0000)]
For long double constants, print an approximation of their value to the .s file to make it easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 05:29:54 +0000 (05:29 +0000)]
Fold fptrunc(add (fpextend x), (fpextend y)) -> add(x,y), as GCC does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46406
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jan 2008 20:12:07 +0000 (20:12 +0000)]
Add some notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46405
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jan 2008 20:07:42 +0000 (20:07 +0000)]
Remove some code for inferring alignment info from the x86 backend
now that the dag combiner does it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46404
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jan 2008 20:06:45 +0000 (20:06 +0000)]
New test to verify that "merging 4 loads into a vec load" continues to work and
continues to infer alignment info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46403
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jan 2008 19:50:30 +0000 (19:50 +0000)]
make this 64-bit safe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46402
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jan 2008 19:45:50 +0000 (19:45 +0000)]
Infer alignment of loads and increase their alignment when we can tell they are
from the stack. This allows us to compile stack-align.ll to:
_test:
movsd LCPI1_0, %xmm0
movapd %xmm0, %xmm1
*** andpd 4(%esp), %xmm1
andpd _G, %xmm0
addsd %xmm1, %xmm0
movl 20(%esp), %eax
movsd %xmm0, (%eax)
ret
instead of:
_test:
movsd LCPI1_0, %xmm0
** movsd 4(%esp), %xmm1
** andpd %xmm0, %xmm1
andpd _G, %xmm0
addsd %xmm1, %xmm0
movl 20(%esp), %eax
movsd %xmm0, (%eax)
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46401
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jan 2008 19:35:46 +0000 (19:35 +0000)]
remove a useless xfailed test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46400
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 26 Jan 2008 12:33:01 +0000 (12:33 +0000)]
Invert this test, because it is wrong if we allow
readonly functions to use byval parameters as local
storage (how much do we want this?).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46399
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 26 Jan 2008 09:03:52 +0000 (09:03 +0000)]
If there's no instructions being emitted on X86 for a function, emit a
nop. Emit the nop directly for PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46398
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 26 Jan 2008 06:56:08 +0000 (06:56 +0000)]
Need to convert to LLVM code and not C.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46397
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 26 Jan 2008 06:53:40 +0000 (06:53 +0000)]
Rename the .c to .ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46396
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 26 Jan 2008 06:53:06 +0000 (06:53 +0000)]
Move testcase to the code gen directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46395
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 26 Jan 2008 06:51:24 +0000 (06:51 +0000)]
If there are no machine instructions emitted for a function, then insert
a "nop" instruction so that we don't have the function's label associated
with something that it's not supposed to be associated with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46394
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 26 Jan 2008 06:41:49 +0000 (06:41 +0000)]
Create an explicit copy for byval parameters even
when inlining a readonly function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46393
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 26 Jan 2008 01:43:44 +0000 (01:43 +0000)]
If we have a function like this:
void bork() {
int *address = 0;
*address = 0;
}
It's compiled into LLVM code that looks like this:
define void @bork() noreturn nounwind {
entry:
unreachable
}
This is bad on some platforms (like PPC) because it will generate the label for
the function but no body. The label could end up being associated with some
non-code related stuff, like a section. This places a "trap" instruction if the
SimplifyCFG pass removed all code from the function leaving only one
"unreachable" instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46387
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 26 Jan 2008 01:21:48 +0000 (01:21 +0000)]
Add another testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46385
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jan 2008 01:09:19 +0000 (01:09 +0000)]
Fix some bugs in SimplifyNodeWithTwoResults where it would call deletenode to
delete a node even if it was not dead in some cases. Instead, just add it to
the worklist. Also, make sure to use the CombineTo methods, as it was doing
things that were unsafe: the top level combine loop could touch dangling memory.
This fixes CodeGen/Generic/2008-01-25-dag-combine-mul.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46384
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jan 2008 01:05:42 +0000 (01:05 +0000)]
don't bother making x&-1 only to simplify it in dag combine. This commonly occurs expanding i64 ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46383
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 26 Jan 2008 00:35:43 +0000 (00:35 +0000)]
New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46382
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 23:34:24 +0000 (23:34 +0000)]
reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46377
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 22:36:24 +0000 (22:36 +0000)]
add a testcase for a bug Duncan pointed out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46372
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 25 Jan 2008 22:06:51 +0000 (22:06 +0000)]
Do this more neatly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46369
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 17:49:41 +0000 (17:49 +0000)]
Reorder a field to reduce the size of StackObject. Note that this
may require a clean rebuild on leopard. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46360
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 25 Jan 2008 17:36:44 +0000 (17:36 +0000)]
Test for PR1942.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46357
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 17:24:52 +0000 (17:24 +0000)]
fix long lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46355
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 16:41:09 +0000 (16:41 +0000)]
JITEmitter.cpp was trying to sync the icache for function stubs, but
was actually passing a completely incorrect size to sys_icache_invalidate.
Instead of having the JITEmitter do this (which doesn't have the correct
size), just make the target sync its own stubs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46354
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 25 Jan 2008 10:20:53 +0000 (10:20 +0000)]
Add more assertions to catch accesses outside of
arrays. Also, as a convenience, don't barf, just
return false, if someone calls isTruncStoreLegal
or isLoadXLegal with an extended type for the in
memory type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46352
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 25 Jan 2008 10:10:33 +0000 (10:10 +0000)]
DeadStoreElimination can treat byval parameters as if there were alloca's for the purpose of removing end-of-function stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46351
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 07:29:34 +0000 (07:29 +0000)]
move this field back. Moving the field causes miscompilations (!) of voronoi and others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46350
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 07:20:16 +0000 (07:20 +0000)]
Add skeletal code to increase the alignment of loads and stores when
we can infer it. This will eventually help stuff, though it doesn't
do much right now because all fixed FI's have an alignment of 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46349
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 07:19:06 +0000 (07:19 +0000)]
move MachineFrameInfo::CreateFixedObject out of line, give MachineFrameInfo
a reference to TargetFrameInfo. Rearrange order of fields in StackObject to
save a word.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46348
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 06:40:45 +0000 (06:40 +0000)]
include alignment and volatility information in -view-*-dags output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46347
91177308-0d34-0410-b5e6-
96231b3b80d8