[llvm] [LegalizeTypes] Use APInt::extractBits instead of getRawData. NFC (PR #103607)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 13 22:25:06 PDT 2024
================
@@ -1494,8 +1494,8 @@ void DAGTypeLegalizer::ExpandFloatRes_ConstantFP(SDNode *N, SDValue &Lo,
APInt C = cast<ConstantFPSDNode>(N)->getValueAPF().bitcastToAPInt();
SDLoc dl(N);
const fltSemantics &Sem = NVT.getFltSemantics();
- Lo = DAG.getConstantFP(APFloat(Sem, APInt(64, C.getRawData()[1])), dl, NVT);
- Hi = DAG.getConstantFP(APFloat(Sem, APInt(64, C.getRawData()[0])), dl, NVT);
+ Lo = DAG.getConstantFP(APFloat(Sem, C.extractBits(64, 64)), dl, NVT);
+ Hi = DAG.getConstantFP(APFloat(Sem, C.extractBits(64, 0)), dl, NVT);
----------------
s-barannikov wrote:
FWIW there are DoubleAPFloat::getFirst()/getSecond(). Not sure if they can be used here.
https://github.com/llvm/llvm-project/pull/103607
More information about the llvm-commits
mailing list