Bob Wilson
006089b761
Use __builtin_shufflevector to implement vget_low and vget_high intrinsics.
...
This was suggested by Edmund Grimley Evans in pr8411.
llvm-svn: 123043
2011-01-07 23:40:49 +00:00
Bob Wilson
3fa9c064c2
Add an explanatory message for an assertion.
...
llvm-svn: 123042
2011-01-07 23:40:46 +00:00
Matt Beaumont-Gay
5cc7a1fcad
Eliminate variable only used in debug builds.
...
llvm-svn: 123040
2011-01-07 22:34:58 +00:00
Devang Patel
acbee0b0d9
Speculatively revert r123032.
...
llvm-svn: 123039
2011-01-07 22:33:41 +00:00
Devang Patel
39bd6cebcd
Do not include DataTypes.h in llvm-c/lto.h.
...
This means avoid using uint32_t. This patch reverts r112200 and fixes original problem by fixing argument type in lto.cpp.
llvm-svn: 123038
2011-01-07 22:26:25 +00:00
Evan Cheng
36f0a06593
Fix comment. INLINEASM node operand #3 is IsAlignStack bit.
...
llvm-svn: 123036
2011-01-07 21:38:59 +00:00
Bob Wilson
6f2b8966ca
Lower some BUILD_VECTORS using VEXT+shuffle.
...
Patch by Tim Northover.
llvm-svn: 123035
2011-01-07 21:37:30 +00:00
Tobias Grosser
fc3d7f664b
InstCombine: Match min/max hidden by sext/zext
...
X = sext x; x >s c ? X : C+1 --> X = sext x; X <s C+1 ? C+1 : X
X = sext x; x <s c ? X : C-1 --> X = sext x; X >s C-1 ? C-1 : X
X = zext x; x >u c ? X : C+1 --> X = zext x; X <u C+1 ? C+1 : X
X = zext x; x <u c ? X : C-1 --> X = zext x; X >u C-1 ? C-1 : X
X = sext x; x >u c ? X : C+1 --> X = sext x; X <u C+1 ? C+1 : X
X = sext x; x <u c ? X : C-1 --> X = sext x; X >u C-1 ? C-1 : X
Instead of calculating this with mixed types promote all to the
larger type. This enables scalar evolution to analyze this
expression. PR8866
llvm-svn: 123034
2011-01-07 21:33:14 +00:00
Tobias Grosser
411e6eedff
Some whitespace fixes
...
llvm-svn: 123033
2011-01-07 21:33:13 +00:00
Devang Patel
6381e1584c
Appropriately truncate debug info range in dwarf output.
...
Enable live debug variables pass.
llvm-svn: 123032
2011-01-07 21:30:41 +00:00
Evan Cheng
0638c20e7c
DBG_VALUE does not have any side effects; it also makes no sense to mark it cheap as a copy.
...
llvm-svn: 123031
2011-01-07 21:08:26 +00:00
Benjamin Kramer
134cde912a
Revert 122959, it needs more thought. Add it back to README.txt with additional notes.
...
llvm-svn: 123030
2011-01-07 20:42:20 +00:00
Oscar Fuentes
9bf259581c
Don't use -O3 on Mingw, as people report it as unreliable. Use -O2
...
instead.
llvm-svn: 123028
2011-01-07 20:31:03 +00:00
Jay Foad
d81f3c9659
Simplify the allocation and freeing of Users' operand lists, now that
...
every BranchInst has a fixed number of operands.
llvm-svn: 123027
2011-01-07 20:29:02 +00:00
Jay Foad
814f1bb8e3
Remove the "ugly" method BranchInst::setUnconditionalDest().
...
llvm-svn: 123026
2011-01-07 20:26:51 +00:00
Jay Foad
89afb43b1e
Remove all uses of the "ugly" method BranchInst::setUnconditionalDest().
...
llvm-svn: 123025
2011-01-07 20:25:56 +00:00
Evan Cheng
a048c83fe4
Revert r122955. It seems using movups to lower memcpy can cause massive regression (even on Nehalem) in edge cases. I also didn't see any real performance benefit.
...
llvm-svn: 123015
2011-01-07 19:35:30 +00:00
David Greene
2f7cf7fcb4
Rename lisp-like functions as suggested by Gabor Greif as loooong time
...
ago. This is both easier to learn and easier to read.
llvm-svn: 123001
2011-01-07 17:05:37 +00:00
Benjamin Kramer
1ec7ecce86
Try to unbreak the arm buildbot.
...
llvm-svn: 122999
2011-01-07 11:35:21 +00:00
Bob Wilson
99da75c17d
Add testcases for PR8411 (vget_low and vget_high implemented as shuffles).
...
llvm-svn: 122997
2011-01-07 06:44:14 +00:00
Bob Wilson
8265d56638
Add ARM patterns to match EXTRACT_SUBVECTOR nodes.
...
Also fix an off-by-one in SelectionDAGBuilder that was preventing shuffle
vectors from being translated to EXTRACT_SUBVECTOR.
Patch by Tim Northover.
The test changes are needed to keep those spill-q tests from testing aligned
spills and restores. If the only aligned stack objects are spill slots, we
no longer realign the stack frame. Prior to this patch, an EXTRACT_SUBVECTOR
was legalized by loading from the stack, which created an aligned frame index.
Now, however, there is nothing except the spill slot in the stack frame, so
I added an aligned alloca.
llvm-svn: 122995
2011-01-07 04:59:04 +00:00
Bob Wilson
d23b3d2dfc
Fix a comment typo.
...
llvm-svn: 122994
2011-01-07 04:58:58 +00:00
Bob Wilson
f291cb268f
Change EXTRACT_SUBVECTOR to require a constant index.
...
We were never generating any of these nodes with variable indices, and there
was one legalizer function asserting on a non-constant index. If we ever have
a need to support variable indices, we can add this back again.
llvm-svn: 122993
2011-01-07 04:58:56 +00:00
Bill Wendling
34e2bc0f08
Early exit if we don't have invokes. The 'Unwinds' vector isn't modified unless
...
we have invokes, so there is no functionality change here.
llvm-svn: 122990
2011-01-07 02:54:45 +00:00
Duncan Sands
61c5708b51
Fix the other problem reported in PR8582. Testcase and patch by
...
Nadav Rotem.
llvm-svn: 122983
2011-01-06 23:45:22 +00:00
Duncan Sands
64b75da088
Add a testcase for PR8582, which mysteriously fixed itself, in case the problem
...
comes back some day.
llvm-svn: 122982
2011-01-06 23:04:29 +00:00
Eric Christopher
e516af753b
Add some fairly duplicated code to let type legalization split illegal
...
typed atomics. This will lower exclusively to libcalls at the moment.
llvm-svn: 122979
2011-01-06 22:28:56 +00:00
Chris Lattner
84184b7207
With Benjamin's recent amazing patches, we should be able to do even better things :)
...
llvm-svn: 122978
2011-01-06 22:25:00 +00:00
Chris Lattner
171608e738
use isNullValue() to simplify code, add an assert.
...
llvm-svn: 122977
2011-01-06 22:24:29 +00:00
Devang Patel
70eb982843
Emit 128 bit constant.
...
This fixes PR 8913 crash.
llvm-svn: 122971
2011-01-06 21:39:25 +00:00
Bob Wilson
914df82a2e
PR8921: LDM/POP do not support interworking prior to v5t.
...
llvm-svn: 122970
2011-01-06 19:24:41 +00:00
Bob Wilson
e0bafd93b0
Remove extra whitespace.
...
llvm-svn: 122969
2011-01-06 19:24:36 +00:00
Bob Wilson
7c2c626805
Fix comment typo.
...
llvm-svn: 122968
2011-01-06 19:24:32 +00:00
Benjamin Kramer
1e01ade2e8
Add a note from llvmdev, this time with more info.
...
llvm-svn: 122966
2011-01-06 17:35:50 +00:00
Abramo Bagnara
a41d7aebee
Fixed parsing of hex floats.
...
llvm-svn: 122963
2011-01-06 16:55:14 +00:00
Rafael Espindola
9f9a10691a
Correctly disassemble truncated asm.
...
Patch by Richard Simth.
llvm-svn: 122962
2011-01-06 16:48:42 +00:00
Benjamin Kramer
ae67cc13a9
InstCombine: Turn _chk functions into the "unsafe" variant if length and max langth are equal.
...
This happens when we take the (non-constant) length from a malloc.
llvm-svn: 122961
2011-01-06 14:22:52 +00:00
Benjamin Kramer
605f21a6c8
EarlyCSE does this now (and GVN always did it).
...
llvm-svn: 122960
2011-01-06 13:19:46 +00:00
Benjamin Kramer
799b011276
InstCombine: If we call llvm.objectsize on a malloc call we can replace it with the size passed to malloc.
...
llvm-svn: 122959
2011-01-06 13:11:05 +00:00
Benjamin Kramer
a76cc117e0
InstCombine: Teach llvm.objectsize folding to look through GEPs.
...
llvm-svn: 122958
2011-01-06 13:07:49 +00:00
Benjamin Kramer
3aa955e906
Remove dead code and silence warnings.
...
llvm-svn: 122957
2011-01-06 13:01:02 +00:00
Evan Cheng
7998b1d6fe
Use movups to lower memcpy and memset even if it's not fast (like corei7).
...
The theory is it's still faster than a pair of movq / a quad of movl. This
will probably hurt older chips like P4 but should run faster on current
and future Intel processors. rdar://8817010
llvm-svn: 122955
2011-01-06 07:58:36 +00:00
Chris Lattner
245de78e06
add a note about object size from drystone, add a poorly optimized loop from 179.art.
...
llvm-svn: 122954
2011-01-06 07:41:22 +00:00
Chris Lattner
73552c2cce
add a trivial instcombine missed in Dhrystone
...
llvm-svn: 122953
2011-01-06 07:09:23 +00:00
Evan Cheng
3ae2b79aa3
Re-implement r122936 with proper target hooks. Now getMaxStoresPerMemcpy
...
etc. takes an option OptSize. If OptSize is true, it would return
the inline limit for functions with attribute OptSize.
llvm-svn: 122952
2011-01-06 06:52:41 +00:00
Chris Lattner
5858e091a6
implement constant folding support for an exotic constant expr:
...
ret i64 ptrtoint (i8* getelementptr ([1000 x i8]* @X , i64 1, i64 sub (i64 0, i64 ptrtoint ([1000 x i8]* @X to i64))) to i64)
to "ret i64 1000". This allows us to correctly compute the trip count
on a loop in PR8883, which occurs with std::fill on a char array. This
allows us to transform it into a memset with a constant size.
llvm-svn: 122950
2011-01-06 06:19:46 +00:00
Evan Cheng
c052ba7ff3
Revert r122936. I'll re-implement the change.
...
llvm-svn: 122949
2011-01-06 06:17:53 +00:00
Michael J. Spencer
1d3c4a7b94
UnitTests/Path: Add magical tests. This will also test identify_magic.
...
llvm-svn: 122948
2011-01-06 05:58:02 +00:00
Michael J. Spencer
1f06360002
UnitTests/Path: More ASSERT_NO_ERROR cleanup.
...
llvm-svn: 122947
2011-01-06 05:57:54 +00:00
Cameron Zwarich
9ec19ea06a
Add the CallInst optimizations that don't involve expanding inline assembly to
...
OptimizeInst() so that they can be used on a worklist instruction.
llvm-svn: 122945
2011-01-06 02:56:42 +00:00