Once we have created a tail-predicated hardware-loop, and thus know the number of elements that are processed, we want to clean-up the iteration count expression of that loop. In D73682, we bailed the analysis on conditionally executed instructions. This adds support for IT-blocks, so that we can handle these cases again. The restriction is that we only support IT blocks containing 1 statement, but that seems to cover most cases and forms of the iteration count expression.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Would you mind adding a couple of other tests, both for IT blocks with multiple instructions:
- insert another instruction in the chain before LSL, so we have a larger predicated block.
- with an instruction not in the iteration count use-def chain, but still in the same IT, something like: IT, LSL, SOME_RANDOM_INST
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | ||
---|---|---|
850 | Could you remove these now, they've been laying around dead for a while. | |
890 | just returning is fine. |
Comment Actions
Thanks for looking and the suggestion. Added test case it-block-random.mir showed that I was missing a case: an instruction in the IT block not connected to the use-def chain, so fixed that.
Could you remove these now, they've been laying around dead for a while.