1 // RUN: clang %s -O3 -target arm64-apple-ios -o - -S -mllvm -debug-only=loop-reduce 2>&1| FileCheck %s
4 // LSR used to fail here due to a bug in the ReqRegs test. To complicate
5 // things, this could only be reproduced with clang because the uses would
6 // come out in different order when invoked through llc.
8 // CHECK: The chosen solution requires
9 // CHECK-NOT: No Satisfactory Solution
11 typedef unsigned long iter_t;
12 void use_int(int result);
21 do_integer_add(iter_t iterations, void* cookie)
23 struct _state *pState = (struct _state*)cookie;
25 register int a = pState->N + 57;
27 while (iterations-- > 0) {
28 for (i = 1; i < 1001; ++i) {
29 a=a+a+i; a=a+a+i; a=a+a+i; a=a+a+i;
30 a=a+a+i; a=a+a+i; a=a+a+i; a=a+a+i;