| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
possible. This goes into instcombine and instsimplify because instsimplify
doesn't need to check hasOneUse since it returns (almost exclusively) constants.
This fixes PR9343 #4 #5 and #8!
llvm-svn: 127064
|
|
|
|
|
|
| |
true/false or "icmp slt/sge Y, 0".
llvm-svn: 127063
|
|
|
|
|
|
|
| |
Avoid colliding with the sentinels, hopefully unbreaking
llvm-gcc-x86_64-linux-selfhost.
llvm-svn: 126982
|
|
|
|
| |
llvm-svn: 126941
|
|
|
|
|
|
| |
and siprintf is available on the target.
llvm-svn: 126940
|
|
|
|
|
|
| |
and siprintf is available on the target.
llvm-svn: 126937
|
|
|
|
|
|
|
| |
and iprintf is available on the target. Currently iprintf is only
marked as being available on the XCore.
llvm-svn: 126935
|
|
|
|
| |
llvm-svn: 126826
|
|
|
|
| |
llvm-svn: 126825
|
|
|
|
|
|
|
|
| |
addressing code. On 403.gcc this almost halves CodeGenPrepare time and reduces
total llc time by 9.5%. Unfortunately, getNumUses() is still the hottest function
in llc.
llvm-svn: 126782
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 126720
|
|
|
|
| |
llvm-svn: 126715
|
|
|
|
| |
llvm-svn: 126694
|
|
|
|
| |
llvm-svn: 126671
|
|
|
|
|
|
| |
only existed as the result of a misunderstanding.
llvm-svn: 126669
|
|
|
|
|
|
|
|
| |
branch.
Based on a patch by Alistair Lynn.
llvm-svn: 126647
|
|
|
|
|
|
|
| |
also have a zero when numerator = denominator. Reverts parts of r126635 and
r126637.
llvm-svn: 126644
|
|
|
|
|
|
| |
PR9343.
llvm-svn: 126643
|
|
|
|
|
|
|
| |
argument), regardless of the divisor. Teach instcombine about this and fix
test7 in PR9343!
llvm-svn: 126635
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 126452
|
|
|
|
|
|
| |
unconditionally.
llvm-svn: 126445
|
|
|
|
| |
llvm-svn: 126398
|
|
|
|
|
|
| |
trivial places. This pass needs a lot of work.
llvm-svn: 126367
|
|
|
|
|
|
| |
to reduce nesting. This needs to be turned into a table.
llvm-svn: 126366
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
values from all of the loop's exiting blocks are equal. Patch by Andrew Clinton.
llvm-svn: 126253
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 126125
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 126102
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 126082
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
by Andrew Clinton!
llvm-svn: 126077
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
the instruction passed in. Make sure to account for this correctly, instead
of looping infinitely.
llvm-svn: 126058
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
to hack on memset, memcpy etc.
llvm-svn: 125974
|
|
|
|
| |
llvm-svn: 125968
|
|
|
|
|
|
| |
overflow. These subsume some existing equality transforms, so zap those.
llvm-svn: 125843
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
common operations through a phi.
llvm-svn: 125790
|
|
|
|
| |
llvm-svn: 125787
|
|
|
|
|
|
| |
result inbounds if all of the inputs are inbounds.
llvm-svn: 125785
|
|
|
|
| |
llvm-svn: 125774
|
|
|
|
|
|
|
|
|
| |
for some
variations (some of these were already present so I unified the code). Spotted by my
auto-simplifier as occurring a lot.
llvm-svn: 125734
|