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.