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
int foo(int A, int B, int C) {
int i;
int result = 0;
if (A == 1) {
for (i = 0; i < 1000; ++i) {
if (i & B) {result = 1; break; }
}
} else if (A == 0) {
for (i = 0; i < 1000; ++i) {
if (i & C) {result = 1; break; }
}
} else if (A == 2) {
for (i = 0; i < 1000; ++i) {
if (i & C) {result = 1; break; }
}
}
Extended Description
This contrived testcase:
int foo(int A, int B, int C) {
int i;
int result = 0;
if (A == 1) {
for (i = 0; i < 1000; ++i) {
if (i & B) {result = 1; break; }
}
} else if (A == 0) {
for (i = 0; i < 1000; ++i) {
if (i & C) {result = 1; break; }
}
} else if (A == 2) {
for (i = 0; i < 1000; ++i) {
if (i & C) {result = 1; break; }
}
}
out:
return result;
}
Produces silly code like this:
LBB1_19: #bb13.out.loopexit1_crit_edge
movl $1, %eax
jmp LBB1_15 #out
LBB1_20: #bb.out.loopexit_crit_edge
movl $1, %eax
jmp LBB1_15 #out
LBB1_21: #bb27.out.loopexit3_crit_edge
movl $1, %eax
jmp LBB1_15 #out
The text was updated successfully, but these errors were encountered: