mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Only do FNEG xform when the vector type is a floating point type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37818 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
96734d741f
commit
c45453fa1d
@ -1798,6 +1798,7 @@ void SelectionDAGLowering::visitSub(User &I) {
|
||||
if (ConstantVector *CV = dyn_cast<ConstantVector>(I.getOperand(0))) {
|
||||
const VectorType *DestTy = cast<VectorType>(I.getType());
|
||||
const Type *ElTy = DestTy->getElementType();
|
||||
if (ElTy->isFloatingPoint()) {
|
||||
unsigned VL = DestTy->getNumElements();
|
||||
std::vector<Constant*> NZ(VL, ConstantFP::get(ElTy, -0.0));
|
||||
Constant *CNZ = ConstantVector::get(&NZ[0], NZ.size());
|
||||
@ -1808,6 +1809,7 @@ void SelectionDAGLowering::visitSub(User &I) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Ty->isFloatingPoint()) {
|
||||
if (ConstantFP *CFP = dyn_cast<ConstantFP>(I.getOperand(0)))
|
||||
if (CFP->isExactlyValue(-0.0)) {
|
||||
|
Loading…
Reference in New Issue
Block a user