[PATCH] D18670: LoopUnroll: some small fixes/tweaks to make it more useful for partial unrolling
escha via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 14:36:03 PDT 2016
escha added a comment.
> For your target there is a case when full unroll fails and then partial fails as well. And when patch applied partial unroll is successful. Right? So you can create target test.
Partial unroll didn't fail -- rather, it did the wrong thing. For example, suppose the loop count was 9, and the FullUnrollMaxCount was 6. The process would go like this:
1. tripcount = 9, count = 9
2. count = 6, because of FullUnrollMaxCount.
3. count != tripcount, so full unroll can't be done; do partial instead.
4. we're within the partial threshold, so skip the logic for that. do a partial unroll with count 6. (this is where we totally skip the logic to fix up the count)
Now we get a 6-wide partial unroll with a fixup loop at the end, which is totally not what we wanted.
Also, it's an out of tree target, so we can't possibly add an in-tree test. But I figure any target that wanted to limit the unroll count would have the same problem.
Repository:
rL LLVM
http://reviews.llvm.org/D18670
More information about the llvm-commits
mailing list