Implement lower of unsigned saturation on an interval [0, k] where k + 1 is a power of two using USAT instruction in a similar way to how [~k, k] is lowered using SSAT on ARM models that supports it.
Patch by Marten Svanfeldt
Paths
| Differential D41348
[ARM] Lower unsigned saturation to USAT ClosedPublic Authored by thebolt on Dec 18 2017, 4:49 AM.
Details Summary Implement lower of unsigned saturation on an interval [0, k] where k + 1 is a power of two using USAT instruction in a similar way to how [~k, k] is lowered using SSAT on ARM models that supports it. Patch by Marten Svanfeldt
Diff Detail Event TimelineHerald added subscribers: kristof.beyls, javed.absar, aemerson. · View Herald TranscriptDec 18 2017, 4:49 AM Comment Actions Thanks for the patch! Please upload a diff with more context: http://llvm.org/docs/Phabricator.html#id3 as this makes it easier to have a look at the code around your changes.
Comment Actions Updated based on review. Comment Actions I've updated the diff based on the comments, also regenerated the diff with more context as per the instructions on llvm site. Comment Actions Thanks, this looks good to me, with the test extension. A nice extension to the SSAT case! Adding a couple of additional Arm people, to have a quick look.
This revision is now accepted and ready to land.Dec 19 2017, 6:49 AM
Revision Contents
Diff 127343 lib/Target/ARM/ARMISelLowering.h
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td
test/CodeGen/ARM/usat.ll
|
left over debug output