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/SystemZ | |
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/SystemZ')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZISelLowering.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp index b0a61276463..4140be7bad0 100644 --- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -4120,8 +4120,7 @@ SDValue SystemZTargetLowering::lowerBUILD_VECTOR(SDValue Op, } // See if we should use shuffles to construct the vector from other vectors. - SDValue Res = tryBuildVectorShuffle(DAG, BVN); - if (Res.getNode()) + if (SDValue Res = tryBuildVectorShuffle(DAG, BVN)) return Res; // Detect SCALAR_TO_VECTOR conversions. @@ -4745,9 +4744,8 @@ SDValue SystemZTargetLowering::PerformDAGCombine(SDNode *N, auto *SN = cast<StoreSDNode>(N); EVT MemVT = SN->getMemoryVT(); if (MemVT.isInteger()) { - SDValue Value = combineTruncateExtract(SDLoc(N), MemVT, - SN->getValue(), DCI); - if (Value.getNode()) { + if (SDValue Value = + combineTruncateExtract(SDLoc(N), MemVT, SN->getValue(), DCI)) { DCI.AddToWorklist(Value.getNode()); // Rewrite the store with the new form of stored value. |