Wojciech Matyjewicz [Sun, 20 Jul 2008 15:55:14 +0000 (15:55 +0000)]
Fix PR2088. Use modulo linear equation solver to compute loop iteration
count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53810
91177308-0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Sun, 20 Jul 2008 12:04:49 +0000 (12:04 +0000)]
Updated VC++ projects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53809
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 20 Jul 2008 02:32:23 +0000 (02:32 +0000)]
Fix for first part of PR2562. Generate the "pinsrw" instruction for inserts
into v4i16 vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53807
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 20 Jul 2008 00:11:19 +0000 (00:11 +0000)]
Pull r53795 from Gaz into mainline:
If .loc and .file aren't used, always emit the "debug_line" section. This
requires at least one entry in the line matrix. So if there's nothing to emit
into the matrix, emit an end of matrix value anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53803
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 21:44:57 +0000 (21:44 +0000)]
Unbreak build: 'DarwinTargetAsmInfo' was already taken as PPC TAI flavour.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53801
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 19 Jul 2008 16:26:02 +0000 (16:26 +0000)]
Make sure custom lowering for LegalizeTypes
returns a node with the right number of
return values. This fixes codegen of
Generic/cast-fp.ll, Generic/fp_to_int.ll
and PowerPC/multiple-return-values.ll
when using -march=ppc32 -mattr=+64bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53794
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 19 Jul 2008 15:52:06 +0000 (15:52 +0000)]
XFAIL this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53793
91177308-0d34-0410-b5e6-
96231b3b80d8
Wojciech Matyjewicz [Sat, 19 Jul 2008 13:26:15 +0000 (13:26 +0000)]
While testing particular algorithms to compute loop iteration count the brute
force evaluation (ComputeIterationCountExhaustively) should be turned off.
It doesn't apply to trip-count2.ll because this file tests the brute force
evaluation.
The test for PR2364 (2008-05-25-NegativeStepToZero.ll) currently fails
showing that the patch for this bug doesn't work. I'll fix it in a few hours
with a patch for PR2088.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53792
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 13:16:32 +0000 (13:16 +0000)]
Use chars, where possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53791
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 13:16:11 +0000 (13:16 +0000)]
Switch MIPS to new ELFTargetAsmInfo. Add few FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53790
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 13:15:46 +0000 (13:15 +0000)]
Fix a FIXME :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53789
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 13:15:21 +0000 (13:15 +0000)]
Use generic ELFTargetAsmInfo and DarwinTargetAsmInfo for X86 code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53788
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 13:14:46 +0000 (13:14 +0000)]
Add TargetAsmInfo stuff for all darwin-based targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53787
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 13:14:11 +0000 (13:14 +0000)]
Add TargetAsmInfo for all ELF-based targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53786
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 06:31:12 +0000 (06:31 +0000)]
Testcase for PR2549
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53785
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 06:30:51 +0000 (06:30 +0000)]
Use aligned stack spills, where possible. This fixes PR2549.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53784
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 19 Jul 2008 05:52:44 +0000 (05:52 +0000)]
Remove bogus assertion. This unbreaks mingw, where ConstantSDNode
has alignment 8 and LoadSDNode (used as LargestT template) - 4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53782
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Sat, 19 Jul 2008 00:58:07 +0000 (00:58 +0000)]
tentative definitions are default visibility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53780
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 19 Jul 2008 00:37:25 +0000 (00:37 +0000)]
Fix a memory leak in LiveIntervalAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53779
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 18 Jul 2008 23:47:27 +0000 (23:47 +0000)]
typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53778
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 18 Jul 2008 23:46:41 +0000 (23:46 +0000)]
If all linker input files are native object files then lto-bugpoint is not useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53777
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 18 Jul 2008 22:59:45 +0000 (22:59 +0000)]
Start writing lto-bugpoint tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53774
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 18 Jul 2008 21:18:48 +0000 (21:18 +0000)]
Softfloat support for FDIV. Patch by
Richard Pennington.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53773
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 18 Jul 2008 21:07:41 +0000 (21:07 +0000)]
Eliminate unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53772
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 18 Jul 2008 21:06:02 +0000 (21:06 +0000)]
Supress a gcc-4.3 warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53771
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 18 Jul 2008 20:12:05 +0000 (20:12 +0000)]
Revert 53729, after waking up in the middle of
the night realising that it was wrong :) I
think the reason the same type was being used
for the shufflevec of indices as for the actual
indices is so that if one of them needs splitting
then so does the other. After my patch it might
be that the indices need splitting but not the
rest, yet there is no good way of handling that.
I think the right solution is to not have the
shufflevec be an operand at all: just have it
be the list of numbers it actually is, stored
as extra info in the node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53768
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Jul 2008 18:43:12 +0000 (18:43 +0000)]
In the CBackend, use casts to force integer add, subtract, and
multiply to be done as unsigned, so that they have well defined
behavior on overflow. This fixes PR2408.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53767
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Jul 2008 18:28:56 +0000 (18:28 +0000)]
Fix a LocalSpiller leak. This fixes tramp3d-v4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53766
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 18 Jul 2008 18:03:38 +0000 (18:03 +0000)]
Make PRE actually handle critical edges (by splitting them). Confirmed that bootstrap passes with this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53762
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 18 Jul 2008 17:49:43 +0000 (17:49 +0000)]
Reapply r53735. My last patch fixed the failures Dan observed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53761
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 18 Jul 2008 17:46:41 +0000 (17:46 +0000)]
Add some checks that got lost in the shuffle. This fixes 464.h264ref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53760
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 18 Jul 2008 16:44:49 +0000 (16:44 +0000)]
Revert r53735. It broke SPEC 464.h264ref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53757
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jul 2008 05:23:39 +0000 (05:23 +0000)]
verify limits-fndefn.c from the GCC testsuite before the
heat death of the universe, fixing an O(N^2) problem in the
size of a basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53749
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 17 Jul 2008 23:49:46 +0000 (23:49 +0000)]
Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.
Fix a leak that this turned up in LowerSubregs.cpp.
And, comment a leak in LiveIntervalAnalysis.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53746
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 17 Jul 2008 21:12:16 +0000 (21:12 +0000)]
When printing MemOperand nodes, only use print() for
PseudoSourceValue values, which never have names. Use getName()
for all other values, because we want to print just a short summary
of the value, not the entire instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53738
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 17 Jul 2008 20:00:46 +0000 (20:00 +0000)]
Use MergeBlockIntoPredecessor to simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53735
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Jul 2008 19:48:53 +0000 (19:48 +0000)]
Subreg live interval valno may not have a corresponding def machineinstr since it's less precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53734
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Jul 2008 19:48:04 +0000 (19:48 +0000)]
Add nounwind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53733
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 17 Jul 2008 19:46:54 +0000 (19:46 +0000)]
test commit access
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53732
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 17 Jul 2008 19:42:29 +0000 (19:42 +0000)]
Make MergeBlockIntoPredecessor more aggressive when the same successor appears
more than once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53731
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 17 Jul 2008 19:41:00 +0000 (19:41 +0000)]
Enable PRE. My last batch of changes fixed the miscompile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53730
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 17 Jul 2008 19:28:41 +0000 (19:28 +0000)]
Use a legal type for elements of the vector_shuffle
mask. These are just indices into the shuffled vector
so their type is unrelated to the type of the
shuffled elements (which is what was being used before).
This fixes vec_shuffle-11.ll when using LegalizeTypes.
What seems to have happened is that Dan's recent change
r53687, which corrected the result type of the shuffle,
somehow caused LegalizeTypes to notice that the mask
operand was a BUILD_VECTOR with a legal type but elements
of an illegal type (i64). LegalizeTypes legalized this
by introducing a new BUILD_VECTOR of i32 and bitcasting
it to the old type. But the mask operand is not supposed
to be a bitcast but a straight BUILD_VECTOR of constants,
causing a crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53729
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 17 Jul 2008 19:10:17 +0000 (19:10 +0000)]
Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk
replacement of multiple values. This is slightly more efficient
than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically
could be optimized even further. However, an important property of this
new function is that it handles the case where the source value set and
destination value set overlap. This makes it feasible for isel to use
SelectNodeTo in many very common cases, which is advantageous because
SelectNodeTo avoids a temporary node and it doesn't require CSEMap
updates for users of values that don't change position.
Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to
handle operand lists more efficiently, and to correctly handle a number
of corner cases to which its new wider use exposes it.
This commit also includes a change to the encoding of post-isel opcodes
in SDNodes; now instead of being sandwiched between the target-independent
pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel
opcodes are now represented as negative values. This makes it possible
to test if an opcode is pre-isel or post-isel without having to know
the size of the current target's post-isel instruction set.
These changes speed up llc overall by 3% and reduce memory usage by 10%
on the InstructionCombining.cpp testcase with -fast and -regalloc=local.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53728
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Jul 2008 18:41:20 +0000 (18:41 +0000)]
Indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53727
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 17 Jul 2008 17:35:14 +0000 (17:35 +0000)]
LegalizeTypes support for what seems to be the
only missing ppc long double operations: FNEG
and FP_EXTEND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53723
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 17 Jul 2008 17:21:14 +0000 (17:21 +0000)]
Remove unnecessary readme entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53722
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 17 Jul 2008 17:06:03 +0000 (17:06 +0000)]
Turn LegalizeTypes back off again for the moment:
it is breaking Darwin bootstrap due to missing
functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53721
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 17 Jul 2008 17:04:58 +0000 (17:04 +0000)]
Fix a typo in last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53720
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 17 Jul 2008 16:51:19 +0000 (16:51 +0000)]
SSE codegen for vsetcc nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53719
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Thu, 17 Jul 2008 11:59:53 +0000 (11:59 +0000)]
Make GlobalOpt preserve address spaces when scalar replacing aggregate globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53716
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Jul 2008 06:07:20 +0000 (06:07 +0000)]
Fix PR2553
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53715
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 17 Jul 2008 04:54:06 +0000 (04:54 +0000)]
When lowering certain atomics, we need to copy the memoperand from the old
atomic operation to the new one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53714
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 17 Jul 2008 02:36:29 +0000 (02:36 +0000)]
Factorize some code for determining which libcall to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53713
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 17 Jul 2008 01:31:49 +0000 (01:31 +0000)]
Inliner tweak. Function calls should cost more than one instruction!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53712
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 17 Jul 2008 00:01:40 +0000 (00:01 +0000)]
Factor MergeBlockIntoPredecessor out into BasicBlockUtils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53705
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 16 Jul 2008 19:49:09 +0000 (19:49 +0000)]
Name string length is end position marker - begin position marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53697
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 16 Jul 2008 18:06:52 +0000 (18:06 +0000)]
Do not forget global definitions from inline asm code block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53693
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 16 Jul 2008 17:54:34 +0000 (17:54 +0000)]
Mark function used by asm block as used, otherwise optimizer may not see the use and may delete the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53692
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 16 Jul 2008 17:52:31 +0000 (17:52 +0000)]
There's no need to iterate block merging and PRE. In fact, iterating the latter
could cause problems for memdep when it breaks critical edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53691
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Wed, 16 Jul 2008 17:17:29 +0000 (17:17 +0000)]
Somehow, custom lowering of i64 multiplications got dropped along the way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53689
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 16 Jul 2008 16:20:48 +0000 (16:20 +0000)]
Fix the result type of X86's truncate to i8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53688
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 16 Jul 2008 16:13:58 +0000 (16:13 +0000)]
Fix the result type of a VECTOR_SHUFFLE+BIT_CONVERT dagcombine. This
was turned up by some new SelectionDAG assertion checks that I'm
working on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53687
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 16 Jul 2008 16:04:07 +0000 (16:04 +0000)]
Fix the name of BreakCriticalMachineEdge.h's include guard
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53686
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 16 Jul 2008 16:03:31 +0000 (16:03 +0000)]
Correct a top-level comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53685
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 16 Jul 2008 16:03:07 +0000 (16:03 +0000)]
Add support for promoting and expanding AssertZext
and AssertSext. Needed when passing huge integer
parameters with the zeroext or signext attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53684
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 16 Jul 2008 16:02:59 +0000 (16:02 +0000)]
Clarify the comments here, to make slightly more clear the
difference in purpose of TargetInstrInfo and TargetInstrDesc,
which isn't immediately obvious from the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53683
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 16 Jul 2008 15:59:56 +0000 (15:59 +0000)]
Tidy a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53682
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 16 Jul 2008 15:57:10 +0000 (15:57 +0000)]
Fix a comment to say nonnegative instead of positive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53681
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 16 Jul 2008 15:56:42 +0000 (15:56 +0000)]
Add an assert to check for empty flags for MachineMemOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53680
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 16 Jul 2008 13:37:36 +0000 (13:37 +0000)]
Test passing of integer parameters for integers
of all sizes from i1 to i256. The code is not
always that great, for example (x86)
movw %di, %ax
movw %ax, i17_s
where the store could be directly from %di.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53677
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 16 Jul 2008 13:10:20 +0000 (13:10 +0000)]
Test codegen of loads and stores of all integer
sizes from i1 to i256. The generated code is
like one huge bug report of things that the DAG
combiner fails to simplify!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53676
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Wed, 16 Jul 2008 12:57:25 +0000 (12:57 +0000)]
Add a few cases to instcombine's extractvalue testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53675
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Wed, 16 Jul 2008 12:56:52 +0000 (12:56 +0000)]
Un-XFAIL multdeadretval, since instcombine now properly handles the mess deadargelim leaves behind :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53674
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Wed, 16 Jul 2008 12:55:45 +0000 (12:55 +0000)]
Redo InstCombiner::visitExtractValueInst. Instead of using the (complicate)
FindInsertedValue, it now performs a number of simple transformations that
should result in the same effect when applied iteratively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53673
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 16 Jul 2008 11:41:33 +0000 (11:41 +0000)]
Reorder methods alphabetically. No functionality change.
While this is not a wonderful organizing principle, it
does make it easy to find routines, and clear where to
insert new ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53672
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 16 Jul 2008 11:36:51 +0000 (11:36 +0000)]
Turn on LegalizeTypes by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53671
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Wed, 16 Jul 2008 10:47:35 +0000 (10:47 +0000)]
Don't use ++idx_begin when I actually mean idx_begin + 1, especially since we
also use *idx_begin in the same expression, giving unpredictable results.
This fixes this bug: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-July/015877.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53670
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 16 Jul 2008 08:09:48 +0000 (08:09 +0000)]
The atomic.cmp.swap promotion logic is wrong: it
simply does the atomic.cmp.swap on the larger type,
which means it blows away whatever is sitting in
the bytes just after the memory location, i.e.
causes a buffer overflow. This really requires
target specific code, which is why LegalizeTypes
doesn't try to handle this case generically. The
existing (wrong) code in LegalizeDAG will go away
automatically once the type legalization code is
removed from LegalizeDAG so I'm leaving it there
for the moment. Meanwhile, don't test for this
feature.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53669
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 16 Jul 2008 07:28:14 +0000 (07:28 +0000)]
Fix PR2296. Do not transform x86_sse2_storel_dq into a full-width store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53666
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 16 Jul 2008 01:34:02 +0000 (01:34 +0000)]
x86-64 PIC JIT fixes: do not generate the extra load for external GV's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53661
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 16 Jul 2008 01:33:08 +0000 (01:33 +0000)]
X86-64 PIC jump table values are different from x86-32 cases, they are dest - table base.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53660
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 15 Jul 2008 18:37:51 +0000 (18:37 +0000)]
TargetAsmInfo::SectionForGlobal showed up in a profile. Simplify it a little.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53639
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 15 Jul 2008 18:29:32 +0000 (18:29 +0000)]
SelectionDAG::AssignNodeIds is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53636
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 15 Jul 2008 18:18:54 +0000 (18:18 +0000)]
Don't sort SDNodes by their addresses in SelectionDAG::dump. Instead,
just use the AllNodes order, which is at least relatively stable
across runs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53632
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 15 Jul 2008 17:59:02 +0000 (17:59 +0000)]
Revert this, as it seems to still be broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53627
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 15 Jul 2008 16:28:23 +0000 (16:28 +0000)]
Enable local PRE by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53616
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 15 Jul 2008 16:28:06 +0000 (16:28 +0000)]
Have GVN do a pre-pass over the CFG that folds away unconditional branches where possible. This allows local PRE to be more aggressive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53615
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 16:05:09 +0000 (16:05 +0000)]
XFAIL the multdeadretval test for now, I will be fixing instcombine to make it work again tomorrow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53614
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Jul 2008 15:02:44 +0000 (15:02 +0000)]
LegalizeTypes support for fabs on ppc long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53613
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:57:01 +0000 (14:57 +0000)]
Remove a few tests which no longer hold for deadargelim (since it is now
allowed to canonicalize return values).
Add a test that checks if return value and function attributes are not removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53612
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:42:58 +0000 (14:42 +0000)]
Add a testcase for the canonicalizations now performed by deadargelim.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53611
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:42:31 +0000 (14:42 +0000)]
Allow deadargelim to change return types even though now values were dead. This
again canonicalizes {i32} into i32 and {} into void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53610
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:39:36 +0000 (14:39 +0000)]
Revert r53606. It turns out that explicitely tracking the liveness of the
return value as a whole in deadargelim is really not needed now that we simply
rebuild the old return value and actually prevents some canonicalization from
taking place.
This revert stops deadargelim from changing {i32} into i32 for now, but I'll
fix that next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53609
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:03:10 +0000 (14:03 +0000)]
Make deadargelim a bit less smart, so it doesn't choke on nested structs as
return values that are still (partially) live. Instead of updating all uses of
a call instruction after removing some elements, it now just rebuilds the
original struct (With undef gaps where the unused values were) and leaves it to
instcombine to clean this up.
The added testcase still fails currently, but this is due to instcombine which
isn't good enough yet. I will fix that part next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53608
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 13:39:08 +0000 (13:39 +0000)]
Don't use isa when we can reuse a previous dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53607
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 13:36:06 +0000 (13:36 +0000)]
Make DeadArgElim keep liveness of the return value as a whole in addition to
only the liveness of partial return values (for functions returning a struct).
This is more explicit to prevent unwanted changes in the return value.
In particular, deadargelim now canonicalizes a function returning {i32} to
returning i32 and {} to void, if the struct returned is not used in its
entirety, but only the single element is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53606
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 13:15:10 +0000 (13:15 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53605
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Jul 2008 10:18:22 +0000 (10:18 +0000)]
LegalizeTypes support for promotion of bswap.
In LegalizeDAG the value is zero-extended to
the new type before byte swapping. It doesn't
matter how the extension is done since the new
bits are shifted off anyway after the swap, so
extend by any old rubbish bits. This results
in the final assembler for the testcase being
one line shorter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53604
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Jul 2008 10:14:24 +0000 (10:14 +0000)]
LegalizeTypes support for promotion of SIGN_EXTEND_INREG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53603
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Jul 2008 10:12:34 +0000 (10:12 +0000)]
Reorder the integer promotion methods alphabetically.
No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53602
91177308-0d34-0410-b5e6-
96231b3b80d8