1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 22:42:52 +01:00
Commit Graph

31279 Commits

Author SHA1 Message Date
Chris Lattner
a66a97908c simplify this code, make it work for ap ints
llvm-svn: 35561
2007-04-01 20:57:36 +00:00
Chris Lattner
4fb170e47b fix breakage from last night, simplify code.
llvm-svn: 35560
2007-04-01 20:49:36 +00:00
Chris Lattner
60e3b13d20 gcc 3.4.4 is known-bad on x86-64
llvm-svn: 35559
2007-04-01 20:14:46 +00:00
Reid Spencer
167c5f02ce Preview documentation for additional intrinsic functions.
llvm-svn: 35558
2007-04-01 19:00:37 +00:00
Jeff Cohen
6e0a3a6bbc Unbreak VC++ build.
llvm-svn: 35557
2007-04-01 18:58:22 +00:00
Reid Spencer
34b5a64f15 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
8b2b6b9e36 Avoid unnecessary APInt construction.
llvm-svn: 35555
2007-04-01 17:13:37 +00:00
Duncan Sands
2f6b651059 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
551fa60212 Remove unused methods.
llvm-svn: 35553
2007-04-01 12:45:33 +00:00
Reid Spencer
205fd857c5 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
949a34fbad Add i16 address mode.
llvm-svn: 35551
2007-04-01 08:06:46 +00:00
Reid Spencer
f9dad9ed2f 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
6e676419f3 Mention how to create overloaded intrinsics.
llvm-svn: 35549
2007-04-01 07:44:52 +00:00
Reid Spencer
f5e95d339f 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
88fb617695 For PR1297:
Support overloaded intrinsics bswap, ctpop, cttz, ctlz.

llvm-svn: 35547
2007-04-01 07:35:23 +00:00
Reid Spencer
4a28a16efb 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
77c46f6cf5 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
419396d2fe 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
5ac41f7bc9 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
e1b0aae7c7 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
d371e2e492 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
1db694fe4b 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
5b8b959d29 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
f4ea8f8a73 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
ce2620850a not not!
llvm-svn: 35537
2007-04-01 06:19:41 +00:00
Chris Lattner
aa4b06bdae Fix InstCombine/2007-03-31-InfiniteLoop.ll
llvm-svn: 35536
2007-04-01 05:36:37 +00:00
Chris Lattner
f8977023f4 New testcase
llvm-svn: 35535
2007-04-01 05:34:53 +00:00
Nick Lewycky
03f9c0ffc9 Implement union of wrapped sets.
llvm-svn: 35534
2007-04-01 03:47:44 +00:00
Andrew Lenharth
ff1ff37be9 Readme
llvm-svn: 35533
2007-03-31 15:05:44 +00:00
Anton Korobeynikov
db09256c9f Consistency with native compilers
llvm-svn: 35532
2007-03-31 13:11:52 +00:00
Bill Wendling
8f16f4bf9c Fix comment.
llvm-svn: 35531
2007-03-31 09:36:12 +00:00
Chris Lattner
cea5e599ed add a note
llvm-svn: 35530
2007-03-31 07:06:25 +00:00
Chris Lattner
f01b0a800b 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
579b1c63d5 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
8747705792 switch TL::getValueType to use MVT::getValueType.
llvm-svn: 35527
2007-03-31 04:05:24 +00:00
Chris Lattner
546138e3dd add a method to turn a type into a VT.
llvm-svn: 35526
2007-03-31 04:03:02 +00:00
Zhou Sheng
967239685a Delete dead code.
llvm-svn: 35525
2007-03-31 02:50:26 +00:00
Zhou Sheng
ebf4c32f0b Use APInt operators to calculate the carry bits, remove this loop.
llvm-svn: 35524
2007-03-31 02:38:39 +00:00
Bill Wendling
0cba5d3c15 Match GCC's MMX calling convention.
llvm-svn: 35523
2007-03-31 01:03:53 +00:00
Chris Lattner
330464a91c 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
c0405a348d implement the new addressing mode description hook.
llvm-svn: 35521
2007-03-30 23:15:24 +00:00
Chris Lattner
143464e05f add one addressing mode description hook to rule them all.
llvm-svn: 35520
2007-03-30 23:14:50 +00:00
Evan Cheng
aca424091b Missing '&&'
llvm-svn: 35519
2007-03-30 22:03:49 +00:00
Jeff Cohen
dbb65fefb3 This is working again.
llvm-svn: 35518
2007-03-30 22:02:18 +00:00
Dale Johannesen
d4ab7d28e9 Fix incorrect combination of different loads. Reenable zext-over-truncate
combination.

llvm-svn: 35517
2007-03-30 21:38:07 +00:00
Chris Lattner
8c48bc4ec0 add a testcase for x86
llvm-svn: 35516
2007-03-30 21:22:46 +00:00
Evan Cheng
972e65f9b0 New test case.
llvm-svn: 35515
2007-03-30 20:41:18 +00:00
Evan Cheng
d814ad9d50 Don't add the same MI to register reuse "last def/use" twice if it reads the
register more than once.

llvm-svn: 35513
2007-03-30 20:21:35 +00:00
Evan Cheng
fc6519b457 Bug fix for PR1279. When isDead is propagate by copy coalescing, we keep length
of dead def live interval at 1 to avoid multiple def's targeting the same
register. The previous patch missed a case where the source operand is live-in.
In that case, remove the whole interval.

llvm-svn: 35512
2007-03-30 20:18:35 +00:00
Evan Cheng
5e161b7fb5 Test case for PR1279 (part 2).
llvm-svn: 35511
2007-03-30 20:15:22 +00:00