Improve the lowering of scalar fptosi.sat and fptoui.sat for saturating widths smaller than legal types by using the fact that the legal type will saturate under aarch64, and saturating the result further using min/max.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
3491 | I may be misunderstanding the logic here, but the comment says the saturation to a higher bitwidth and consequent saturation of the result is only valid if the legal conversion is smaller than the saturation width, but with this if statement you're bailing out if the dstwidth is less than the saturation width. |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
3491 | The comment should be the other way around. We use the natural saturation to the legal width, then saturate it further. |
I may be misunderstanding the logic here, but the comment says the saturation to a higher bitwidth and consequent saturation of the result is only valid if the legal conversion is smaller than the saturation width, but with this if statement you're bailing out if the dstwidth is less than the saturation width.