forked from OSchip/llvm-project
[AArch64] Use the source location of the IR branch when creating Bcc
from a conditional branch fed by an add/sub/mul-with-overflow node. We previously used the SDLoc of the overflow node, for no good reason. In some cases, this led to the Bcc and B terminators having different source orders, and DBG_VALUEs being inserted between them. The real issue is with the code that can't handle DBG_VALUEs between terminators: the few places affected by this will be fixed soon. In the meantime, fixing the SDLoc is a positive change no matter what. No tests, as I have no idea how to get .loc emitted for branches? rdar://19347133 llvm-svn: 228463
This commit is contained in:
parent
76cb85a6c7
commit
df956a2e78
|
@ -3263,8 +3263,8 @@ SDValue AArch64TargetLowering::LowerBR_CC(SDValue Op, SelectionDAG &DAG) const {
|
||||||
OFCC = getInvertedCondCode(OFCC);
|
OFCC = getInvertedCondCode(OFCC);
|
||||||
SDValue CCVal = DAG.getConstant(OFCC, MVT::i32);
|
SDValue CCVal = DAG.getConstant(OFCC, MVT::i32);
|
||||||
|
|
||||||
return DAG.getNode(AArch64ISD::BRCOND, SDLoc(LHS), MVT::Other, Chain, Dest,
|
return DAG.getNode(AArch64ISD::BRCOND, dl, MVT::Other, Chain, Dest, CCVal,
|
||||||
CCVal, Overflow);
|
Overflow);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LHS.getValueType().isInteger()) {
|
if (LHS.getValueType().isInteger()) {
|
||||||
|
|
Loading…
Reference in New Issue