Commit Graph

31084 Commits

Author SHA1 Message Date
Reid Spencer
a5f996bd27 Revert the name changes for llvm.bswap to allow (and test) llvm-upgrade of
this intrinsic.

llvm-svn: 35566
2007-04-02 00:51:15 +00:00
Reid Spencer
ef592214e2 Handle upgrade of llvm.bswap.iXX to llvm.bswap.iXX.iXX per new naming
rules for overloaded intrinsic functions.

llvm-svn: 35565
2007-04-02 00:50:28 +00:00
Reid Spencer
403a1c4517 Fix some bswap typos that Chris noticed.
llvm-svn: 35564
2007-04-02 00:19:52 +00:00
Chris Lattner
8fe3cbe6bd print the type of an inserted IV in -debug mode.
llvm-svn: 35563
2007-04-01 22:21:39 +00:00
Anton Korobeynikov
ecc769e4f2 Add testcase for correct sret handling.
llvm-svn: 35562
2007-04-01 22:03:04 +00:00
Chris Lattner
c3eeb42809 simplify this code, make it work for ap ints
llvm-svn: 35561
2007-04-01 20:57:36 +00:00
Chris Lattner
59a6fa7af6 fix breakage from last night, simplify code.
llvm-svn: 35560
2007-04-01 20:49:36 +00:00
Chris Lattner
489ad3313a gcc 3.4.4 is known-bad on x86-64
llvm-svn: 35559
2007-04-01 20:14:46 +00:00
Reid Spencer
8bc7d957cf Preview documentation for additional intrinsic functions.
llvm-svn: 35558
2007-04-01 19:00:37 +00:00
Jeff Cohen
3e96df52d8 Unbreak VC++ build.
llvm-svn: 35557
2007-04-01 18:58:22 +00:00
Reid Spencer
add6123405 The bit counting intrinsics return i32 not the operand type. This fixes
last night's regression in SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls

llvm-svn: 35556
2007-04-01 18:42:20 +00:00
Zhou Sheng
150f3bbab2 Avoid unnecessary APInt construction.
llvm-svn: 35555
2007-04-01 17:13:37 +00:00
Duncan Sands
2e45201769 Testcase for the problem worked around in
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046204.html

llvm-svn: 35554
2007-04-01 15:29:02 +00:00
Zhou Sheng
63b6bc1c88 Remove unused methods.
llvm-svn: 35553
2007-04-01 12:45:33 +00:00
Reid Spencer
8a5799f558 For PR1297:
Preview documentation for the llvm.bit.concat intrinsic (yet to be
implemented).

llvm-svn: 35552
2007-04-01 08:27:01 +00:00
Evan Cheng
17d48a8bc2 Add i16 address mode.
llvm-svn: 35551
2007-04-01 08:06:46 +00:00
Reid Spencer
4eefaab3f6 For PR1297:
Document changes to bswap and bit counting intrinsics. bswap's name now
requires two types in the suffix per overloaded intrinsic naming rules.
The ctpop, cttz, and ctlz intrinsics were changed to always return i32.

llvm-svn: 35550
2007-04-01 08:04:23 +00:00
Reid Spencer
9ade28d260 Mention how to create overloaded intrinsics.
llvm-svn: 35549
2007-04-01 07:44:52 +00:00
Reid Spencer
c3d87685ad For PR1297:
Update these test cases to use proper signatures for bswap which is now
and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32
since both the parameter and the result or of type "iAny". Also, the
bit counting intrinsics changed to always return i32.

llvm-svn: 35548
2007-04-01 07:36:28 +00:00
Reid Spencer
6bba6c8143 For PR1297:
Support overloaded intrinsics bswap, ctpop, cttz, ctlz.

llvm-svn: 35547
2007-04-01 07:35:23 +00:00
Reid Spencer
3a0843e734 For PR1297:
Adjust for changes in the bit counting intrinsics. They all return i32
now so we have to trunc/zext the DAG node accordingly.

llvm-svn: 35546
2007-04-01 07:34:11 +00:00
Reid Spencer
a090ffb2ab For PR1297:
Change getOperationName to return std::string instead of const char*

llvm-svn: 35545
2007-04-01 07:32:19 +00:00
Reid Spencer
eba021453b For PR1297:
Implement bswap, ctpop, ctlz, and cttz utilizing the new overloaded
intrinsic feature of tblgen. By defining llvm_int_ty to have an ValueType
of iAny, any intrinsic using that type becomes an overloaded intrinsic.
This signals that a) any integer type could be used for that argument and
b) the intrinsic needs a suffix to match each such argument for the
actual intrinsic.

llvm-svn: 35544
2007-04-01 07:30:57 +00:00
Reid Spencer
c7c4880ab1 For PR1297:
Intrinsic functions might need to be generated (if they are overloaded) so
returning a const char* is no longer possible. Change getOperationName to
return a std::string instead.

