1. [LegalizeTypes] Merge ExpandIntRes_LLROUND and ExpandIntRes_LLRINT into (details)
  2. [LegalizeTypes] Remove PromoteFloat support form (details)
  3. [LegalizeTypes] When expanding the integer result of LLROUND/LLRINT, (details)
Commit d4ba11ae3261bb0dc805d33fbe15e9591e926a33 by craig.topper
[LegalizeTypes] Merge ExpandIntRes_LLROUND and ExpandIntRes_LLRINT into
one function that handles both. NFC
These too functions are were the same except for which libcall gets
emitted. Just merge them into one.
This is prep work for some other work including strict fp support.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
Commit 9b515b6dd919cbd67ba12c01530708c5617e288f by craig.topper
[LegalizeTypes] Remove PromoteFloat support form
This code isn't exercised, and was in the wrong place. If we need this,
we would need to promote the type before figuring out which libcall to
I'm choosing to remove it rather than fixing since we don't support
PromoteFloat for LRINT/LROUND/LLRINT/LLROUND when the result type is
legal so I don't see much reason to support it for the case where the
result type isn't legal.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Commit 1b0efe2b1778e821aade88667b1cb82d1c93f7e9 by craig.topper
[LegalizeTypes] When expanding the integer result of LLROUND/LLRINT,
also call GetSoftenedFloat if the floating point input needs to be
Before this we were emitting a bitcast to integer from the lowering code
that itself will need to be legalized. By calling GetSoftenedFloat we
get the integer conversion in one step without needing to relegalize a
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp