Changeset View
Changeset View
Standalone View
Standalone View
clang/test/Misc/loop-opt-setup.c
Show All 17 Lines | void Helper() { | ||||
while (num_active) | while (num_active) | ||||
#pragma clang loop unroll(full) | #pragma clang loop unroll(full) | ||||
for (int i = 0; i < 5; ++i) | for (int i = 0; i < 5; ++i) | ||||
if (nodes[i]) | if (nodes[i]) | ||||
--num_active; | --num_active; | ||||
} | } | ||||
// Check br i1 to make sure the loop is gone, there will still be a label branch for the infinite loop. | // Check br i1 to make sure the loop is gone, there will still be a label branch for the infinite loop. | ||||
fhahn: This comment needs updating, there's no loop there now. Or better, add a run-line with a C… | |||||
fhahnUnsubmitted Not Done ReplyInline ActionsCan you also explain the C99 case in the comment? fhahn: Can you also explain the C99 case in the comment? | |||||
// CHECK-LABEL: Helper | // CHECK-LABEL: Helper | ||||
// CHECK: br label | // CHECK: entry: | ||||
// CHECK-NOT: br i1 | // CHECK-NOT: br i1 | ||||
// CHECK: br label | // CHECK-NEXT: ret void |
This comment needs updating, there's no loop there now. Or better, add a run-line with a C standard version that does not have the forward progress guarantee, e.g. -std=c99 and one with an explicit standard that has it and have different check lines for the 2 cases.