You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like currently CIRLoopOpLowering does not lower the nested break/continue statements within the lowered loop. For example this program
#include <stdio.h>
int foo(int n) {
int s = 0, i;
for (i = 1; i < n; ++i) {
if (i == 1)
break;
++s;
}
return s;
}
int main() {
int s = foo(10);
printf("%d\n", s);
return 0;
}
prints 9 instead of expected 0.
Probably the best way to fix this is to scan body region inside CIRLoopLowering, replacing break/continue yields with BrOps?