These nodes should saturate to their saturating VT. We can use this
information to know the bits past the VT are all zeros or all sign bits.
I think we might only have test coverage for the unsigned case. I'll
verify and add tests.
Paths
| Differential D116870
[SelectionDAG] Add FP_TO_UINT_SAT/FP_TO_SINT_SAT to computeKnownBits/computeNumSignBits. ClosedPublic Authored by craig.topper on Jan 8 2022, 1:34 PM.
Details Summary These nodes should saturate to their saturating VT. We can use this I think we might only have test coverage for the unsigned case. I'll
Diff Detail
Event TimelineHerald added subscribers: foad, ecnelises, dmgreen, hiraditya. · View Herald TranscriptJan 8 2022, 1:34 PM Herald added subscribers: frasercrmck, luismarques, apazos and 19 others. · View Herald TranscriptJan 8 2022, 2:03 PM This revision is now accepted and ready to land.Jan 9 2022, 12:54 AM
Closed by commit rGa500f7f48fdb: [SelectionDAG] Add FP_TO_UINT_SAT/FP_TO_SINT_SAT to… (authored by craig.topper). · Explain WhyJan 9 2022, 5:48 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 398475 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/AArch64/fcvt_combine.ll
llvm/test/CodeGen/AArch64/fptoui-sat-scalar.ll
llvm/test/CodeGen/RISCV/double-convert.ll
llvm/test/CodeGen/RISCV/float-convert.ll
llvm/test/CodeGen/RISCV/half-convert.ll
llvm/test/CodeGen/Thumb2/mve-fptoui-sat-vector.ll
llvm/test/CodeGen/Thumb2/mve-vcvt-float-to-fixed.ll
|
"UINT"