| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 129644
|
|
|
|
|
|
| |
found by code inspection.
llvm-svn: 129641
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 129419
|
|
|
|
| |
llvm-svn: 129403
|
|
|
|
|
|
|
|
|
| |
Now that we have a first-class way to represent unaligned loads, the unaligned
load intrinsics are superfluous.
First part of <rdar://problem/8460511>.
llvm-svn: 129401
|
|
|
|
| |
llvm-svn: 129271
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
It's possible to craft an input that hits the recursion limits in a way
that SimplifyDemandedBits doesn't simplify the icmp but ComputeMaskedBits
can infer which bits are zero.
No test case as it depends on too many other things. Fixes PR9609.
llvm-svn: 128777
|
|
|
|
| |
llvm-svn: 128745
|
|
|
|
|
|
|
|
|
|
| |
- Localize the check if an icmp has one use to a place where we know we're
introducing something that's likely more expensive than a sext from i1.
- Add an assert to make sure a case that would lead to a miscompilation is
folded away earlier.
- Fix a typo.
llvm-svn: 128744
|
|
|
|
| |
llvm-svn: 128733
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
functionality change.
llvm-svn: 128731
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
fmul.
Fixes PR9587.
llvm-svn: 128546
|
|
|
|
|
|
| |
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128537
|
|
|
|
| |
llvm-svn: 128535
|
|
|
|
|
|
|
|
| |
On x86 we now compile "if (a < 0 && b < 0)" into
testl %edi, %esi
js IF.THEN
llvm-svn: 128496
|
|
|
|
| |
llvm-svn: 128413
|
|
|
|
| |
llvm-svn: 128406
|
|
|
|
|
|
| |
output for those cases much clearer since without this it only showed that the original instruction was removed, not what it was replaced with.
llvm-svn: 128399
|
|
|
|
|
|
| |
the subclass optional data.
llvm-svn: 128388
|
|
|
|
| |
llvm-svn: 128380
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This is done by lowering dbg.declare intrinsic into dbg.value intrinsic.
Radar 9143931.
llvm-svn: 127834
|
|
|
|
|
|
|
|
| |
normal version.
Fixes rdar://9123638
llvm-svn: 127636
|
|
|
|
|
|
| |
Early CSE pass so this patch reverts it to original source code.
llvm-svn: 127574
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
load and store reference same memory location, the memory location
is represented by getelementptr with two uses (load and store) and
the getelementptr's base is alloca with single use. At this point,
instructions from alloca to store can be removed.
(this pattern is generated when bitfield is accessed.)
For example,
%u = alloca %struct.test, align 4 ; [#uses=1]
%0 = getelementptr inbounds %struct.test* %u, i32 0, i32 0;[#uses=2]
%1 = load i8* %0, align 4 ; [#uses=1]
%2 = and i8 %1, -16 ; [#uses=1]
%3 = or i8 %2, 5 ; [#uses=1]
store i8 %3, i8* %0, align 4
llvm-svn: 127565
|
|
|
|
| |
llvm-svn: 127539
|
|
|
|
|
|
|
|
| |
it's a zero comparison when it's not.
Fixes PR9454.
llvm-svn: 127464
|
|
|
|
|
|
|
|
|
|
| |
cannot overflow.
This happens a lot in clang-compiled C++ code because it adds overflow checks to operator new[]:
unsigned *foo(unsigned n) { return new unsigned[n]; }
We can optimize away the overflow check on 64 bit targets because (uint64_t)n*4 cannot overflow.
llvm-svn: 127418
|
|
|
|
|
|
| |
INT_MIN % -1.
llvm-svn: 127306
|
|
|
|
| |
llvm-svn: 127282
|
|
|
|
| |
llvm-svn: 127220
|
|
|
|
|
|
|
| |
then the result could go either way. If it's provably positive then so is the
srem. Fixes PR9343 #7!
llvm-svn: 127146
|
|
|
|
|
|
|
|
| |
the value splatted into every element. Extend this to getTrue and getFalse which
by providing new overloads that take Types that are either i1 or <N x i1>. Use
it in InstCombine to add vector support to some code, fixing PR8469!
llvm-svn: 127116
|
|
|
|
|
|
| |
map, reserve space early to avoid rehashing.
llvm-svn: 127089
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
also have a zero when numerator = denominator. Reverts parts of r126635 and
r126637.
llvm-svn: 126644
|
|
|
|
|
|
| |
PR9343.
llvm-svn: 126643
|