| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
return it as a clobber. This allows GVN to do smart things.
Enhance GVN to be smart about the case when a small load is clobbered
by a larger overlapping load. In this case, forward the value. This
allows us to compile stuff like this:
int test(void *P) {
int tmp = *(unsigned int*)P;
return tmp+*((unsigned char*)P+1);
}
into:
_test: ## @test
movl (%rdi), %ecx
movzbl %ch, %eax
addl %ecx, %eax
ret
which has one load. We already handled the case where the smaller
load was from a must-aliased base pointer.
llvm-svn: 130180
|
|
|
|
|
|
|
| |
generated by llvm-gcc, since llvm-gcc uses 2 i64s for passing a 4 x float
vector on ARM rather than an i64 array like Clang.
llvm-svn: 129878
|
|
|
|
|
|
| |
with a 64-bit datalayout.
llvm-svn: 129643
|
|
|
|
|
|
| |
Luis Felipe Strano Moraes!
llvm-svn: 129558
|
|
|
|
|
|
|
| |
canonical, and generally leads to better code. Found while looking at
an article about saturating arithmetic.
llvm-svn: 129545
|
|
|
|
|
|
|
|
|
|
| |
repeatedly undo each other. The solution is to perform more aggressive constant folding to make one of the edges just folded away rather than trying to thread it.
Fixes <rdar://problem/9284786>.
Discovered with CSmith.
llvm-svn: 129538
|
|
|
|
|
|
|
|
| |
the same allocation size but different primitive sizes(e.g., <3xi32> and
<4xi32>). When ScalarRepl promotes them, it can't use a bit cast but
should use a shuffle vector instead.
llvm-svn: 129472
|
|
|
|
|
|
|
|
|
| |
reassociation opportunities are exposed. This fixes a bug where
the nested reassociation expects to be the IR to be consistent,
but it isn't, because the outer reassociation has disconnected
some of the operands. rdar://9167457
llvm-svn: 129324
|
|
|
|
|
|
|
| |
has some bugs. If this is interesting functionality, it should be
reimplemented in the argpromotion pass.
llvm-svn: 129314
|
|
|
|
|
|
|
| |
is an array of structures doesn't imply it's a ConstantArray of
ConstantStruct.
llvm-svn: 129207
|
|
|
|
|
|
| |
indirectbr.
llvm-svn: 129203
|
|
|
|
|
|
|
| |
it's completely safe to cache the AST across LICM runs even with this fix,
but this fix can't hurt.
llvm-svn: 129198
|
|
|
|
| |
llvm-svn: 129197
|
|
|
|
| |
llvm-svn: 129114
|
|
|
|
|
|
| |
match.
llvm-svn: 129078
|
|
|
|
|
|
|
|
|
|
|
| |
is equivalent to any other relevant value; it isn't true in general.
If it is equivalent, the LoopPromoter will tell the AST the equivalence.
Also, delete the PreheaderLoad if it is unused.
Chris, since you were the last one to make major changes here, can you check
that this is sane?
llvm-svn: 129049
|
|
|
|
|
|
| |
test fail (without the fix). Thanks Dan.
llvm-svn: 128999
|
|
|
|
|
|
|
| |
space info. We crash with an assert in this case. This change checks that the
address space of the bitcasted pointer is the same as the gep ptr.
llvm-svn: 128884
|
|
|
|
|
|
|
|
|
|
|
| |
after the given instruction; make sure to handle that case correctly.
(It's difficult to trigger; the included testcase involves a dead
block, but I don't think that's a requirement.)
While I'm here, get rid of the unnecessary warning about
SimplifyInstructionsInBlock, since it should work correctly as far as I know.
llvm-svn: 128782
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
only one unknown bit.
int test1(unsigned x) { return (x&8) ? 0 : -1; }
int test3(unsigned x) { return (x&8) ? -1 : 0; }
before (x86_64):
_test1:
andl $8, %edi
cmpl $1, %edi
sbbl %eax, %eax
ret
_test3:
andl $8, %edi
cmpl $1, %edi
sbbl %eax, %eax
notl %eax
ret
after:
_test1:
shrl $3, %edi
andl $1, %edi
leal -1(%rdi), %eax
ret
_test3:
shll $28, %edi
movl %edi, %eax
sarl $31, %eax
ret
llvm-svn: 128732
|
|
|
|
| |
llvm-svn: 128683
|
|
|
|
|
|
|
|
| |
even try.
Thanks Eli!
llvm-svn: 128676
|
|
|
|
|
|
| |
Thanks Frits!
llvm-svn: 128628
|
|
|
|
| |
llvm-svn: 128627
|
|
|
|
| |
llvm-svn: 128626
|
|
|
|
|
|
|
|
| |
losslessly converted to the type of x.
Fixes PR9592.
llvm-svn: 128625
|
|
|
|
| |
llvm-svn: 128624
|
|
|
|
|
|
|
|
|
|
|
|
| |
that one of the numbers is signed while the other is unsigned. This could lead
to a wrong result when the signed was promoted to an unsigned int.
* Add the data layout line to the testcase so that it will test the appropriate
thing.
Patch by David Terei!
llvm-svn: 128577
|
|
|
|
|
|
|
|
|
| |
denormal multiplication.
Some platforms may treat denormals as zero, on other platforms multiplication
with a subnormal is slower than dividing by a normal.
llvm-svn: 128555
|
|
|
|
|
|
|
|
| |
fmul.
Fixes PR9587.
llvm-svn: 128546
|
|
|
|
|
|
|
|
| |
On x86 we now compile "if (a < 0 && b < 0)" into
testl %edi, %esi
js IF.THEN
llvm-svn: 128496
|
|
|
|
|
|
|
| |
vector types. This helps a lot with inlined functions when using the ARM soft
float ABI. Fixes <rdar://problem/9184212>.
llvm-svn: 128453
|
|
|
|
|
|
| |
the subclass optional data.
llvm-svn: 128388
|
|
|
|
|
|
| |
identical to the smul.with.overflow() code.
llvm-svn: 128379
|
|
|
|
|
|
|
|
|
|
| |
removes one use of X which helps it pass the many hasOneUse() checks.
In my analysis, this turns up very often where X = A >>exact B and that can't be
simplified unless X has one use (except by increasing the lifetime of A which is
generally a performance loss).
llvm-svn: 128373
|
|
|
|
| |
llvm-svn: 128331
|
|
|
|
|
|
|
| |
completely overlaps a previous store, thus mistakenly deleting that store. Check
for this condition.
llvm-svn: 128319
|
|
|
|
|
|
| |
that were hit in practice.
llvm-svn: 128146
|
|
|
|
|
|
| |
the function passed is empty.
llvm-svn: 127970
|
|
|
|
|
|
|
|
| |
For example, on 32-bit architecture, don't promote all uses of the IV
to 64-bits just because one use is a 64-bit cast.
Alternate implementation of the patch by Arnaud de Grandmaison.
llvm-svn: 127884
|
|
|
|
| |
llvm-svn: 127845
|
|
|
|
|
|
|
| |
This is done by lowering dbg.declare intrinsic into dbg.value intrinsic.
Radar 9143931.
llvm-svn: 127834
|
|
|
|
|
|
|
|
|
|
|
| |
chose is having a non-memcpy/memset use and being larger than any native integer
type. Originally I chose having an access of a size smaller than the total size
of the alloca, but this caused some minor issues on the spirit benchmark where
SRoA runs again after some inlining.
This fixes <rdar://problem/8613163>.
llvm-svn: 127718
|
|
|
|
| |
llvm-svn: 127717
|
|
|
|
| |
llvm-svn: 127674
|
|
|
|
|
|
| |
of pointers in an std::map.
llvm-svn: 127650
|
|
|
|
|
|
|
|
| |
normal version.
Fixes rdar://9123638
llvm-svn: 127636
|
|
|
|
| |
llvm-svn: 127548
|
|
|
|
|
|
|
|
|
|
|
| |
Optimize trivial branches in CodeGenPrepare, which often get created from the
lowering of objectsize intrinsics. Unfortunately, a number of tests were relying
on llc not optimizing trivial branches, so I had to add an option to allow them
to continue to test what they originally tested.
This fixes <rdar://problem/8785296> and <rdar://problem/9112893>.
llvm-svn: 127498
|
|
|
|
|
|
| |
created from the", it broke some GCC test suite tests.
llvm-svn: 127477
|