| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
getUDivExpr attempts to simplify by checking for overflow.
isLoopEntryGuardedByCond then evaluates the loop predicate which
may lead to the same getUDivExpr causing endless recursion.
Fixes PR12868: clang 3.2 segmentation fault.
llvm-svn: 157092
|
|
|
|
|
|
|
|
| |
getZeroExtendExpr()
this gives a speedup of > 80 in a debug build in the test case of PR12825 (php_sha512_crypt_r)
llvm-svn: 156849
|
|
|
|
|
|
| |
getEffectiveSCEVType() twice
llvm-svn: 156823
|
|
|
|
|
|
| |
of recursion, to avoid excessive stack usage on deep expressions.
llvm-svn: 156554
|
|
|
|
|
|
|
|
| |
has NUW but not NSW."
This isn't right either, reverting for now.
llvm-svn: 154910
|
|
|
|
|
|
|
|
| |
but not NSW.
Found by inspection.
llvm-svn: 154262
|
|
|
|
|
|
|
|
| |
This allows us to keep passing reduced masks to SimplifyDemandedBits, but
know about all the bits if SimplifyDemandedBits fails. This allows instcombine
to simplify cases like the one in the included testcase.
llvm-svn: 154011
|
|
|
|
|
|
| |
Fixes PR11882: NULL dereference in ComputeLoadConstantCompareExitLimit.
llvm-svn: 153480
|
|
|
|
|
|
|
|
| |
instead of its own hard coded thing, allowing it to handle
ConstantDataSequential and fixing some obscure bugs (e.g. it would
previously crash on a CAZ of vector type).
llvm-svn: 148788
|
|
|
|
| |
llvm-svn: 148578
|
|
|
|
|
|
|
|
| |
ConstantAggregateZeros.
Found by the clang static analyzer.
llvm-svn: 148540
|
|
|
|
|
|
|
|
| |
comments.
This interface is misleading and dangerous, but it is actually what we need for unrolling.
llvm-svn: 147926
|
|
|
|
| |
llvm-svn: 147700
|
|
|
|
|
|
| |
Add FIXMEs to places that are non-trivial to fix.
llvm-svn: 145661
|
|
|
|
|
|
|
| |
where it appeared beneficial to pass.
More of rdar://10500969
llvm-svn: 145630
|
|
|
|
|
|
|
| |
InstructionSimplify.cpp. Other fixups as needed.
Part of rdar://10500969
llvm-svn: 145559
|
|
|
|
|
|
|
| |
This reverts r139450, fixes r139453, and adds much needed comments and a
unit test.
llvm-svn: 145367
|
|
|
|
| |
llvm-svn: 145364
|
|
|
|
|
|
| |
setFlags doesn't modify its arguments.
llvm-svn: 145007
|
|
|
|
|
|
| |
Fixes PR11375: Different results for 'clang++ huh.cpp'...
llvm-svn: 144746
|
|
|
|
|
|
| |
loop. Fixes PR11361!
llvm-svn: 144454
|
|
|
|
|
|
| |
or not. Patch by Brendon Cahoon!
llvm-svn: 144173
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bots. Original commit messages:
- Reapply r142781 with fix. Original message:
Enhance SCEV's brute force loop analysis to handle multiple PHI nodes in the
loop header when computing the trip count.
With this, we now constant evaluate:
struct ListNode { const struct ListNode *next; int i; };
static const struct ListNode node1 = {0, 1};
static const struct ListNode node2 = {&node1, 2};
static const struct ListNode node3 = {&node2, 3};
int test() {
int sum = 0;
for (const struct ListNode *n = &node3; n != 0; n = n->next)
sum += n->i;
return sum;
}
- Now that we look at all the header PHIs, we need to consider all the header PHIs
when deciding that the loop has stopped evolving. Fixes miscompile in the gcc
torture testsuite!
llvm-svn: 142919
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the dragonegg and llvm-gcc self-host buildbots. Original commit
messages:
- Reapply r142781 with fix. Original message:
Enhance SCEV's brute force loop analysis to handle multiple PHI nodes in the
loop header when computing the trip count.
With this, we now constant evaluate:
struct ListNode { const struct ListNode *next; int i; };
static const struct ListNode node1 = {0, 1};
static const struct ListNode node2 = {&node1, 2};
static const struct ListNode node3 = {&node2, 3};
int test() {
int sum = 0;
for (const struct ListNode *n = &node3; n != 0; n = n->next)
sum += n->i;
return sum;
}
- Now that we look at all the header PHIs, we need to consider all the header PHIs
when deciding that the loop has stopped evolving. Fixes miscompile in the gcc
torture testsuite!
llvm-svn: 142916
|
|
|
|
|
|
|
| |
when deciding that the loop has stopped evolving. Fixes miscompile in the gcc
torture testsuite!
llvm-svn: 142843
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enhance SCEV's brute force loop analysis to handle multiple PHI nodes in the
loop header when computing the trip count.
With this, we now constant evaluate:
struct ListNode { const struct ListNode *next; int i; };
static const struct ListNode node1 = {0, 1};
static const struct ListNode node2 = {&node1, 2};
static const struct ListNode node3 = {&node2, 3};
int test() {
int sum = 0;
for (const struct ListNode *n = &node3; n != 0; n = n->next)
sum += n->i;
return sum;
}
llvm-svn: 142790
|
|
|
|
|
|
|
| |
state. Furthermore, they might not have two operands. This fixes the underlying
issue behind the crashes introduced in r142781.
llvm-svn: 142788
|
|
|
|
|
|
|
| |
Assertion `i_nocapture < OperandTraits<PHINode>::operands(this) && "getOperand() out of range!"' failed.
coming out of indvars.
llvm-svn: 142786
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
loop header when computing the trip count.
With this, we now constant evaluate:
struct ListNode { const struct ListNode *next; int i; };
static const struct ListNode node1 = {0, 1};
static const struct ListNode node2 = {&node1, 2};
static const struct ListNode node3 = {&node2, 3};
int test() {
int sum = 0;
for (const struct ListNode *n = &node3; n != 0; n = n->next)
sum += n->i;
return sum;
}
llvm-svn: 142781
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
able to constant fold load instructions where the argument is a constant.
Second, we should be able to watch multiple PHI nodes through the loop; this
patch only supports PHIs in loop headers, more can be done here.
With this patch, we now constant evaluate:
static const int arr[] = {1, 2, 3, 4, 5};
int test() {
int sum = 0;
for (int i = 0; i < 5; ++i) sum += arr[i];
return sum;
}
llvm-svn: 142731
|
|
|
|
|
|
|
|
| |
could be arguments, for example.
No testcase because this is a bug-fix broken out of a larger optimization patch.
llvm-svn: 141951
|
|
|
|
| |
llvm-svn: 141219
|
|
|
|
| |
llvm-svn: 141188
|
|
|
|
| |
llvm-svn: 141168
|
|
|
|
|
|
|
|
| |
I noticed during self-review that my previous checkin disabled some
analysis. Even with the reenabled analysis the test case runs in about
5ms. Without the fix, it will take several minutes at least.
llvm-svn: 141164
|
|
|
|
|
|
|
|
|
|
| |
EvaluateExpression.
Note to compiler writers: never recurse on multiple instruction
operands without memoization.
Fixes rdar://10187945. Was taking 45s, now taking 5ms.
llvm-svn: 141161
|
|
|
|
| |
llvm-svn: 141066
|
|
|
|
|
|
| |
logic by David Meyer revealed this bug.
llvm-svn: 140992
|
|
|
|
| |
llvm-svn: 140980
|
|
|
|
| |
llvm-svn: 140979
|
|
|
|
|
|
|
| |
Handle general Add expressions to avoid leaving around redundant
32-bit IVs.
llvm-svn: 140701
|
|
|
|
|
|
|
|
|
|
| |
such.
I'm doing this now for completeness because I can't think of/remember
any reason that it was left out. I'm not sure it will help anything,
but if we don't do it we need to explain why in comments.
llvm-svn: 139450
|
|
|
|
|
|
| |
handle anything more complex. Fixes PR10383 again!
llvm-svn: 139186
|
|
|
|
| |
llvm-svn: 139139
|
|
|
|
| |
llvm-svn: 139138
|
|
|
|
| |
llvm-svn: 139137
|
|
|
|
|
|
| |
add more showing of my work.
llvm-svn: 139136
|
|
|
|
| |
llvm-svn: 139135
|
|
|
|
| |
llvm-svn: 139134
|
|
|
|
|
|
|
| |
visible given a=b=c=d=1, on iteration #1 (the second iteration). Replace it with
correct math. Fixes PR10383!
llvm-svn: 139133
|