mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
add a missed loop deletion case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126103 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
408b534e43
commit
19310fc199
@ -254,6 +254,20 @@ unsigned long reverse(unsigned v) {
|
|||||||
|
|
||||||
//===---------------------------------------------------------------------===//
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
[LOOP DELETION]
|
||||||
|
|
||||||
|
We don't delete this output free loop, because trip count analysis doesn't
|
||||||
|
realize that it is finite (if it were infinite, it would be undefined). Not
|
||||||
|
having this blocks Loop Idiom from matching strlen and friends.
|
||||||
|
|
||||||
|
void foo(char *C) {
|
||||||
|
int x = 0;
|
||||||
|
while (*C)
|
||||||
|
++x,++C;
|
||||||
|
}
|
||||||
|
|
||||||
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
[LOOP RECOGNITION]
|
[LOOP RECOGNITION]
|
||||||
|
|
||||||
These idioms should be recognized as popcount (see PR1488):
|
These idioms should be recognized as popcount (see PR1488):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user