mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 05:31:51 +00:00
Replace redundant code
Use EVT::changeExtendedVectorElementTypeToInteger instead of doing the same thing that it does git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182165 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
63f3ca5da7
commit
9aa8fdfddb
@ -4519,16 +4519,11 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
|
|||||||
return DAG.getSetCC(N->getDebugLoc(), VT, N0.getOperand(0),
|
return DAG.getSetCC(N->getDebugLoc(), VT, N0.getOperand(0),
|
||||||
N0.getOperand(1),
|
N0.getOperand(1),
|
||||||
cast<CondCodeSDNode>(N0.getOperand(2))->get());
|
cast<CondCodeSDNode>(N0.getOperand(2))->get());
|
||||||
|
|
||||||
// If the desired elements are smaller or larger than the source
|
// If the desired elements are smaller or larger than the source
|
||||||
// elements we can use a matching integer vector type and then
|
// elements we can use a matching integer vector type and then
|
||||||
// truncate/sign extend
|
// truncate/sign extend
|
||||||
EVT MatchingElementType =
|
EVT MatchingVectorType = N0VT.changeVectorElementTypeToInteger();
|
||||||
EVT::getIntegerVT(*DAG.getContext(),
|
|
||||||
N0VT.getScalarType().getSizeInBits());
|
|
||||||
EVT MatchingVectorType =
|
|
||||||
EVT::getVectorVT(*DAG.getContext(), MatchingElementType,
|
|
||||||
N0VT.getVectorNumElements());
|
|
||||||
|
|
||||||
if (SVT == MatchingVectorType) {
|
if (SVT == MatchingVectorType) {
|
||||||
SDValue VsetCC = DAG.getSetCC(N->getDebugLoc(), MatchingVectorType,
|
SDValue VsetCC = DAG.getSetCC(N->getDebugLoc(), MatchingVectorType,
|
||||||
N0.getOperand(0), N0.getOperand(1),
|
N0.getOperand(0), N0.getOperand(1),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user