mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Move ConstantFP construction back to the 2.5-ish API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2148,8 +2148,7 @@ void SelectionDAGLowering::visitFSub(User &I) {
|
||||
const VectorType *DestTy = cast<VectorType>(I.getType());
|
||||
const Type *ElTy = DestTy->getElementType();
|
||||
unsigned VL = DestTy->getNumElements();
|
||||
std::vector<Constant*> NZ(VL,
|
||||
DAG.getContext()->getConstantFPNegativeZero(ElTy));
|
||||
std::vector<Constant*> NZ(VL, ConstantFP::getNegativeZero(ElTy));
|
||||
Constant *CNZ = DAG.getContext()->getConstantVector(&NZ[0], NZ.size());
|
||||
if (CV == CNZ) {
|
||||
SDValue Op2 = getValue(I.getOperand(1));
|
||||
@@ -2160,8 +2159,7 @@ void SelectionDAGLowering::visitFSub(User &I) {
|
||||
}
|
||||
}
|
||||
if (ConstantFP *CFP = dyn_cast<ConstantFP>(I.getOperand(0)))
|
||||
if (CFP->isExactlyValue(
|
||||
DAG.getContext()->getConstantFPNegativeZero(Ty)->getValueAPF())) {
|
||||
if (CFP->isExactlyValue(ConstantFP::getNegativeZero(Ty)->getValueAPF())) {
|
||||
SDValue Op2 = getValue(I.getOperand(1));
|
||||
setValue(&I, DAG.getNode(ISD::FNEG, getCurDebugLoc(),
|
||||
Op2.getValueType(), Op2));
|
||||
|
Reference in New Issue
Block a user