Skip to content

Commit 137be57

Browse files
committed
Some more minor updates.
1 parent c474e3e commit 137be57

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,9 @@ bool SystemZTTIImpl::hasDivRemOp(Type *DataType, bool IsSigned) {
469469
return (VT.isScalarInteger() && TLI->isTypeLegal(VT));
470470
}
471471

472-
InstructionCost SystemZTTIImpl::
473-
getScalarizationOverhead(VectorType *Ty,
474-
const APInt &DemandedElts,
475-
bool Insert, bool Extract,
476-
TTI::TargetCostKind CostKind) {
472+
InstructionCost SystemZTTIImpl::getScalarizationOverhead(
473+
VectorType *Ty, const APInt &DemandedElts, bool Insert, bool Extract,
474+
TTI::TargetCostKind CostKind) {
477475
unsigned NumElts = cast<FixedVectorType>(Ty)->getNumElements();
478476
InstructionCost Cost = 0;
479477

@@ -491,8 +489,8 @@ getScalarizationOverhead(VectorType *Ty,
491489
Insert = false;
492490
}
493491

494-
Cost += BaseT::getScalarizationOverhead(Ty, DemandedElts, Insert,
495-
Extract, CostKind);
492+
Cost += BaseT::getScalarizationOverhead(Ty, DemandedElts, Insert, Extract,
493+
CostKind);
496494
return Cost;
497495
}
498496

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,8 +3033,8 @@ class BoUpSLP {
30333033
unsigned NumParts, bool ForOrder = false);
30343034

30353035
/// \returns the cost of gathering (inserting) the values in \p VL into a
3036-
/// vector. \param ForPoisonSrc true if initial vector is poison, false
3037-
/// otherwise.
3036+
/// vector.
3037+
/// \param ForPoisonSrc true if initial vector is poison, false otherwise.
30383038
InstructionCost getGatherCost(ArrayRef<Value *> VL, bool ForPoisonSrc,
30393039
Type *ScalarTy) const;
30403040

llvm/test/Transforms/SLPVectorizer/SystemZ/vec-elt-insertion.ll

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
; RUN: opt -S --passes=slp-vectorizer -mtriple=s390x-unknown-linux -mcpu=z16 < %s | FileCheck %s
1+
; RUN: opt < %s -mtriple=s390x-unknown-linux -mcpu=z16 -S -passes=slp-vectorizer \
2+
; RUN: -pass-remarks-output=%t | FileCheck %s
3+
; RUN: cat %t | FileCheck -check-prefix=REMARK %s
24
;
35
; Test functions that (at least currently) only gets vectorized if the
46
; insertion cost for an element load is counted as free.
@@ -9,6 +11,11 @@ define void @fun0(ptr nocapture %0, double %1) {
911
; CHECK-LABEL: define void @fun0(
1012
; CHECK: fmul <2 x double>
1113
; CHECK: call <2 x double> @llvm.fmuladd.v2f64(
14+
;
15+
; REMARK-LABEL: Function: fun0
16+
; REMARK: Args:
17+
; REMARK-NEXT: - String: 'SLP vectorized with cost '
18+
; REMARK-NEXT: - Cost: '-1'
1219

1320
%3 = fmul double %1, 2.000000e+00
1421
%4 = tail call double @llvm.fmuladd.f64(double %3, double %3, double 0.000000e+00)
@@ -36,6 +43,11 @@ define void @fun1(double %0) {
3643
; CHECK: call <2 x double> @llvm.fmuladd.v2f64(
3744
; CHECK: call <2 x double> @llvm.fmuladd.v2f64(
3845
; CHECK: %14 = fcmp olt <2 x double> %13, %2
46+
;
47+
; REMARK-LABEL: Function: fun1
48+
; REMARK: Args:
49+
; REMARK: - String: 'SLP vectorized with cost '
50+
; REMARK-NEXT: - Cost: '-1'
3951

4052
br label %2
4153

@@ -72,6 +84,9 @@ declare double @llvm.fmuladd.f64(double, double, double)
7284
define void @fun2(ptr %0, ptr %Dst) {
7385
; CHECK-LABEL: define void @fun2(
7486
; CHECK-NOT: store <2 x i64>
87+
;
88+
; REMARK-NOT: Function: fun2
89+
7590
%3 = load i64, ptr %0, align 8
7691
%4 = icmp eq i64 %3, 0
7792
br i1 %4, label %5, label %6

0 commit comments

Comments
 (0)