- Mar 01, 2011
-
-
Anders Carlsson authored
intersection of the LHS and RHS ConstantRanges and return "false" when the range is empty. This simplifies some code and catches some extra cases. llvm-svn: 126744
-
Eli Friedman authored
llvm-svn: 126720
-
Ted Kremenek authored
llvm-svn: 126715
-
- Feb 28, 2011
-
-
Chris Lattner authored
llvm-svn: 126694
-
Dan Gohman authored
llvm-svn: 126671
-
Dan Gohman authored
only existed as the result of a misunderstanding. llvm-svn: 126669
-
Frits van Bommel authored
Based on a patch by Alistair Lynn. llvm-svn: 126647
-
Nick Lewycky authored
also have a zero when numerator = denominator. Reverts parts of r126635 and r126637. llvm-svn: 126644
-
Nick Lewycky authored
PR9343. llvm-svn: 126643
-
Nick Lewycky authored
argument), regardless of the divisor. Teach instcombine about this and fix test7 in PR9343! llvm-svn: 126635
-
- Feb 25, 2011
-
-
Benjamin Kramer authored
Yes, there are other types than i8* and GEPs on them can produce an add+multiply. We don't consider that cheap enough to be speculatively executed. llvm-svn: 126481
-
Benjamin Kramer authored
llvm-svn: 126452
-
- Feb 24, 2011
-
-
Benjamin Kramer authored
llvm-svn: 126445
-
Devang Patel authored
llvm-svn: 126398
-
Chris Lattner authored
trivial places. This pass needs a lot of work. llvm-svn: 126367
-
Chris Lattner authored
to reduce nesting. This needs to be turned into a table. llvm-svn: 126366
-
Chris Lattner authored
function prototype into a call to a varargs prototype. We do allow the xform if we have a definition, but otherwise we don't want to risk that we're changing the abi in a subtle way. On X86-64, for example, varargs require passing stuff in %al. llvm-svn: 126363
-
- Feb 22, 2011
-
-
Cameron Zwarich authored
values from all of the loop's exiting blocks are equal. Patch by Andrew Clinton. llvm-svn: 126253
-
- Feb 21, 2011
-
-
Duncan Sands authored
itself without going via a phi node then we could return false here in spite of making a change. Also, tweak the comment because this method can (and always could) return true without deleting the original phi node. For example, if the phi node was used by a read-only invoke instruction which is used by another phi node phi2 which is only used by and only uses the invoke, then phi2 would be deleted but not the invoke instruction and not the original phi node. llvm-svn: 126129
-
Chris Lattner authored
llvm-svn: 126125
-
Duncan Sands authored
should be that if the phi is used by a side-effect free instruction with no uses then the phi and the instruction now get zapped (checked by the unittest). llvm-svn: 126124
-
Chris Lattner authored
llvm-svn: 126102
-
- Feb 20, 2011
-
-
Nick Lewycky authored
test for that. With this change, test/CodeGen/X86/codegen-dce.ll no longer finds any instructions to DCE, so delete the test. Also renamed J and JP to I and IP in RecursivelyDeleteDeadPHINode. llvm-svn: 126088
-
Benjamin Kramer authored
llvm-svn: 126082
-
Benjamin Kramer authored
We usually catch this kind of optimization through InstSimplify's distributive magic, but or doesn't distribute over xor in general. "A | ~(A | B) -> A | ~B" hits 24 times on gcc.c. llvm-svn: 126081
-
Nick Lewycky authored
by Andrew Clinton! llvm-svn: 126077
-
Nick Lewycky authored
one Value set. This is faster because we only need to use the set when there isn't already an entry in the map. No functionality change! llvm-svn: 126076
-
- Feb 19, 2011
-
-
Eli Friedman authored
the instruction passed in. Make sure to account for this correctly, instead of looping infinitely. llvm-svn: 126058
-
Chris Lattner authored
constant, including globals. This makes us generate much more "pretty" pattern globals as well because it doesn't break it down to an array of bytes all the time. This enables us to handle stores of relocatable globals. This kicks in about 48 times in 254.gap, giving us stuff like this: @.memset_pattern40 = internal constant [2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*] [%struct.TypHeader* (%struct.TypHeader*, %struct .TypHeader*)* @IsFalse, %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)* @IsFalse], align 16 ... call void @memset_pattern16(i8* %scevgep5859, i8* bitcast ([2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]* @.memset_pattern40 to i8* ), i64 %tmp75) nounwind llvm-svn: 126044
-
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
-