summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorAmaury Sechet <deadalnix@gmail.com>2018-05-07 01:43:42 +0000
committerAmaury Sechet <deadalnix@gmail.com>2018-05-07 01:43:42 +0000
commitf91b6a8cf77658f1f096b40be1953e9ccd5425e3 (patch)
tree597a306dccb37b397e261c1261c6502a5fa2d2ec /llvm/lib/Target
parent7413b322ea70ca818979d4dbe7658615b776abd8 (diff)
downloadbcm5719-llvm-f91b6a8cf77658f1f096b40be1953e9ccd5425e3.tar.gz
bcm5719-llvm-f91b6a8cf77658f1f096b40be1953e9ccd5425e3.zip
[ARM] Select result 1 from ConvertBooleanCarryToCarryFlag's result automatically. NFC
The old behavior return the value 0, which is error prone. llvm-svn: 331614
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 96fd214f6ea..7cd6e011beb 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -4063,8 +4063,10 @@ static SDValue ConvertBooleanCarryToCarryFlag(SDValue BoolCarry,
// This converts the boolean value carry into the carry flag by doing
// ARMISD::SUBC Carry, 1
- return DAG.getNode(ARMISD::SUBC, DL, DAG.getVTList(CarryVT, MVT::i32),
- BoolCarry, DAG.getConstant(1, DL, CarryVT));
+ SDValue Carry = DAG.getNode(ARMISD::SUBC, DL,
+ DAG.getVTList(CarryVT, MVT::i32),
+ BoolCarry, DAG.getConstant(1, DL, CarryVT));
+ return Carry.getValue(1);
}
static SDValue ConvertCarryFlagToBooleanCarry(SDValue Flags, EVT VT,
@@ -7762,7 +7764,7 @@ static SDValue LowerADDSUBCARRY(SDValue Op, SelectionDAG &DAG) {
// Do the addition proper using the carry flag we wanted.
Result = DAG.getNode(ARMISD::ADDE, DL, VTs, Op.getOperand(0),
- Op.getOperand(1), Carry.getValue(1));
+ Op.getOperand(1), Carry);
// Now convert the carry flag into a boolean value.
Carry = ConvertCarryFlagToBooleanCarry(Result.getValue(1), VT, DAG);
@@ -7776,7 +7778,7 @@ static SDValue LowerADDSUBCARRY(SDValue Op, SelectionDAG &DAG) {
// Do the subtraction proper using the carry flag we wanted.
Result = DAG.getNode(ARMISD::SUBE, DL, VTs, Op.getOperand(0),
- Op.getOperand(1), Carry.getValue(1));
+ Op.getOperand(1), Carry);
// Now convert the carry flag into a boolean value.
Carry = ConvertCarryFlagToBooleanCarry(Result.getValue(1), VT, DAG);
OpenPOWER on IntegriCloud