mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
Propagate debug loc info in SimplifyBinOpWithSameOpcodeHands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63411 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae6ab1e950
commit
b74c8675b1
@ -1731,11 +1731,11 @@ SDValue DAGCombiner::SimplifyBinOpWithSameOpcodeHands(SDNode *N) {
|
||||
if ((N0.getOpcode() == ISD::ZERO_EXTEND || N0.getOpcode() == ISD::ANY_EXTEND||
|
||||
N0.getOpcode() == ISD::SIGN_EXTEND || N0.getOpcode() == ISD::TRUNCATE) &&
|
||||
N0.getOperand(0).getValueType() == N1.getOperand(0).getValueType()) {
|
||||
SDValue ORNode = DAG.getNode(N->getOpcode(),
|
||||
N0.getOperand(0).getValueType(),
|
||||
N0.getOperand(0), N1.getOperand(0));
|
||||
SDValue ORNode = DAG.getNode(N->getOpcode(), N0.getDebugLoc(),
|
||||
N0.getOperand(0).getValueType(),
|
||||
N0.getOperand(0), N1.getOperand(0));
|
||||
AddToWorkList(ORNode.getNode());
|
||||
return DAG.getNode(N0.getOpcode(), VT, ORNode);
|
||||
return DAG.getNode(N0.getOpcode(), N->getDebugLoc(), VT, ORNode);
|
||||
}
|
||||
|
||||
// For each of OP in SHL/SRL/SRA/AND...
|
||||
@ -1745,11 +1745,12 @@ SDValue DAGCombiner::SimplifyBinOpWithSameOpcodeHands(SDNode *N) {
|
||||
if ((N0.getOpcode() == ISD::SHL || N0.getOpcode() == ISD::SRL ||
|
||||
N0.getOpcode() == ISD::SRA || N0.getOpcode() == ISD::AND) &&
|
||||
N0.getOperand(1) == N1.getOperand(1)) {
|
||||
SDValue ORNode = DAG.getNode(N->getOpcode(),
|
||||
N0.getOperand(0).getValueType(),
|
||||
N0.getOperand(0), N1.getOperand(0));
|
||||
SDValue ORNode = DAG.getNode(N->getOpcode(), N0.getDebugLoc(),
|
||||
N0.getOperand(0).getValueType(),
|
||||
N0.getOperand(0), N1.getOperand(0));
|
||||
AddToWorkList(ORNode.getNode());
|
||||
return DAG.getNode(N0.getOpcode(), VT, ORNode, N0.getOperand(1));
|
||||
return DAG.getNode(N0.getOpcode(), N->getDebugLoc(), VT,
|
||||
ORNode, N0.getOperand(1));
|
||||
}
|
||||
|
||||
return SDValue();
|
||||
|
Loading…
x
Reference in New Issue
Block a user