Commit Graph

30688 Commits

Author SHA1 Message Date
Chris Lattner
bc1dbfce62 ifdef out some dead code.
Fix PR1244 and Transforms/InstCombine/2007-03-13-CompareMerge.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35082 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-13 14:27:42 +00:00
Chris Lattner
7e9e9c6121 testcase for PR1244
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35081 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-13 14:25:35 +00:00
Zhou Sheng
b277b16593 For expression like
"APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth)",
to handle ShiftAmt == BitWidth situation, use zextOrCopy() instead of
zext().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35080 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-13 06:40:59 +00:00
Zhou Sheng
b991dfeae7 Add zextOrCopy() into APInt for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35079 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-13 06:16:26 +00:00
Zhou Sheng
771dbf7677 In APInt version ComputeMaskedBits():
1. Ensure VTy, KnownOne and KnownZero have same bitwidth.
  2. Make code more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35078 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-13 02:23:10 +00:00
Evan Cheng
e8308df0b9 Implement getTargetLowering() or else LSR won't be using ARM specific hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35077 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-13 01:20:42 +00:00
Evan Cheng
c289faf015 More flexible TargetLowering LSR hooks for testing whether an immediate is a legal target address immediate or scale.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 23:37:10 +00:00
Evan Cheng
b01fad6d19 Updated TargetLowering LSR addressing mode hooks for ARM and Thumb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35075 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 23:30:29 +00:00
Evan Cheng
861939152d More flexible TargetLowering LSR hooks for testing whether an immediate is a legal target address immediate or scale.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35074 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 23:29:01 +00:00
Evan Cheng
a8a155e77f More flexible TargetLowering LSR hooks for testing whether an immediate is
a legal target address immediate or scale.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 23:28:50 +00:00
Evan Cheng
5eef2d21a0 Use new TargetLowering addressing modes hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35072 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 23:27:37 +00:00
Evan Cheng
4603b402eb More flexible TargetLowering LSR hooks for testing whether an immediate is
a legal target address immediate or scale.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35071 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 23:26:27 +00:00
Evan Cheng
37e8856f74 Stupid bug: SSE2 supports v2i64 add / sub.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35070 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 22:58:52 +00:00
Reid Spencer
4fd8606791 Revert the last patch as it violates the conditions of sext/zext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35068 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 18:37:25 +00:00
Jeff Cohen
2b7d7b57ae Unbreak C++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35067 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 17:57:00 +00:00
Jeff Cohen
c4558fde76 Unbreak VC++ build. Do not use identifiers starting with _ as they are reserved and
can collide with system defined names.  Windows defines _BB, for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35066 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 17:56:27 +00:00
Zhou Sheng
7d820f57e2 For APInt::z/sext(width), if width == BitWidth, just return *this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35065 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 17:47:45 +00:00
Reid Spencer
8cb6834ccf Add an APInt version of SimplifyDemandedBits.
Patch by Zhou Sheng.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35064 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 17:25:59 +00:00
Reid Spencer
6b79e2d202 Add an APInt version of ShrinkDemandedConstant.
Patch by Zhou Sheng.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35063 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 17:15:10 +00:00
Zhou Sheng
edd089c86a Avoid to assert on "(KnownZero & KnownOne) == 0".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 16:54:56 +00:00
Zhou Sheng
430f626937 In function ComputeMaskedBits():
1. Replace getSignedMinValue() with getSignBit() for better code readability.
  2. Replace APIntOps::shl() with operator<<= for convenience.
  3. Make APInt construction more effective.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35060 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-12 05:44:52 +00:00
Zhou Sheng
8db6a445e6 Add getSignBit() and operator<<= into APInt for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35059 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-11 07:16:10 +00:00
Nick Lewycky
e677a0b099 Add value ranges. Currently inefficient in both execution time and
optimization power.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35058 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-10 18:12:48 +00:00
Anton Korobeynikov
e2ff29c17c Use range tests in LowerSwitch, where possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35057 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-10 16:46:28 +00:00
Nick Lewycky
3400e6af6b Add getter methods for the extremes of a ConstantRange.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35056 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-10 15:54:12 +00:00
Bill Wendling
c1fb0473ed Adding more arithmetic operators to MMX. This is an almost exact copy of
the addition. Please let me know if you have suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35055 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-10 09:57:05 +00:00
Devang Patel
f7543fe35a Remove dead comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35053 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 23:41:03 +00:00
Devang Patel
a5b7dc5ef8 Avoid recursion. Use iterative algorithm for RenamePass().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35052 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 23:39:14 +00:00
Devang Patel
4fe26582c0 Increment iterator now because IVUseShouldUsePostIncValue may remove
User from the list of I users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35051 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 21:19:53 +00:00
Reid Spencer
afc378201d Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35050 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 21:19:09 +00:00
Evan Cheng
1a9da0d66c Minor stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35049 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:46:06 +00:00
Evan Cheng
44f4fca3c0 Add comments about LSR / ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35048 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:35:33 +00:00
Evan Cheng
2265b49193 Unfinished work and ideas related to register scavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35047 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:34:51 +00:00
Reid Spencer
87707b90b1 For PR1245:
Account for the sign bit when computing the number of bits required for
a negative integer literal constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35046 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:26:52 +00:00
Dale Johannesen
818c085232 apply comments from review of last patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35045 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 19:18:59 +00:00
Dale Johannesen
a6bc6fc170 Add some observations from CoreGraphics benchmark. Remove register
scavenging todo item, since it is now implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35044 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 17:58:17 +00:00
Anton Korobeynikov
349ec1c11b Unbreak mingw32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35042 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 11:53:34 +00:00
Evan Cheng
e2ee99620f If a virtual register is already marked alive in this block, that means it is
alive in one of the successor block. Do not add it to the kill list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35041 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 09:48:56 +00:00
Evan Cheng
219705131d Print preds / succs BB numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35040 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 08:29:08 +00:00
Evan Cheng
f0e3bb1333 Avoid variable shadowing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35039 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-09 06:02:17 +00:00
Bill Wendling
47992ea4be Don't use std::hex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35038 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 23:37:24 +00:00
Bill Wendling
3bae2e97d9 Don't use a cast. It causes an error on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35037 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 23:26:50 +00:00
Evan Cheng
12d3a91386 Test inline asm modifier 'c'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35036 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 22:45:31 +00:00
Evan Cheng
23a9570494 Implement inline asm modifier c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35035 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 22:42:46 +00:00
Chris Lattner
7754d2fd8d upgrade this testcase, add test for fp immediate to memory operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35034 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 22:33:06 +00:00
Chris Lattner
6dfc6806bf implement support for floating point constants used as inline asm memory operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35033 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 22:29:47 +00:00
Bill Wendling
71b91ac76f Add MMX arithmetic testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35032 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 22:14:51 +00:00
Bill Wendling
2f88dcdfb3 Added "padd*" support for MMX. Added MMX move stuff to X86InstrInfo so that
moves, loads, etc. are recognized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35031 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 22:09:11 +00:00
Evan Cheng
b582b1b1fc Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35030 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 21:59:30 +00:00
Evan Cheng
c795466254 Fix test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35029 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-08 19:27:32 +00:00