llvm.org GIT mirror llvm / b79855e
Revert r154397, which was causing make check failures on the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154414 91177308-0d34-0410-b5e6-96231b3b80d8 Owen Anderson 8 years ago
1 changed file(s) with 6 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
43534353 // Only do this before legalize for now.
43544354 if (VT.isVector() && !LegalOperations) {
43554355 EVT N0VT = N0.getOperand(0).getValueType();
4356 // On some architectures (such as SSE/NEON/etc)the SETCC result type is
4357 // of the same size as the compared operands. Only optimize sext(setcc())
4358 // if this is the case.
4359 EVT SVT = TLI.getSetCCResultType(N0VT);
4360
43614356 // We know that the # elements of the results is the same as the
43624357 // # elements of the compare (and the # elements of the compare result
43634358 // for that matter). Check to see that they are the same size. If so,
43644359 // we know that the element size of the sext'd result matches the
43654360 // element size of the compare operands.
4366 if (VT.getSizeInBits() == SVT.getSizeInBits())
4361 if (VT.getSizeInBits() == N0VT.getSizeInBits())
43674362 return DAG.getSetCC(N->getDebugLoc(), VT, N0.getOperand(0),
43684363 N0.getOperand(1),
43694364 cast(N0.getOperand(2))->get());
43774372 EVT MatchingVectorType =
43784373 EVT::getVectorVT(*DAG.getContext(), MatchingElementType,
43794374 N0VT.getVectorNumElements());
4380
4381 if (SVT == MatchingVectorType) {
4382 SDValue VsetCC = DAG.getSetCC(N->getDebugLoc(), MatchingVectorType,
4383 N0.getOperand(0), N0.getOperand(1),
4384 cast(N0.getOperand(2))->get());
4385 return DAG.getSExtOrTrunc(VsetCC, N->getDebugLoc(), VT);
4386 }
4375 SDValue VsetCC =
4376 DAG.getSetCC(N->getDebugLoc(), MatchingVectorType, N0.getOperand(0),
4377 N0.getOperand(1),
4378 cast(N0.getOperand(2))->get());
4379 return DAG.getSExtOrTrunc(VsetCC, N->getDebugLoc(), VT);
43874380 }
43884381 }
43894382