Skip to content

Commit 1f7e5b0

Browse files
committed
VPlan/Builder: refine return types (NFC)
1 parent 3d34053 commit 1f7e5b0

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,33 +174,34 @@ class VPBuilder {
174174
new VPInstruction(Opcode, Operands, WrapFlags, DL, Name));
175175
}
176176

177-
VPValue *createNot(VPValue *Operand, DebugLoc DL = {},
178-
const Twine &Name = "") {
177+
VPInstruction *createNot(VPValue *Operand, DebugLoc DL = {},
178+
const Twine &Name = "") {
179179
return createInstruction(VPInstruction::Not, {Operand}, DL, Name);
180180
}
181181

182-
VPValue *createAnd(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
183-
const Twine &Name = "") {
182+
VPInstruction *createAnd(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
183+
const Twine &Name = "") {
184184
return createInstruction(Instruction::BinaryOps::And, {LHS, RHS}, DL, Name);
185185
}
186186

187-
VPValue *createOr(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
188-
const Twine &Name = "") {
187+
VPInstruction *createOr(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
188+
const Twine &Name = "") {
189189

190190
return tryInsertInstruction(new VPInstruction(
191191
Instruction::BinaryOps::Or, {LHS, RHS},
192192
VPRecipeWithIRFlags::DisjointFlagsTy(false), DL, Name));
193193
}
194194

195-
VPValue *createLogicalAnd(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
196-
const Twine &Name = "") {
195+
VPInstruction *createLogicalAnd(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
196+
const Twine &Name = "") {
197197
return tryInsertInstruction(
198198
new VPInstruction(VPInstruction::LogicalAnd, {LHS, RHS}, DL, Name));
199199
}
200200

201-
VPValue *createSelect(VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
202-
DebugLoc DL = {}, const Twine &Name = "",
203-
std::optional<FastMathFlags> FMFs = std::nullopt) {
201+
VPInstruction *
202+
createSelect(VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
203+
DebugLoc DL = {}, const Twine &Name = "",
204+
std::optional<FastMathFlags> FMFs = std::nullopt) {
204205
auto *Select =
205206
FMFs ? new VPInstruction(Instruction::Select, {Cond, TrueVal, FalseVal},
206207
*FMFs, DL, Name)
@@ -212,8 +213,8 @@ class VPBuilder {
212213
/// Create a new ICmp VPInstruction with predicate \p Pred and operands \p A
213214
/// and \p B.
214215
/// TODO: add createFCmp when needed.
215-
VPValue *createICmp(CmpInst::Predicate Pred, VPValue *A, VPValue *B,
216-
DebugLoc DL = {}, const Twine &Name = "") {
216+
VPInstruction *createICmp(CmpInst::Predicate Pred, VPValue *A, VPValue *B,
217+
DebugLoc DL = {}, const Twine &Name = "") {
217218
assert(Pred >= CmpInst::FIRST_ICMP_PREDICATE &&
218219
Pred <= CmpInst::LAST_ICMP_PREDICATE && "invalid predicate");
219220
return tryInsertInstruction(

0 commit comments

Comments
 (0)