mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Vector fneg must be expanded into fsub -0.0, X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40586 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -259,6 +259,7 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
|
||||
setOperationAction(ISD::UDIV, (MVT::ValueType)VT, Expand);
|
||||
setOperationAction(ISD::UREM, (MVT::ValueType)VT, Expand);
|
||||
setOperationAction(ISD::FDIV, (MVT::ValueType)VT, Expand);
|
||||
setOperationAction(ISD::FNEG, (MVT::ValueType)VT, Expand);
|
||||
setOperationAction(ISD::EXTRACT_VECTOR_ELT, (MVT::ValueType)VT, Expand);
|
||||
setOperationAction(ISD::INSERT_VECTOR_ELT, (MVT::ValueType)VT, Expand);
|
||||
setOperationAction(ISD::BUILD_VECTOR, (MVT::ValueType)VT, Expand);
|
||||
@@ -523,6 +524,16 @@ bool PPC::isSplatShuffleMask(SDNode *N, unsigned EltSize) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/// isAllNegativeZeroVector - Returns true if all elements of build_vector
|
||||
/// are -0.0.
|
||||
bool PPC::isAllNegativeZeroVector(SDNode *N) {
|
||||
assert(N->getOpcode() == ISD::BUILD_VECTOR);
|
||||
if (PPC::isSplatShuffleMask(N, N->getNumOperands()))
|
||||
if (ConstantFPSDNode *CFP = dyn_cast<ConstantFPSDNode>(N))
|
||||
return CFP->isExactlyValue(-0.0);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// getVSPLTImmediate - Return the appropriate VSPLT* immediate to splat the
|
||||
/// specified isSplatShuffleMask VECTOR_SHUFFLE mask.
|
||||
unsigned PPC::getVSPLTImmediate(SDNode *N, unsigned EltSize) {
|
||||
|
||||
Reference in New Issue
Block a user