llvm-svn: 35543
2007-04-01 07:28:37 +00:00
Reid Spencer
be23fb0370 For PR1297:
Change the interface to the getName, getType, getDeclaration methods to
include the "actual" types of the result/arguments. This is necessary to
support overloaded intrinsics.

llvm-svn: 35542
2007-04-01 07:26:35 +00:00
Reid Spencer
2a2117c82d For PR1297:
Implement "actual" argument types for the Intrinsic member functions. This
involves changing the getName, getType, and getDeclaration methods to have
optional parameters for the actual types. These are necessary in order for
the type/name to be constructed properly for overloaded intrinsics. Only
the caller knows the actual argument types desired.

llvm-svn: 35541
2007-04-01 07:25:33 +00:00
Reid Spencer
7c57b88b27 For PR1297:
1. Clear up confusion between "GotBits" and "ExpectBits". GotBits is the
   type actually provided. ExpectedBits is the type expected for the
   intrinsics. Before this patch, it was reversed!
2. Implement checks for overloaded intrinsics. This involves computing the
   suffix expected and making sure the suffix matches the function name. It
   also includes some intrinsic-specific checks such as ensuring that the
   bswap parameter and result are the same width and an even number of bytes.

llvm-svn: 35540
2007-04-01 07:22:57 +00:00
Reid Spencer
e67d0c226d For PR1297:
Implement code generation for overloaded intrinsic functions. The basic
difference is that "actual" argument types must be provided when
constructing intrinsic names and types. Also, for recognition, only the
prefix is examined. If it matches, the suffix is assumed to match. The
suffix is checked by the Verifier, however.

llvm-svn: 35539
2007-04-01 07:20:02 +00:00
Reid Spencer
51455e00dc For PR1297:
Add an "iAny" ValueType as a place holder for an integer type of any
bit width. This is used for intrinsics overloading on integer type.

llvm-svn: 35538
2007-04-01 07:17:45 +00:00
Chris Lattner
f517e9578d not not!
llvm-svn: 35537
2007-04-01 06:19:41 +00:00
Chris Lattner
0427799531 Fix InstCombine/2007-03-31-InfiniteLoop.ll
llvm-svn: 35536
2007-04-01 05:36:37 +00:00
Chris Lattner
9729bdd8e3 New testcase
llvm-svn: 35535
2007-04-01 05:34:53 +00:00
Nick Lewycky
f22938af1b Implement union of wrapped sets.
llvm-svn: 35534
2007-04-01 03:47:44 +00:00
Andrew Lenharth
427ec7fa51 Readme
llvm-svn: 35533
2007-03-31 15:05:44 +00:00
Anton Korobeynikov
a8cc1ebae1 Consistency with native compilers
llvm-svn: 35532
2007-03-31 13:11:52 +00:00
Bill Wendling
b72fcddd23 Fix comment.
llvm-svn: 35531
2007-03-31 09:36:12 +00:00
Chris Lattner
075b4db621 add a note
llvm-svn: 35530
2007-03-31 07:06:25 +00:00
Chris Lattner
f6a6d3c8b0 move a bunch of code out of the sdisel pass into its own opt pass "codegenprepare".
llvm-svn: 35529
2007-03-31 04:18:03 +00:00
Chris Lattner
f2836d17b6 Split the sdisel code munging stuff out into its own opt-pass, CodeGenPrepare.
llvm-svn: 35528
2007-03-31 04:06:36 +00:00
Chris Lattner
f2d71d49e2 switch TL::getValueType to use MVT::getValueType.
llvm-svn: 35527
2007-03-31 04:05:24 +00:00
Chris Lattner
516f38b35f add a method to turn a type into a VT.
llvm-svn: 35526
2007-03-31 04:03:02 +00:00
Zhou Sheng
82c42284f4 Delete dead code.
llvm-svn: 35525
2007-03-31 02:50:26 +00:00
Zhou Sheng
4f16402e0d Use APInt operators to calculate the carry bits, remove this loop.
llvm-svn: 35524
2007-03-31 02:38:39 +00:00
Bill Wendling
afddb2c6f8 Match GCC's MMX calling convention.
llvm-svn: 35523
2007-03-31 01:03:53 +00:00
Chris Lattner
bafc837c83 Add a -print-lsr-output option to LLC, to print the output of the LSR pass.
llvm-svn: 35522
2007-03-31 00:24:43 +00:00
Chris Lattner
1eb94d973a implement the new addressing mode description hook.
llvm-svn: 35521
2007-03-30 23:15:24 +00:00
Chris Lattner
ac3f81508c add one addressing mode description hook to rule them all.
llvm-svn: 35520
2007-03-30 23:14:50 +00:00
Evan Cheng
67a49736af Missing '&&'
llvm-svn: 35519
2007-03-30 22:03:49 +00:00
Jeff Cohen
2cdce430e2 This is working again.
llvm-svn: 35518
2007-03-30 22:02:18 +00:00
Dale Johannesen
4bbd2eefba Fix incorrect combination of different loads. Reenable zext-over-truncate
combination.

llvm-svn: 35517
2007-03-30 21:38:07 +00:00