llvm.org GIT mirror llvm / 1840112
[DAGCombine] Bail out if can't create a vector with at least two elements Summary: Fixes pr32278 Reviewers: igorb, craig.topper, RKSimon, spatel, hfinkel Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30978 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297878 91177308-0d34-0410-b5e6-96231b3b80d8 Zvi Rackover 3 years ago
2 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1409714097 if (!SclTy.isFloatingPoint() && !SclTy.isInteger())
1409814098 return SDValue();
1409914099
14100 EVT NVT = EVT::getVectorVT(*DAG.getContext(), SclTy,
14101 VT.getSizeInBits() / SclTy.getSizeInBits());
14100 unsigned VNTNumElms = VT.getSizeInBits() / SclTy.getSizeInBits();
14101 if (VNTNumElms < 2)
14102 return SDValue();
14103
14104 EVT NVT = EVT::getVectorVT(*DAG.getContext(), SclTy, VNTNumElms);
1410214105 if (!TLI.isTypeLegal(NVT) || !TLI.isTypeLegal(Scalar.getValueType()))
1410314106 return SDValue();
1410414107
0 ; PR32278
1 ; XFAIL: *
2 ; REQUIRES: asserts
31
42 ; RUN: llc < %s
53