Commit Graph

19175 Commits

Author SHA1 Message Date
Chris Lattner e708353d04 new testcase for PR586
llvm-svn: 22235
2005-06-17 03:58:30 +00:00
Chris Lattner 73bcba5f61 Don't crash when dealing with INTMIN. This fixes PR585 and
Transforms/InstCombine/2005-06-16-RangeCrash.ll

llvm-svn: 22234
2005-06-17 02:05:55 +00:00
Chris Lattner d230aee4be new testcase for PR585
llvm-svn: 22233
2005-06-17 02:04:47 +00:00
Chris Lattner 5e735294bf Don't crash on: X = phi (X, X).
This fixes PR584 and Transforms/SimplifyCFG/2005-06-16-PHICrash.ll

llvm-svn: 22232
2005-06-17 01:45:53 +00:00
Chris Lattner 29ae6f6ed9 new testcase for PR584
llvm-svn: 22231
2005-06-17 01:45:03 +00:00
Chris Lattner c53cb9d3ff avoid constructing out of range shift amounts.
llvm-svn: 22230
2005-06-17 01:29:28 +00:00
Nate Begeman a2e8779b0d Fix bug 537 test 2, which checks to make sure that we fold A+(B-A) -> B for
integer types.  Add a couple checks to not perform these kinds of transform
on floating point values.

llvm-svn: 22228
2005-06-16 07:06:03 +00:00
Chris Lattner 89dc4f16f5 Fix PR583 and testcase Transforms/InstCombine/2005-06-15-DivSelectCrash.ll
llvm-svn: 22227
2005-06-16 04:55:52 +00:00
Chris Lattner 69d21ed707 new testcase for PR583
llvm-svn: 22226
2005-06-16 04:55:29 +00:00
Chris Lattner 252a845e30 Fix PR571, removing code that does just the WRONG thing :)
llvm-svn: 22225
2005-06-16 03:00:08 +00:00
Chris Lattner 104002bee3 Fix a bug in my previous patch. Do not get the shift amount type (which
is always ubyte, get the type being shifted).  This unbreaks espresso

llvm-svn: 22224
2005-06-16 01:52:07 +00:00
Chris Lattner d48b127aea Fix PR575, patch provided by John Mellor-Crummey. Thanks!
llvm-svn: 22223
2005-06-15 22:49:30 +00:00
Chris Lattner 0c2be5094c new testcase for PR580
llvm-svn: 22222
2005-06-15 22:42:53 +00:00
Chris Lattner df81539278 Fix PR582. The rewriter can move casts around, which invalidated the
BB iterator.  This fixes Transforms/IndVarsSimplify/2005-06-15-InstMoveCrash.ll

llvm-svn: 22221
2005-06-15 21:29:31 +00:00
Chris Lattner 478158a4c5 new testcase for PR582
llvm-svn: 22220
2005-06-15 21:28:55 +00:00
Chris Lattner 50bdfcb045 Do not promote globals only used by main to locals if there are constantexprs
or other uses hanging off of them.

llvm-svn: 22219
2005-06-15 21:11:48 +00:00
Chris Lattner 11b4d966b7 new testcase for PR579
llvm-svn: 22218
2005-06-15 21:11:18 +00:00
Chris Lattner 19b57f55aa Fix PR577 and testcase InstCombine/2005-06-15-ShiftSetCCCrash.ll.
Do not perform undefined out of range shifts.

llvm-svn: 22217
2005-06-15 20:53:31 +00:00
Chris Lattner b28f0ef40a new testcase for PR577
llvm-svn: 22216
2005-06-15 20:52:39 +00:00
Reid Spencer 95eda5aafc Don't lie to the casual reader about Value subclassing from Annotable.
llvm-svn: 22215
2005-06-15 18:40:45 +00:00
Nate Begeman aaaebbed19 Add some operators the PowerPC backend needs to efficiently and correctly
generate conditional branches.

