Skip to content

Commit 9f4a0a0

Browse files
committed
fix lint and test
1 parent 6574cf4 commit 9f4a0a0

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ STATISTIC(NumScalarOps, "Number of scalar unary + binary ops formed");
5656
STATISTIC(NumScalarCmp, "Number of scalar compares formed");
5757
STATISTIC(NumScalarIntrinsic, "Number of scalar intrinsic calls formed");
5858

59-
static cl::opt<bool>
60-
DisableVectorCombine("disable-vector-combine", cl::init(false), cl::Hidden,
59+
static cl::opt<bool> DisableVectorCombine(
60+
"disable-vector-combine", cl::init(false), cl::Hidden,
6161
cl::desc("Disable all vector combine transforms"));
6262

6363
static cl::opt<bool> DisableBinopExtractShuffle(
@@ -1074,7 +1074,8 @@ bool VectorCombine::scalarizeVPIntrinsic(Instruction &I) {
10741074
InstructionCost OldCost = 2 * SplatCost + VectorOpCost;
10751075

10761076
// Determine scalar opcode
1077-
std::optional<unsigned> FunctionalOpcode = VPI.getFunctionalOpcode();
1077+
std::optional<unsigned> FunctionalOpcode =
1078+
VPI.getFunctionalOpcode();
10781079
std::optional<Intrinsic::ID> ScalarIntrID = std::nullopt;
10791080
if (!FunctionalOpcode) {
10801081
ScalarIntrID = VPI.getFunctionalIntrinsicID();
@@ -1097,7 +1098,8 @@ bool VectorCombine::scalarizeVPIntrinsic(Instruction &I) {
10971098
(SplatCost * !Op0->hasOneUse()) + (SplatCost * !Op1->hasOneUse());
10981099
InstructionCost NewCost = ScalarOpCost + SplatCost + CostToKeepSplats;
10991100

1100-
LLVM_DEBUG(dbgs() << "Found a VP Intrinsic to scalarize: " << VPI << "\n");
1101+
LLVM_DEBUG(dbgs() << "Found a VP Intrinsic to scalarize: " << VPI
1102+
<< "\n");
11011103
LLVM_DEBUG(dbgs() << "Cost of Intrinsic: " << OldCost
11021104
<< ", Cost of scalarizing:" << NewCost << "\n");
11031105

@@ -2076,12 +2078,10 @@ bool VectorCombine::foldPermuteOfBinops(Instruction &I) {
20762078
}
20772079

20782080
unsigned NumOpElts = Op0Ty->getNumElements();
2079-
bool IsIdentity0 =
2080-
ShuffleDstTy == Op0Ty &&
2081+
bool IsIdentity0 = ShuffleDstTy == Op0Ty &&
20812082
all_of(NewMask0, [NumOpElts](int M) { return M < (int)NumOpElts; }) &&
20822083
ShuffleVectorInst::isIdentityMask(NewMask0, NumOpElts);
2083-
bool IsIdentity1 =
2084-
ShuffleDstTy == Op1Ty &&
2084+
bool IsIdentity1 = ShuffleDstTy == Op1Ty &&
20852085
all_of(NewMask1, [NumOpElts](int M) { return M < (int)NumOpElts; }) &&
20862086
ShuffleVectorInst::isIdentityMask(NewMask1, NumOpElts);
20872087

llvm/test/Transforms/VectorCombine/alias.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ bb:
4646
!4 = !{!"omnipotent char", !3, i64 0}
4747
!5 = !{!"i8", !4, i64 0}
4848
;.
49+
; CHECK: [[TBAA0]] = !{[[META3:![0-9]+]], [[META3]], i64 0, i64 0}
50+
; CHECK: [[META3]] = !{!"i8", [[META4:![0-9]+]]}
51+
; CHECK: [[META4]] = !{!"omnipotent char", [[META5:![0-9]+]], i64 0}
52+
; CHECK: [[META5]] = !{!"Simple C/C++ TBAA"}
4953
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
5054
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
5155
; CHECK: [[META2]] = distinct !{[[META2]]}

0 commit comments

Comments
 (0)