search for: linearfunctiontest

Displaying 2 results from an estimated 2 matches for "linearfunctiontest".

2013 Nov 05
0
[LLVMdev] The order of GVN and IndVarSimplify
...e is done by CodeGen and is pretty far separated from > the usual IndVarSimplify position. > > I've attached the .ll form of the second loop, in case it helps. This is a good observation, and a bug in the optimization pipeline. A couple things: - I don’t see any good reason that the LinearFunctionTest replacement being done in IndVars can’t be done late, during LSR. AFAICT, it’s only purpose is enabling LoopStrengthReduce. - I think GVN should run earlier, before most of the loop opts, and I think IndVars should run much later. I filed a bug for this. See PR17809: Reordering IR-level optimizati...
2013 Oct 31
2
[LLVMdev] The order of GVN and IndVarSimplify
This might be hard cases making bad law, but the loop: void f (unsigned short *x, int *l) { int c = *l; int i; for (i = 0; i < c; i++) if (x[i]) x[i]++; } is converted to decrement-and-branch form by LoopStrengthReduce while: void f (unsigned short *x, int *l) { int i; for (i = 0; i < *l; i++) if (x[i]) x[i]++; } isn't.