llvm-svn: 22214
2005-06-15 18:28:44 +00:00
Reid Spencer a299d6f701 Put the hack back in that removes features, causes regressions to fail, but
allows test programs to succeed. Actual fix for this is forthcoming.

llvm-svn: 22213
2005-06-15 18:25:30 +00:00
Nate Begeman 1bf8927518 Commit fix for generating conditional branch pseudo instructions that
avoids dereferencing the end() iterator when selecting the fallthrough
block.  This requires an ilist change.

llvm-svn: 22212
2005-06-15 18:22:43 +00:00
Duraid Madina 31e5579fbf nothing funny about building the CFE on Linux/Itanium
llvm-svn: 22211
2005-06-14 07:29:50 +00:00
Nate Begeman 54c022156d Commit a small improvement that is already in the x86 and ia64 backends to
not generate unnecessary register copies.  This improves compile time by
2-5% depending on the test.

llvm-svn: 22210
2005-06-14 03:55:23 +00:00
Reid Spencer 6d231e55fa Unbreak several InstCombine regression checks introduced by a hack to
fix the bzip2 test. A better hack is needed.

llvm-svn: 22209
2005-06-13 06:41:26 +00:00
Nate Begeman 2829f330a3 When compiled with GCC 4.0, a latent bug was exposed where both SparcV9
and the target independant register allocator were both using a class named
'LiveRange'.  This lead to the target independant code calling code in the
SparcV9 backend, which crashed.  Fixed by renaming SparcV9's LiveRange to
V9LiveRange.

llvm-svn: 22208
2005-06-12 23:52:58 +00:00
Nate Begeman 02e33b70b1 Fix a memory smasher caught by Mac OS X's debug malloc library. We were
incorrectly using an iterator after it was invalid.

llvm-svn: 22207
2005-06-12 23:50:33 +00:00
Chris Lattner 1609a541cd Fix a 64-bit problem, passing (int)0 through ... instead of (void*)0
llvm-svn: 22206
2005-06-09 03:32:54 +00:00
Chris Lattner fbc45f10d0 Fix a problem on 64-bit targets where we passed (int)0 through ... instead of
(void*)0.

llvm-svn: 22205
2005-06-09 02:59:00 +00:00
Andrew Lenharth ea9af931b8 make SparcV8 and V9 seperately configurable
llvm-svn: 22204
2005-06-08 22:32:51 +00:00
Andrew Lenharth c504a3db60 fix BranchCC with a setCC with an arg of 0
llvm-svn: 22203
2005-06-08 18:02:21 +00:00
Reid Spencer 8086cfaa6a For PR572:
Undefine the PPC symbol which is defined by Linux/PPC (erroneously) so it
doesn't pollute the user namespace and clash with our namespace declarations.

llvm-svn: 22202
2005-06-08 17:44:48 +00:00
Nate Begeman 60cf00c982 Handle some more real world cases of rlwimi. These don't come up that
regularly in "normal" code, but for things like software graphics, they
make a big difference.

For the following code:
unsigned short Trans16Bit(unsigned srcA,unsigned srcB,unsigned alpha)
{
	unsigned tmpA,tmpB,mixed;
	tmpA = ((srcA & 0x03E0) << 15) | (srcA & 0x7C1F);
	tmpB = ((srcB & 0x03E0) << 15) | (srcB & 0x7C1F);
	mixed = (tmpA * alpha) + (tmpB * (32 - alpha));
	return ((mixed >> 5) & 0x7C1F) | ((mixed >> 20) & 0x03E0);
}

We now generate:
_Trans16Bit:
.LBB_Trans16Bit_0:      ; entry
        andi. r2, r4, 31775
        rlwimi r2, r4, 15, 7, 11
        subfic r4, r5, 32
        mullw r2, r2, r4
        andi. r4, r3, 31775
        rlwimi r4, r3, 15, 7, 11
        mullw r3, r4, r5
        add r2, r2, r3
        srwi r3, r2, 5
        andi. r3, r3, 31775
        rlwimi r3, r2, 12, 22, 26
        blr

