diff options
| author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-02-09 22:54:12 +0000 |
|---|---|---|
| committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-02-09 22:54:12 +0000 |
| commit | f8dfb47c02c2b81c3391a5572c612430a97563f6 (patch) | |
| tree | a790e787c3f7ca8a6fa31098dac763ae4adf59b4 /llvm/lib/Target/AArch64 | |
| parent | 244cd98474f17a56bad2699352b56de579a1e104 (diff) | |
| download | bcm5719-llvm-f8dfb47c02c2b81c3391a5572c612430a97563f6.tar.gz bcm5719-llvm-f8dfb47c02c2b81c3391a5572c612430a97563f6.zip | |
[CodeGen] Prefer "if (SDValue R = ...)" to "if (R.getNode())". NFCI.
llvm-svn: 260316
Diffstat (limited to 'llvm/lib/Target/AArch64')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index 2be5f3c4a64..8ed192aa047 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -5679,8 +5679,7 @@ SDValue AArch64TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, return DAG.getNode(Opc, dl, V1.getValueType(), V1, V1); } - SDValue Concat = tryFormConcatFromShuffle(Op, DAG); - if (Concat.getNode()) + if (SDValue Concat = tryFormConcatFromShuffle(Op, DAG)) return Concat; bool DstIsLeft; @@ -5952,8 +5951,7 @@ SDValue AArch64TargetLowering::LowerVectorOR(SDValue Op, SelectionDAG &DAG) const { // Attempt to form a vector S[LR]I from (or (and X, C1), (lsl Y, C2)) if (EnableAArch64SlrGeneration) { - SDValue Res = tryLowerToSLI(Op.getNode(), DAG); - if (Res.getNode()) + if (SDValue Res = tryLowerToSLI(Op.getNode(), DAG)) return Res; } @@ -7908,12 +7906,10 @@ static SDValue performORCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI, if (!DAG.getTargetLoweringInfo().isTypeLegal(VT)) return SDValue(); - SDValue Res = tryCombineToEXTR(N, DCI); - if (Res.getNode()) + if (SDValue Res = tryCombineToEXTR(N, DCI)) return Res; - Res = tryCombineToBSL(N, DCI); - if (Res.getNode()) + if (SDValue Res = tryCombineToBSL(N, DCI)) return Res; return SDValue(); @@ -8873,8 +8869,7 @@ static SDValue performSTORECombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI, SelectionDAG &DAG, const AArch64Subtarget *Subtarget) { - SDValue Split = split16BStores(N, DCI, DAG, Subtarget); - if (Split.getNode()) + if (SDValue Split = split16BStores(N, DCI, DAG, Subtarget)) return Split; if (Subtarget->supportsAddressTopByteIgnored() && @@ -9540,8 +9535,7 @@ SDValue performCONDCombine(SDNode *N, static SDValue performBRCONDCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI, SelectionDAG &DAG) { - SDValue NV = performCONDCombine(N, DCI, DAG, 2, 3); - if (NV.getNode()) + if (SDValue NV = performCONDCombine(N, DCI, DAG, 2, 3)) N = NV.getNode(); SDValue Chain = N->getOperand(0); SDValue Dest = N->getOperand(1); |

