This patch stops the sadd_sat and uadd_sat intrinsics from blocking tail predication.
Details
Diff Detail
Event Timeline
llvm/lib/Target/ARM/MVETailPredication.cpp | ||
---|---|---|
355–356 | Do we expect more intrinsics to be allowed after these 2? For example, if we allow sadd, can we allow ssub too? And then while we are add it, add the ssubs too? |
llvm/lib/Target/ARM/MVETailPredication.cpp | ||
---|---|---|
355–356 | Can you give this a clang-format? The line is a bit long. We might end up with quite a few of these too. It might make sense to add a switch on Int->getIntrinsicID() once this gets large enough. | |
llvm/test/CodeGen/Thumb2/LowOverheadLoops/tail-pred-intrinsic-uadd.ll | ||
3 ↗ | (On Diff #272696) | You can remove dso_local and local_unnamed_addr. I would also make the two tests one file to keep them together, but up to you if you want to keep them separate. |
llvm/lib/Target/ARM/MVETailPredication.cpp | ||
---|---|---|
355–356 | +1 for switch |
llvm/lib/Target/ARM/MVETailPredication.cpp | ||
---|---|---|
355–356 | I could replace this with a switch statement as suggested. What do you think? | |
355–356 | Agreed. A switch would be much better. | |
llvm/test/CodeGen/Thumb2/LowOverheadLoops/tail-pred-intrinsic-uadd.ll | ||
3 ↗ | (On Diff #272696) | I'll remove ds_local and local_unnamed and merge them +1 |
Do we expect more intrinsics to be allowed after these 2? For example, if we allow sadd, can we allow ssub too? And then while we are add it, add the ssubs too?
If we expect more intrinsics here, probably better to create an "AllowList" for intrinsics somewhere, and do a look-up here?