Instead of:
_Trans16Bit:
.LBB_Trans16Bit_0:      ; entry
        slwi r2, r4, 15
        rlwinm r2, r2, 0, 7, 11
        andi. r4, r4, 31775
        or r2, r2, r4
        subfic r4, r5, 32
        mullw r2, r2, r4
        slwi r4, r3, 15
        rlwinm r4, r4, 0, 7, 11
        andi. r3, r3, 31775
        or r3, r4, r3
        mullw r3, r3, r5
        add r2, r2, r3
        srwi r3, r2, 5
        andi. r3, r3, 31775
        srwi r2, r2, 20
        rlwimi r3, r2, 0, 22, 26
        blr

llvm-svn: 22201
2005-06-08 04:14:27 +00:00
Nate Begeman 85c7d546fe Fix lli linking on Mac OS X 10.4.1 for Intel.
llvm-svn: 22200
2005-06-08 01:02:38 +00:00
Andrew Lenharth c3f68473a5 Remove code for conversion from old style va_args. Preparing the way for
returning to the old style :)

llvm-svn: 22199
2005-06-08 00:49:08 +00:00
Misha Brukman ee14fc41f1 We also have V8, so do not force every Sparc to be treated like a V9. It is
still possible to force V9 (even if configure doesn't think it's one) via
``./configure --target=sparcv9-sun-solaris2.8'' so nothing is lost.

llvm-svn: 22198
2005-06-06 19:29:36 +00:00
Misha Brukman ee811dcd12 * Add ability to specify the target LLVM will compile for via configure
* Minor whitespace cleanups

llvm-svn: 22197
2005-06-06 19:17:05 +00:00
Misha Brukman ddb94f4169 Fix spelling of `correlate'
llvm-svn: 22196
2005-06-06 19:08:04 +00:00
Andrew Lenharth c74fe84456 allow marking of loads and stores in the instruction stream with enough information to reconstruct the Value* if it existed
llvm-svn: 22195
2005-06-06 19:03:55 +00:00
Andrew Lenharth b07a3d7138 hide basic block labels. The utility of these for debuging is long since passed
llvm-svn: 22194
2005-06-06 19:03:09 +00:00
Misha Brukman 175df27466 * Replace block of commented-out lines with #if 0
* Remove warning "control reaches end of non-void function"

llvm-svn: 22193
2005-06-06 17:39:46 +00:00
Andrew Lenharth ffe65458e7 hack to fix bzip2 (bug 571)
llvm-svn: 22192
2005-06-04 12:43:56 +00:00
Reid Spencer 2a43ec334a Fix the definitions of LLVMGCC and LLVMGXX to include the EXEEXT (the
.exe extension) on Cygwin. This fixes the last few remaining Cygwin
issues. Thanks to Aaron Gray for tracking this down.

llvm-svn: 22191
2005-06-02 22:34:49 +00:00
Reid Spencer 4c07caf9d4 Make sure that Cygwin assembly includes _ as part of function names.
llvm-svn: 22190
2005-06-02 21:33:19 +00:00
Reid Spencer d1ef1df103 Put in a hack for Cygwin that prevents mkdtemp from being used since
configure seems to find it on Cygwin but linking against it fails.

llvm-svn: 22189
2005-06-02 05:38:20 +00:00
Andrew Lenharth 7c0e9285ce try custom expanders, doesn't seem to expand yet, so disabled
llvm-svn: 22188
2005-05-31 19:49:34 +00:00
Andrew Lenharth 41e2981e0a switch to the new live in thing. Really, this time it works
llvm-svn: 22187
2005-05-31 18:42:18 +00:00
Andrew Lenharth 676e4db6dc switch to the new live in thing
llvm-svn: 22186
2005-05-31 18:37:16 +00:00
Andrew Lenharth 973d85e660 switch to the new live in thing
llvm-svn: 22185
2005-05-31 18:35:43 +00:00