Chris Lattner
ad618f66e6
Fix a bug in my patch last night that broke InstCombine/2007-10-12-Crash.ll
...
llvm-svn: 42920
2007-10-12 18:05:47 +00:00
Chris Lattner
3e99eb25ee
testcase for PR1728
...
llvm-svn: 42890
2007-10-12 05:29:53 +00:00
Devang Patel
899cc56612
Lower memcpy if it makes sense.
...
llvm-svn: 42864
2007-10-11 17:21:57 +00:00
Devang Patel
a69f987b66
Fix bug in updating dominance frontier after loop
...
unswitch when frontier includes basic blocks that
are not inside loop.
llvm-svn: 42654
2007-10-05 22:29:34 +00:00
Devang Patel
2a60ff1aeb
Relax unsafe use check. If there is one unconditional use inside the loop then it is safe to promote value even if there is another conditional use inside the loop.
...
llvm-svn: 42493
2007-10-01 18:12:58 +00:00
Devang Patel
7bba386f72
Handle multiple induction variables.
...
This fixes PR714.
llvm-svn: 42309
2007-09-25 18:24:48 +00:00
Devang Patel
87d7e8ebcb
Add transformation to update loop interation space. Now,
...
for (i=A; i<N; i++) {
if (i < X && i > Y)
do_something();
}
is transformed into
U=min(N,X); L=max(A,Y);
for (i=L;i<U;i++)
do_somethihg();
llvm-svn: 42299
2007-09-25 17:31:19 +00:00
Devang Patel
9e30e1a3be
Do not promote null values because it may be unsafe to do so.
...
llvm-svn: 42270
2007-09-24 20:02:42 +00:00
Devang Patel
361e52f39c
Fix PR1692
...
llvm-svn: 42209
2007-09-21 21:18:19 +00:00
Duncan Sands
416b9f0410
Testcase for PR1678.
...
llvm-svn: 42171
2007-09-20 18:56:24 +00:00
Nick Lewycky
e7be16a053
Excuse me.
...
llvm-svn: 42158
2007-09-20 00:57:00 +00:00
Nick Lewycky
eae7e7d00b
Fix optimization. %x = sub %x, %y does not imply that %y is zero.
...
llvm-svn: 42157
2007-09-20 00:48:36 +00:00
Devang Patel
464276f831
Avoid unsafe promotion.
...
llvm-svn: 42149
2007-09-19 20:18:51 +00:00
Gabor Greif
49122edc98
rename test, it is obviously misspelled
...
llvm-svn: 42108
2007-09-18 21:42:39 +00:00
Devang Patel
fcda998ab2
Fix PR1657
...
llvm-svn: 42075
2007-09-18 01:54:42 +00:00
Dan Gohman
2ac2652779
Instcombine x-((x/y)*y) into a remainder operator.
...
llvm-svn: 42035
2007-09-17 17:31:57 +00:00
Chris Lattner
dd76f2f4ab
remove obsolete tests.
...
llvm-svn: 41984
2007-09-15 17:38:04 +00:00
Duncan Sands
94580c7522
Test that a call to a trampoline is turned into a call to
...
the underlying nested function.
llvm-svn: 41846
2007-09-11 15:07:50 +00:00
Chris Lattner
6cf04f4952
remove obsolete testcase
...
llvm-svn: 41820
2007-09-10 23:51:41 +00:00
Chris Lattner
52fe869374
Fix a buggy constant folding transformation when handling aliases.
...
llvm-svn: 41818
2007-09-10 23:42:42 +00:00
Dale Johannesen
62a48cea56
Add missing llvm-dis.
...
llvm-svn: 41813
2007-09-10 22:47:59 +00:00
Chris Lattner
c75cbe6473
Prevent tailcallelim from breaking "recursive" calls to builtins.
...
llvm-svn: 41804
2007-09-10 20:58:55 +00:00
Devang Patel
f8ab0a9acc
Filter exit conditions which are not yet handled.
...
llvm-svn: 41800
2007-09-10 18:33:42 +00:00
Chris Lattner
85a51e0060
Don't zap back to back volatile load/stores
...
llvm-svn: 41759
2007-09-07 05:33:03 +00:00
Nick Lewycky
b0b066eaaa
When the two operands of an icmp are equal, there are five possible predicates
...
that would make the icmp true. Fixes PR1637.
llvm-svn: 41740
2007-09-06 01:10:22 +00:00
Dale Johannesen
6480cc6f8c
Change all floating constants that are not exactly
...
representable to use hex format.
llvm-svn: 41722
2007-09-05 17:50:36 +00:00
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