mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-22 02:05:01 +00:00
DAGCombiner: Move variable declaration closer to definiion; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230353 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ba150ed636
commit
5f146de042
@ -2688,7 +2688,6 @@ SDValue DAGCombiner::SimplifyBinOpWithSameOpcodeHands(SDNode *N) {
|
||||
SDValue DAGCombiner::visitAND(SDNode *N) {
|
||||
SDValue N0 = N->getOperand(0);
|
||||
SDValue N1 = N->getOperand(1);
|
||||
SDValue LL, LR, RL, RR, CC0, CC1;
|
||||
ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0);
|
||||
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
|
||||
EVT VT = N1.getValueType();
|
||||
@ -2865,6 +2864,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
|
||||
}
|
||||
}
|
||||
// fold (and (setcc x), (setcc y)) -> (setcc (and x, y))
|
||||
SDValue LL, LR, RL, RR, CC0, CC1;
|
||||
if (isSetCCEquivalent(N0, LL, LR, CC0) && isSetCCEquivalent(N1, RL, RR, CC1)){
|
||||
ISD::CondCode Op0 = cast<CondCodeSDNode>(CC0)->get();
|
||||
ISD::CondCode Op1 = cast<CondCodeSDNode>(CC1)->get();
|
||||
@ -3341,7 +3341,6 @@ SDValue DAGCombiner::MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1) {
|
||||
SDValue DAGCombiner::visitOR(SDNode *N) {
|
||||
SDValue N0 = N->getOperand(0);
|
||||
SDValue N1 = N->getOperand(1);
|
||||
SDValue LL, LR, RL, RR, CC0, CC1;
|
||||
ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0);
|
||||
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
|
||||
EVT VT = N1.getValueType();
|
||||
@ -3476,6 +3475,7 @@ SDValue DAGCombiner::visitOR(SDNode *N) {
|
||||
}
|
||||
}
|
||||
// fold (or (setcc x), (setcc y)) -> (setcc (or x, y))
|
||||
SDValue LL, LR, RL, RR, CC0, CC1;
|
||||
if (isSetCCEquivalent(N0, LL, LR, CC0) && isSetCCEquivalent(N1, RL, RR, CC1)){
|
||||
ISD::CondCode Op0 = cast<CondCodeSDNode>(CC0)->get();
|
||||
ISD::CondCode Op1 = cast<CondCodeSDNode>(CC1)->get();
|
||||
@ -3828,7 +3828,6 @@ SDNode *DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, SDLoc DL) {
|
||||
SDValue DAGCombiner::visitXOR(SDNode *N) {
|
||||
SDValue N0 = N->getOperand(0);
|
||||
SDValue N1 = N->getOperand(1);
|
||||
SDValue LHS, RHS, CC;
|
||||
ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0);
|
||||
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
|
||||
EVT VT = N0.getValueType();
|
||||
@ -3868,6 +3867,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
|
||||
return RXOR;
|
||||
|
||||
// fold !(x cc y) -> (x !cc y)
|
||||
SDValue LHS, RHS, CC;
|
||||
if (TLI.isConstTrueVal(N1.getNode()) && isSetCCEquivalent(N0, LHS, RHS, CC)) {
|
||||
bool isInt = LHS.getValueType().isInteger();
|
||||
ISD::CondCode NotCC = ISD::getSetCCInverse(cast<CondCodeSDNode>(CC)->get(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user