Issue |
150134
|
Summary |
LLVM fails to optimize out unnecessary check for greater than or equal to zero in loop
|
Labels |
new issue
|
Assignees |
|
Reporter |
johnplatts
|
Here is a snippet that demonstrates a missed optimization with LLVM: https://alive2.llvm.org/ce/z/WOvYip
LLVM fails to optimize out the unnecessary `%j < %num_to_process` check at the beginning of the inner loop in `@src` in the above LLVM IR snippet as the LLVM optimizer fails to detect that `%remaining_len` is greater than zero as `%i` is known to be less than `%argc` in all iterations of the outer loop due to the `icmp sgt` checks at the beginning of the outer loop.
alive-tv also determined that the transformation of `@src` to `@tgt` in the above snippet appears to be correct.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs