File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
test/Transforms/SLPVectorizer/AArch64 Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -6934,8 +6934,10 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
6934
6934
auto *VecTy = FixedVectorType::get(VL.front()->getType(), VL.size());
6935
6935
// If the resulting type is scalarized, do not adjust the cost.
6936
6936
unsigned VecNumParts = TTI.getNumberOfParts(VecTy);
6937
- if (VecNumParts == VecTy->getNumElements())
6937
+ if (VecNumParts == VecTy->getNumElements()) {
6938
+ InVectors.assign(1, Constant::getNullValue(VecTy));
6938
6939
return nullptr;
6940
+ }
6939
6941
DenseMap<Value *, int> ExtractVectorsTys;
6940
6942
SmallPtrSet<Value *, 4> CheckedExtracts;
6941
6943
for (auto [I, V] : enumerate(VL)) {
Original file line number Diff line number Diff line change
1
+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2
+ ; RUN: opt -S -passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s
3
+
4
+ define i1 @test () {
5
+ ; CHECK-LABEL: define i1 @test() {
6
+ ; CHECK-NEXT: entry:
7
+ ; CHECK-NEXT: [[TMP0:%.*]] = freeze <4 x i1> zeroinitializer
8
+ ; CHECK-NEXT: [[TMP1:%.*]] = call i1 @llvm.vector.reduce.and.v4i1(<4 x i1> [[TMP0]])
9
+ ; CHECK-NEXT: ret i1 [[TMP1]]
10
+ ;
11
+ entry:
12
+ %0 = extractelement <4 x fp128 > zeroinitializer , i32 0
13
+ %cmp = fcmp ogt fp128 %0 , 0xL00000000000000000000000000000000
14
+ %cmp3 = fcmp olt fp128 %0 , 0xL00000000000000000000000000000000
15
+ %or.cond = and i1 %cmp , %cmp3
16
+ %1 = extractelement <4 x fp128 > zeroinitializer , i32 0
17
+ %cmp6 = fcmp ogt fp128 %1 , 0xL00000000000000000000000000000000
18
+ %or.cond29 = select i1 %or.cond , i1 %cmp6 , i1 false
19
+ %cmp10 = fcmp olt fp128 %1 , 0xL00000000000000000000000000000000
20
+ %or.cond30 = select i1 %or.cond29 , i1 %cmp10 , i1 false
21
+ ret i1 %or.cond30
22
+ }
You can’t perform that action at this time.
0 commit comments