Use SDValue bool check to tidyup some possible combines. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Simon Pilgrim 2015-03-07 16:34:55 +00:00
parent b36506466f
commit 62ffaaac7c

View File

@ -11328,12 +11328,10 @@ SDValue DAGCombiner::visitBUILD_VECTOR(SDNode *N) {
if (ISD::allOperandsUndef(N))
return DAG.getUNDEF(VT);
SDValue V = reduceBuildVecExtToExtBuildVec(N);
if (V.getNode())
if (SDValue V = reduceBuildVecExtToExtBuildVec(N))
return V;
V = reduceBuildVecConvertToConvertBuildVec(N);
if (V.getNode())
if (SDValue V = reduceBuildVecConvertToConvertBuildVec(N))
return V;
// Check to see if this is a BUILD_VECTOR of a bunch of EXTRACT_VECTOR_ELT
@ -12305,8 +12303,9 @@ SDValue DAGCombiner::SimplifyVBinOp(SDNode *N) {
SDValue LHS = N->getOperand(0);
SDValue RHS = N->getOperand(1);
SDValue Shuffle = XformToShuffleWithZero(N);
if (Shuffle.getNode()) return Shuffle;
if (SDValue Shuffle = XformToShuffleWithZero(N))
return Shuffle;
// If the LHS and RHS are BUILD_VECTOR nodes, see if we can constant fold
// this operation.