mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
move fold comments to the corresponding fold; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228317 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d547b618c
commit
bf9263158f
@ -25449,11 +25449,13 @@ static SDValue PerformFSUBCombine(SDNode *N, SelectionDAG &DAG,
|
||||
/// Do target-specific dag combines on X86ISD::FOR and X86ISD::FXOR nodes.
|
||||
static SDValue PerformFORCombine(SDNode *N, SelectionDAG &DAG) {
|
||||
assert(N->getOpcode() == X86ISD::FOR || N->getOpcode() == X86ISD::FXOR);
|
||||
|
||||
// F[X]OR(0.0, x) -> x
|
||||
// F[X]OR(x, 0.0) -> x
|
||||
if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(N->getOperand(0)))
|
||||
if (C->getValueAPF().isPosZero())
|
||||
return N->getOperand(1);
|
||||
|
||||
// F[X]OR(x, 0.0) -> x
|
||||
if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(N->getOperand(1)))
|
||||
if (C->getValueAPF().isPosZero())
|
||||
return N->getOperand(0);
|
||||
@ -25484,26 +25486,30 @@ static SDValue PerformFMinFMaxCombine(SDNode *N, SelectionDAG &DAG) {
|
||||
/// Do target-specific dag combines on X86ISD::FAND nodes.
|
||||
static SDValue PerformFANDCombine(SDNode *N, SelectionDAG &DAG) {
|
||||
// FAND(0.0, x) -> 0.0
|
||||
// FAND(x, 0.0) -> 0.0
|
||||
if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(N->getOperand(0)))
|
||||
if (C->getValueAPF().isPosZero())
|
||||
return N->getOperand(0);
|
||||
|
||||
// FAND(x, 0.0) -> 0.0
|
||||
if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(N->getOperand(1)))
|
||||
if (C->getValueAPF().isPosZero())
|
||||
return N->getOperand(1);
|
||||
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
/// Do target-specific dag combines on X86ISD::FANDN nodes
|
||||
static SDValue PerformFANDNCombine(SDNode *N, SelectionDAG &DAG) {
|
||||
// FANDN(x, 0.0) -> 0.0
|
||||
// FANDN(0.0, x) -> x
|
||||
if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(N->getOperand(0)))
|
||||
if (C->getValueAPF().isPosZero())
|
||||
return N->getOperand(1);
|
||||
|
||||
// FANDN(x, 0.0) -> 0.0
|
||||
if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(N->getOperand(1)))
|
||||
if (C->getValueAPF().isPosZero())
|
||||
return N->getOperand(1);
|
||||
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user