Anton Korobeynikov
24fb6b2f8c
Don't promote volatile loads/stores. This is needed (for example) to handle setjmp/longjmp properly.
...
This fixes PR1520.
llvm-svn: 41461
2007-08-26 21:43:30 +00:00
Devang Patel
c1ef32ef3d
Constant split values needs upper bound and lower bound check, just like any other split value.
...
llvm-svn: 41389
2007-08-25 01:09:14 +00:00
Devang Patel
4e63e1f5b5
While calculating upper loop bound for first loop and lower loop bound for second loop, take care of edge cases.
...
llvm-svn: 41387
2007-08-25 00:56:38 +00:00
Devang Patel
c2e2d15f45
Do not split loops rejected by processOneIterationLoop().
...
llvm-svn: 41194
2007-08-20 20:24:15 +00:00
Devang Patel
cec2ad95f4
Add loop index split tests.
...
llvm-svn: 41146
2007-08-17 22:02:15 +00:00
Dan Gohman
ada7205b76
Convert tests using "grep -c ... | grep ..." to use the count script.
...
llvm-svn: 41100
2007-08-15 13:49:33 +00:00
Dan Gohman
f9dd170e36
Convert tests using "| wc -l | grep ..." to use the count script.
...
llvm-svn: 41097
2007-08-15 13:36:28 +00:00
Chris Lattner
1399f64e3b
oops, forgot to commit this.
...
llvm-svn: 41034
2007-08-12 16:55:14 +00:00
Chris Lattner
99c8ee2977
Transform a load from an undef/zero global into an undef/global even if we
...
have complex pointer manipulation going on. This allows us to compile
stuff like this:
__m128i foo(__m128i x){
static const unsigned int c_0[4] = { 0, 0, 0, 0 };
__m128i v_Zero = _mm_loadu_si128((__m128i*)c_0);
x = _mm_unpacklo_epi8(x, v_Zero);
return x;
}
into:
_foo:
xorps %xmm1, %xmm1
punpcklbw %xmm1, %xmm0
ret
llvm-svn: 41022
2007-08-11 18:48:48 +00:00
Chris Lattner
a8e4b4bc7b
when we see a unaligned load from an insufficiently aligned global or
...
alloca, increase the alignment of the load, turning it into an aligned load.
This allows us to compile:
#include <xmmintrin.h>
__m128i foo(__m128i x){
static const unsigned int c_0[4] = { 0, 0, 0, 0 };
__m128i v_Zero = _mm_loadu_si128((__m128i*)c_0);
x = _mm_unpacklo_epi8(x, v_Zero);
return x;
}
into:
_foo:
punpcklbw _c_0.5944, %xmm0
ret
.data
.lcomm _c_0.5944,16,4 # c_0.5944
instead of:
_foo:
movdqu _c_0.5944, %xmm1
punpcklbw %xmm1, %xmm0
ret
.data
.lcomm _c_0.5944,16,2 # c_0.5944
llvm-svn: 40971
2007-08-09 19:05:49 +00:00
Nick Lewycky
8052019a20
It's safe to fold not of fcmp.
...
llvm-svn: 40870
2007-08-06 20:04:16 +00:00
Chandler Carruth
7132e00de7
This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
...
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.
llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Chris Lattner
9ea0287e25
I don't have time to restore this functionality right now.
...
llvm-svn: 40743
2007-08-02 17:43:39 +00:00
Chris Lattner
498137dbfc
Reduced testcase for PR1594
...
llvm-svn: 40740
2007-08-02 17:11:24 +00:00
Devang Patel
a882328e61
Update dominator info for the middle blocks created while spliting
...
exit edge to preserve LCSSA.
Fix dominance frontier update during loop unswitch. This fixes PR 1589, again
llvm-svn: 40737
2007-08-02 15:25:57 +00:00
Chris Lattner
b0418fc607
Enhance instcombine to be more aggressive about folding casts of
...
operations of casts. This implements InstCombine/zext-fold.ll
llvm-svn: 40726
2007-08-02 06:11:14 +00:00
Chris Lattner
d7cb625a9e
Fix PR1575 and test/Transforms/CondProp/2007-08-01-InvalidRead.ll
...
llvm-svn: 40720
2007-08-02 04:47:05 +00:00
Devang Patel
561b0c29a3
Update dominator info for the middle blocks created while spliting
...
exit edge to preserve LCSSA.
Fix dominance frontier update during loop unswitch. This fixes PR 1589.
llvm-svn: 40695
2007-08-01 22:23:50 +00:00
Owen Anderson
4d34e40c6d
Forgot to update these files for the FastDSE changes.
...
llvm-svn: 40674
2007-08-01 16:53:51 +00:00
Owen Anderson
10e52eddb3
Rename FastDSE to just DSE.
...
llvm-svn: 40668
2007-08-01 06:36:51 +00:00
Owen Anderson
2464f4f048
Fix a failure I accidentally caused in my last commit by mishandling the
...
removal of redundant phis.
llvm-svn: 40650
2007-07-31 20:18:28 +00:00
Lauro Ramos Venancio
549e775e67
Fix a bug in GetKnownAlignment of packed structs.
...
llvm-svn: 40649
2007-07-31 20:13:21 +00:00
Dan Gohman
54ec4bfa5f
Change the x86 assembly output to use tab characters to separate the
...
mnemonics from their operands instead of single spaces. This makes the
assembly output a little more consistent with various other compilers
(f.e. GCC), and slightly easier to read. Also, update the regression
tests accordingly.
llvm-svn: 40648
2007-07-31 20:11:57 +00:00
Owen Anderson
d58fa6b09f
Fix a misoptimization in aha.
...
llvm-svn: 40642
2007-07-31 17:43:14 +00:00
Devang Patel
dd34d91e1a
Bunch of tests to check loop passes.
...
llvm-svn: 40629
2007-07-31 08:04:17 +00:00
Owen Anderson
d66e285b2e
Fix a bug caused by indiscriminantly asking for the dominators of a predecessor.
...
llvm-svn: 40595
2007-07-30 16:57:08 +00:00
Owen Anderson
0f692f27a3
Fix a bug introduced in my last commit.
...
llvm-svn: 40542
2007-07-26 18:57:04 +00:00
Owen Anderson
dbf23ccaa0
Fix a couple more bugs in the phi construction by pulling in code that does
...
almost the same things from LCSSA.
llvm-svn: 40540
2007-07-26 18:26:51 +00:00
Owen Anderson
3b8cc30a61
Fix what is _hopefully_ the last corner case for loops.
...
llvm-svn: 40503
2007-07-25 23:54:42 +00:00
Owen Anderson
8707412593
My last commit was not correct for nested loops. Fix it, and add a testcase for it.
...
llvm-svn: 40498
2007-07-25 22:19:40 +00:00
Owen Anderson
3c67004d47
Fix an infinite loop on 300.twolf.
...
llvm-svn: 40497
2007-07-25 22:03:06 +00:00
Owen Anderson
9b796348bd
Fix a bug in non-local memdep that was causing an infinite loop on 175.vpr.
...
llvm-svn: 40495
2007-07-25 21:26:36 +00:00
Owen Anderson
7bf26ee444
Fix a bug that was causing GVN to crash on 252.eon.
...
llvm-svn: 40494
2007-07-25 21:13:41 +00:00
Owen Anderson
5e5599b7ce
Add basic support for performing whole-function RLE.
...
Note: This has not yet been thoroughly tested. Use at your own risk.
llvm-svn: 40489
2007-07-25 19:57:03 +00:00
Owen Anderson
ab6ec2eac2
Add a GVN pass, using the value numbering code I developed for GVNPRE and the
...
load elimination code from RedundantLoadElimination.
llvm-svn: 40469
2007-07-24 17:55:58 +00:00
Devang Patel
13b25df0e9
Unreachable block is not a root node in post dominator tree.
...
llvm-svn: 40458
2007-07-24 01:02:25 +00:00
Owen Anderson
9baaaa52e6
Rename a lot of things to change FastDLE to RedundantLoadElimination.
...
llvm-svn: 40457
2007-07-24 00:17:04 +00:00
Owen Anderson
0a75315d35
Add testcases for FastDLE.
...
llvm-svn: 40449
2007-07-23 22:18:05 +00:00
Owen Anderson
59a6840d47
Move these tests to use FastDSE instead of old DSE.
...
llvm-svn: 40444
2007-07-23 20:49:13 +00:00
Chris Lattner
7649abce46
This xform isn't safe, removing it.
...
llvm-svn: 40378
2007-07-21 21:27:27 +00:00
Dan Gohman
e31a61eeca
Optimize alignment of loads and stores.
...
llvm-svn: 40102
2007-07-20 16:34:21 +00:00
Reid Spencer
314e1cb7ee
For PR1553:
...
Change the keywords for the zext and sext parameter attributes to be
zeroext and signext so they don't conflict with the keywords for the
instructions of the same name. This gets around the ambiguity.
llvm-svn: 40069
2007-07-19 23:13:04 +00:00
Devang Patel
86dff8f8be
New test.
...
llvm-svn: 40023
2007-07-18 23:47:02 +00:00
Chris Lattner
d8bdf53335
rename function to avoid llvm-upgrade warning
...
llvm-svn: 39895
2007-07-16 04:09:00 +00:00
Chris Lattner
d4fef8dbca
Implement shift-simplify.ll:test[45].
...
First teach instcombine that sign bit checks only demand the
sign bit, this allows simplify demanded bits to hack on
expressions better.
Second, teach instcombine that ashr is useless if only the
sign bit is demanded.
llvm-svn: 39880
2007-07-15 20:54:51 +00:00
Chris Lattner
06205d5567
Implement shift-simplify.ll:test3, turning:
...
(X << 31) <s 0 --> (X&1) != 0
This happens dozens of times in the CFE.
llvm-svn: 39879
2007-07-15 20:42:37 +00:00
Devang Patel
52c2dd4699
New test.
...
llvm-svn: 39768
2007-07-11 23:54:25 +00:00
Owen Anderson
8b99e0ab20
Fix an error where ANTIC_OUT was ending up with more than one expression of
...
the same value number. This fixes an infinite loop on 444.namd.
llvm-svn: 37967
2007-07-07 20:13:57 +00:00
Owen Anderson
02e9698293
Fix a bunch of issues found in a testcase from 400.perlbench.
...
llvm-svn: 37929
2007-07-05 23:11:26 +00:00
Owen Anderson
ca1a184fd8
Fix another bug, this time in PREing select instructions.
...
llvm-svn: 37878
2007-07-04 22:33:23 +00:00