Displaying 1 result from an estimated 1 matches for "xdijbb".
2020 Jun 17
2
Why doesn't this loop get removed?
int f() {
int A[100];
for (int i = 0; i < 100; ++i)
A[i] = i;
return A[10];
}
Neither gcc nor clang eliminates the loop. Clang also blows up the code a bit by unrolling the loop. Why can't this loop and the array be eliminated and the function body turned into ret i32 10 ? Am I missing something?
/Riyaz
-------------- next part --------------
An HTML attachment was