- Feb 19, 2011
-
-
rdar://9009151Chris Lattner authored
unsplatable values into memset_pattern16 when it is available (recent darwins). This transforms lots of strided loop stores of ints for example, like 5 in vpr: Formed memset: call void @memset_pattern16(i8* %4, i8* getelementptr inbounds ([16 x i8]* @.memset_pattern9, i32 0, i32 0), i64 %tmp25) from store to: {%3,+,4}<%11> at: store i32 3, i32* %scevgep, align 4, !tbaa !4 llvm-svn: 126040
-
- Feb 18, 2011
-
-
Chris Lattner authored
to hack on memset, memcpy etc. llvm-svn: 125974
-
Oscar Fuentes authored
llvm-svn: 125968
-
Duncan Sands authored
overflow. These subsume some existing equality transforms, so zap those. llvm-svn: 125843
-
Chris Lattner authored
taken (and used!). This prevents merging the blocks (invalidating the block addresses) in a case like this: #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) void foo() { printf("%p\n", _THIS_IP_); printf("%p\n", _THIS_IP_); printf("%p\n", _THIS_IP_); } which fixes PR4151. llvm-svn: 125829
-
Chris Lattner authored
This is part of a futile attempt to not "break" bizzaro code like this: l1: printf("l1: %p\n", &&l1); ++x; if( x < 3 ) goto l1; Previously we'd fold &&l1 to 1, which is fine per our semantics but not helpful to the user. llvm-svn: 125827
-
Chris Lattner authored
common operations through a phi. llvm-svn: 125790
-
- Feb 17, 2011
-
-
Chris Lattner authored
llvm-svn: 125787
-
Chris Lattner authored
result inbounds if all of the inputs are inbounds. llvm-svn: 125785
-
Chris Lattner authored
llvm-svn: 125774
-
Duncan Sands authored
variations (some of these were already present so I unified the code). Spotted by my auto-simplifier as occurring a lot. llvm-svn: 125734
-
Chris Lattner authored
llvm-svn: 125711
-
Chris Lattner authored
it swaps the LHS/RHS of a single binop. llvm-svn: 125700
-
- Feb 15, 2011
-
-
Duncan Sands authored
llvm-svn: 125563
-
Nadav Rotem authored
Fix 9216 - Endless loop in InstCombine pass. The pattern "A&(A^B) -> A & ~B" recreated itself because ~B is actually a xor -1. llvm-svn: 125557
-
Devang Patel authored
llvm-svn: 125547
-
Chris Lattner authored
llvm-svn: 125546
-
Chris Lattner authored
llvm-svn: 125537
-
Devang Patel authored
Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop. llvm-svn: 125529
-
- Feb 14, 2011
-
-
Chris Lattner authored
builders unhappy. llvm-svn: 125504
-
Chris Lattner authored
idiom. Change various clients to simplify their code. llvm-svn: 125487
-
- Feb 13, 2011
-
-
Chris Lattner authored
llvm-svn: 125464
-
Chris Lattner authored
We were previously simplifying divisions, but not right shifts! llvm-svn: 125454
-
Chris Lattner authored
llvm-svn: 125451
-
- Feb 12, 2011
-
-
Daniel Dunbar authored
putchar transforms, their return values are not compatible. llvm-svn: 125442
-
- Feb 11, 2011
-
-
Benjamin Kramer authored
llvm-svn: 125411
-
Chris Lattner authored
unsigned overflow (e.g. due to a negative array index), but the scales on array size multiplications are known to not sign wrap. llvm-svn: 125409
-
Cameron Zwarich authored
a loop when unswitching it. It only does this in the complex case, because everything should be fine already in the simple case. llvm-svn: 125369
-
Cameron Zwarich authored
llvm-svn: 125368
-
Cameron Zwarich authored
iv-users twice. llvm-svn: 125318
-
Cameron Zwarich authored
llvm-svn: 125317
-
- Feb 10, 2011
-
-
Chris Lattner authored
gep to explicit addressing, we know that none of the intermediate computation overflows. This could use review: it seems that the shifts certainly wouldn't overflow, but could the intermediate adds overflow if there is a negative index? Previously the testcase would instcombine to: define i1 @test(i64 %i) { %p1.idx.mask = and i64 %i, 4611686018427387903 %cmp = icmp eq i64 %p1.idx.mask, 1000 ret i1 %cmp } now we get: define i1 @test(i64 %i) { %cmp = icmp eq i64 %i, 1000 ret i1 %cmp } llvm-svn: 125271
-
Chris Lattner authored
exact/nsw/nuw shifts and have instcombine infer them when it can prove that the relevant properties are true for a given shift without them. Also, a variety of refactoring to use the new patternmatch logic thrown in for good luck. I believe that this takes care of a bunch of related code quality issues attached to PR8862. llvm-svn: 125267
-
Chris Lattner authored
optimizations to be much more aggressive in the face of exact/nsw/nuw div and shifts. For example, these (which are the same except the first is 'exact' sdiv: define i1 @sdiv_icmp4_exact(i64 %X) nounwind { %A = sdiv exact i64 %X, -5 ; X/-5 == 0 --> x == 0 %B = icmp eq i64 %A, 0 ret i1 %B } define i1 @sdiv_icmp4(i64 %X) nounwind { %A = sdiv i64 %X, -5 ; X/-5 == 0 --> x == 0 %B = icmp eq i64 %A, 0 ret i1 %B } compile down to: define i1 @sdiv_icmp4_exact(i64 %X) nounwind { %1 = icmp eq i64 %X, 0 ret i1 %1 } define i1 @sdiv_icmp4(i64 %X) nounwind { %X.off = add i64 %X, 4 %1 = icmp ult i64 %X.off, 9 ret i1 %1 } This happens when you do something like: (ptr1-ptr2) == 42 where the pointers are pointers to non-unit types. llvm-svn: 125266
-
Chris Lattner authored
conversions". :) llvm-svn: 125265
-
Chris Lattner authored
and generally tidying things up. Only very trivial functionality changes like now doing (-1 - A) -> (~A) for vectors too. InstCombineAddSub.cpp | 296 +++++++++++++++++++++----------------------------- 1 file changed, 126 insertions(+), 170 deletions(-) llvm-svn: 125264
-
Chris Lattner authored
are shifting out since they do require them to be zeros. Similarly for NUW/NSW bits of shl llvm-svn: 125263
-
Eric Christopher authored
llvm-svn: 125257
-
Cameron Zwarich authored
Natural Loop Information Loop Pass Manager Canonicalize natural loops Scalar Evolution Analysis Loop Pass Manager Induction Variable Users Canonicalize natural loops Induction Variable Users Loop Strength Reduction into this: Scalar Evolution Analysis Loop Pass Manager Canonicalize natural loops Induction Variable Users Loop Strength Reduction This fixes <rdar://problem/8869639>. I also filed PR9184 on doing this sort of thing automatically, but it seems easier to just change the ordering of the passes if this is the only case. llvm-svn: 125254
-
- Feb 09, 2011
-
-
Chris Lattner authored
improve interfaces to instsimplify to take this info. llvm-svn: 125196
-