File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
test/Transforms/SLPVectorizer Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -10023,7 +10023,7 @@ void BoUpSLP::transformNodes() {
10023
10023
10024
10024
if (LoadEntriesToVectorize.empty()) {
10025
10025
// Single load node - exit.
10026
- if (VectorizableTree.size() <= 1 &&
10026
+ if (VectorizableTree.size() <= 1 && VectorizableTree.front()->hasState() &&
10027
10027
VectorizableTree.front()->getOpcode() == Instruction::Load)
10028
10028
return;
10029
10029
// Small graph with small VF - exit.
@@ -18141,8 +18141,9 @@ static RecurKind getRdxKind(Value *V);
18141
18141
void BoUpSLP::computeMinimumValueSizes() {
18142
18142
// We only attempt to truncate integer expressions.
18143
18143
bool IsStoreOrInsertElt =
18144
- VectorizableTree.front()->getOpcode() == Instruction::Store ||
18145
- VectorizableTree.front()->getOpcode() == Instruction::InsertElement;
18144
+ VectorizableTree.front()->hasState() &&
18145
+ (VectorizableTree.front()->getOpcode() == Instruction::Store ||
18146
+ VectorizableTree.front()->getOpcode() == Instruction::InsertElement);
18146
18147
if ((IsStoreOrInsertElt || UserIgnoreList) &&
18147
18148
ExtraBitWidthNodes.size() <= 1 &&
18148
18149
(!CastMaxMinBWSizes || CastMaxMinBWSizes->second == 0 ||
Original file line number Diff line number Diff line change 2
2
; RUN: opt -passes=slp-vectorizer -S %s | FileCheck %s
3
3
4
4
define i32 @test (i32 %minlib ) {
5
+ ; CHECK-LABEL: @test(
6
+ ; CHECK-NEXT: entry:
7
+ ; CHECK-NEXT: [[MUL2_I306:%.*]] = mul i32 [[MINLIB:%.*]], [[MINLIB]]
8
+ ; CHECK-NEXT: [[MUL3_I307:%.*]] = mul i32 [[MUL2_I306]], [[MINLIB]]
9
+ ; CHECK-NEXT: [[CMP183:%.*]] = icmp sgt i32 [[MUL3_I307]], 0
10
+ ; CHECK-NEXT: ret i32 0
11
+ ;
5
12
entry:
6
13
%mul2.i306 = mul i32 %minlib , %minlib
7
14
%mul3.i307 = mul i32 %mul2.i306 , %minlib
You can’t perform that action at this time.
0 commit comments