Dan Gohman
ae9b1685a8
Fix whitespace and 80-column violations.
...
llvm-svn: 131428
2011-05-16 22:09:53 +00:00
Stuart Hastings
aa02c0847d
Since I can't reproduce the failures from 131261, re-trying with a
...
simplified version. <rdar://problem/9298790>
llvm-svn: 131274
2011-05-13 00:51:54 +00:00
Stuart Hastings
8d57d8ea64
Revert 131266 and 131261 due to buildbot complaints.
...
rdar://problem/9298790
llvm-svn: 131269
2011-05-13 00:15:17 +00:00
Stuart Hastings
89f1b47e3a
Non-fast-isel followup to 129634; correctly handle branches controlled
...
by non-CMP expressions. The executable test case (129821) would test
this as well, if we had an "-O0 -disable-arm-fast-isel" LLVM-GCC
tester. Alas, the ARM assembly would be very difficult to check with
FileCheck.
The thumb2-cbnz.ll test is affected; it generates larger code (tst.w
vs. cmp #0 ), but I believe the new version is correct.
rdar://problem/9298790
llvm-svn: 131261
2011-05-12 23:36:41 +00:00
Stuart Hastings
999fa3bf1f
Correctly walk through nested and adjacent CALLSEQ_START nodes. No
...
test case; I've only seen this on a release branch, and I can't get it
to reproduce on trunk. rdar://problem/7662569
llvm-svn: 131152
2011-05-10 21:20:03 +00:00
Eric Christopher
bcaedb5ce0
Rewrite the expander for umulo/smulo to remember to sign extend the input
...
manually and pass all (now) 4 arguments to the mul libcall. Add a new
ExpandLibCall for just this (copied gratuitously from type legalization).
Fixes rdar://9292577
llvm-svn: 129842
2011-04-20 01:19:45 +00:00
Stuart Hastings
468086d5e1
Delete unnecessary variable. <rdar://problem/7662569>
...
llvm-svn: 129796
2011-04-19 20:09:38 +00:00
Stuart Hastings
0b68c1219f
Support nested CALLSEQ_BEGIN/END; necessary for ARM byval support. <rdar://problem/7662569>
...
llvm-svn: 129761
2011-04-19 16:16:58 +00:00
Evan Cheng
b14ce09fca
Fix divmod libcall lowering. Convert to {S|U}DIVREM first and then expand the node to a libcall. rdar://9280991
...
llvm-svn: 129633
2011-04-16 03:08:26 +00:00
Chris Lattner
0ab5e2cded
Fix a ton of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Stuart Hastings
ad68c93a2d
Revert 123704; it broke threaded LLVM.
...
llvm-svn: 128868
2011-04-05 00:37:28 +00:00
Evan Cheng
bd76679700
Issue libcalls __udivmod*i4 / __divmod*i4 for div / rem pairs.
...
rdar://8911343
llvm-svn: 128696
2011-04-01 00:42:02 +00:00
Owen Anderson
cd526fa15e
Use the correct LHS type when determining the legalization of a shift's RHS type.
...
llvm-svn: 127163
2011-03-07 18:29:47 +00:00
Owen Anderson
b2c80da4ae
Allow targets to specify a the type of the RHS of a shift parameterized on the type of the LHS.
...
llvm-svn: 126518
2011-02-25 21:41:48 +00:00
Devang Patel
b7ae3ccb84
Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.
...
This time with a fix that avoids using invalidated DenseMap iterator.
llvm-svn: 125984
2011-02-18 22:43:42 +00:00
Cameron Zwarich
0a1a36dc46
Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.
...
llvm-svn: 125830
2011-02-18 04:58:10 +00:00
Devang Patel
f922a431ee
Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.
...
llvm-svn: 125794
2011-02-17 23:33:27 +00:00
Stuart Hastings
81c4306005
Swap VT and DebugLoc operands of getExtLoad() for consistency with
...
other getNode() methods. Radar 9002173.
llvm-svn: 125665
2011-02-16 16:23:55 +00:00
Devang Patel
1cec755494
Speculatively revert r124380.
...
llvm-svn: 124397
2011-01-27 19:15:01 +00:00
Devang Patel
3b266a2780
While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.
...
Take 2. This includes fix for dragonegg crash.
llvm-svn: 124380
2011-01-27 17:43:53 +00:00
Bill Wendling
fb4ee9bbde
Initialize variable to get rid of clang warning.
...
llvm-svn: 124331
2011-01-26 22:21:35 +00:00
Devang Patel
084e0628e0
Revert r124302
...
llvm-svn: 124320
2011-01-26 21:12:32 +00:00
David Greene
bab5e6ed0e
[AVX] Add INSERT_SUBVECTOR and support it on x86. This provides a
...
default implementation for x86, going through the stack in a similr
fashion to how the codegen implements BUILD_VECTOR. Eventually this
will get matched to VINSERTF128 if AVX is available.
llvm-svn: 124307
2011-01-26 19:13:22 +00:00
Devang Patel
a11210b1b8
While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.
...
llvm-svn: 124302
2011-01-26 18:55:05 +00:00
Eric Christopher
b2139f655b
Use only one API at a time.
...
llvm-svn: 123866
2011-01-20 01:29:23 +00:00
Eric Christopher
bb14f65672
If we can, lower the multiply part of a umulo/smulo call to a libcall
...
with an invalid type then split the result and perform the overflow check
normally.
Fixes the 32-bit parts of rdar://8622122 and rdar://8774702.
llvm-svn: 123864
2011-01-20 00:29:24 +00:00
Stuart Hastings
4fa832aab0
Remove checking that prevented overlapping CALLSEQ_START/CALLSEQ_END
...
ranges, add legalizer support for nested calls. Necessary for ARM
byval support. Radar 7662569.
llvm-svn: 123704
2011-01-18 00:09:27 +00:00
Benjamin Kramer
bec03ea725
Add an assert so we don't silently miscompile ctpop for bit widths > 128.
...
llvm-svn: 123549
2011-01-15 21:19:37 +00:00
Benjamin Kramer
fff2517edc
Reimplement CTPOP legalization with the "best" algorithm from
...
http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
In a silly microbenchmark on a 65 nm core2 this is 1.5x faster than the old
code in 32 bit mode and about 2x faster in 64 bit mode. It's also a lot shorter,
especially when counting 64 bit population on a 32 bit target.
I hope this is fast enough to replace Kernighan-style counting loops even when
the input is rather sparse.
llvm-svn: 123547
2011-01-15 20:30:30 +00:00
Dan Gohman
958620dd6d
Fix r123346 to handle scalar types too.
...
llvm-svn: 123352
2011-01-13 01:06:51 +00:00
Dan Gohman
6e017a1134
Apply the patch from PR8958, which allows llc to get slightly
...
further on the associated testcase before aborting.
llvm-svn: 123346
2011-01-12 23:56:26 +00:00
Anton Korobeynikov
2f93128109
Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
...
llvm-svn: 123170
2011-01-10 12:39:04 +00:00
Eric Christopher
988518109d
Remove TODO, these appear to be implemented.
...
llvm-svn: 122849
2011-01-04 22:31:50 +00:00
Stuart Hastings
83cce8e7ab
Fix indentation, add comment.
...
llvm-svn: 122345
2010-12-21 17:16:58 +00:00
Stuart Hastings
8c5bfcaa29
Missing logic for nested CALLSEQ_START/END.
...
llvm-svn: 122342
2010-12-21 17:07:24 +00:00
Chris Lattner
3e5fbd74ed
rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for
...
something that just glues two nodes together, even if it is
sometimes used for flags.
llvm-svn: 122310
2010-12-21 02:38:05 +00:00
Stuart Hastings
d2ea97cbef
Initial support for nested CALLSEQ_START/CALLSEQ_END constructs in LegalizeDAG.
...
Necessary for byval support on ARM. Radar 7662569.
llvm-svn: 121412
2010-12-09 21:25:20 +00:00
Jay Foad
583abbc4df
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
...
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.
llvm-svn: 121120
2010-12-07 08:25:19 +00:00
Benjamin Kramer
31920b0a2a
Remove unneeded zero arrays.
...
llvm-svn: 120910
2010-12-04 15:28:22 +00:00
Evan Cheng
d4b0873c06
Enable sibling call optimization of libcalls which are expanded during
...
legalization time. Since at legalization time there is no mapping from
SDNode back to the corresponding LLVM instruction and the return
SDNode is target specific, this requires a target hook to check for
eligibility. Only x86 and ARM support this form of sibcall optimization
right now.
rdar://8707777
llvm-svn: 120501
2010-11-30 23:55:39 +00:00
Wesley Peck
527da1b6e2
Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept.
...
llvm-svn: 119990
2010-11-23 03:31:01 +00:00
Jim Grosbach
bbdc5d2ef9
Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do any
...
setup they require. Use this for ARM/Darwin to rematerialize the base
pointer from the frame pointer when required. rdar://8564268
llvm-svn: 116879
2010-10-19 23:27:08 +00:00
Chris Lattner
eb313a46fc
fix the default va_arg expansion (in the realignment case) to not implicitly
...
truncate the stack pointer to 32-bits on a 64-bit machine.
llvm-svn: 116169
2010-10-10 18:36:26 +00:00
Owen Anderson
d8d1dcc09a
Use a more efficient lowering of uint64_t --> float that can take advantage of hardware signed integer conversion without
...
having to do a double cast (uint64_t --> double --> float). This is based on the algorithm from compiler_rt's __floatundisf
for X86-64.
llvm-svn: 115634
2010-10-05 17:24:05 +00:00
Chris Lattner
676c61db0e
update a bunch of code to use the MachinePointerInfo version of getStore.
...
llvm-svn: 114461
2010-09-21 18:41:36 +00:00
Chris Lattner
6963c1f789
eliminate an old SelectionDAG::getTruncStore method, propagating
...
MachinePointerInfo around more.
llvm-svn: 114452
2010-09-21 17:42:31 +00:00
Chris Lattner
3d178ed4d4
propagate MachinePointerInfo through various uses of the old
...
SelectionDAG::getExtLoad overload, and eliminate it.
llvm-svn: 114446
2010-09-21 17:04:51 +00:00
Chris Lattner
1ffcf527c7
continue MachinePointerInfo'izing, eliminating use of one of the old
...
getLoad overloads.
llvm-svn: 114443
2010-09-21 16:36:31 +00:00
Chris Lattner
a35499e2af
a few more trivial updates. This fixes PerformInsertVectorEltInMemory to not
...
pass a completely incorrect SrcValue, which would result in a miscompile with
combiner-aa.
llvm-svn: 114411
2010-09-21 07:32:19 +00:00
Bob Wilson
3626a8c136
Add a missing check when legalizing a vector extending load. This doesn't
...
solve the root problem, but it corrects the bug in the code I added to
support legalizing in the case where the non-extended type is also legal.
llvm-svn: 112997
2010-09-03 19:20:37 +00:00