I've removed the code that tried to look for reduction patterns, since the vectorizer and isel can now produce predicated reductions within the loop body. This has required some reorganisation and fixes around live-out and predication checks, as well as looking for cases where an input/output is initialised to zero.
I've only changed one test, one_loop_add_add_v16i8 in reductions.ll, to represent what IR should now be generated, but the rest of those functions remain untouched.
A lot of other tests look much worse because tail predication is no longer happening (probably more correct though!) and we don't expect to see those types of reductions anymore. I didn't want to make a whole bunch of test changes because enough of the existing tests have already changed and I don't want those to get lost with lots of input change.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Think I've fixed the confusing cases of dodgy predication happening, when the vctp needs to be live in an exit block.
That's good amount of red/deletions!
Read this for the first time, and looks very reasonable. I have one question inline for now while I go over this again.
llvm/include/llvm/CodeGen/ReachingDefAnalysis.h | ||
---|---|---|
208 | nit: Uses -> Defs? | |
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | ||
643 | Is this the only instruction that could zero initialise that def? | |
656 | nit: it's -> its |
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | ||
---|---|---|
643 | It's the only way that I saw, but there's probably more. It's the common and easy case to catch though. |
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | ||
---|---|---|
643 | ah, because how we use IsZeroInit, we are on the safe side here, right? I missed that earlier. |
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | ||
---|---|---|
643 | I don't think that's something I've seen, I guess that a move immediate is the obvious pattern to match in isel. |
nit: Uses -> Defs?