File tree Expand file tree Collapse file tree 2 files changed +21
-19
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 2 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -1352,25 +1352,7 @@ class VPInstruction : public VPRecipeWithIRFlags,
13521352 }
13531353
13541354 // / Returns true if the underlying opcode may read from or write to memory.
1355- bool opcodeMayReadOrWriteFromMemory () const {
1356- if (Instruction::isBinaryOp (getOpcode ()))
1357- return false ;
1358- switch (getOpcode ()) {
1359- case Instruction::ICmp:
1360- case Instruction::Select:
1361- case VPInstruction::AnyOf:
1362- case VPInstruction::Not:
1363- case VPInstruction::CalculateTripCountMinusVF:
1364- case VPInstruction::CanonicalIVIncrementForPart:
1365- case VPInstruction::ExtractFromEnd:
1366- case VPInstruction::FirstOrderRecurrenceSplice:
1367- case VPInstruction::LogicalAnd:
1368- case VPInstruction::PtrAdd:
1369- return false ;
1370- default :
1371- return true ;
1372- }
1373- }
1355+ bool opcodeMayReadOrWriteFromMemory () const ;
13741356
13751357 // / Returns true if the recipe only uses the first lane of operand \p Op.
13761358 bool onlyFirstLaneUsed (const VPValue *Op) const override ;
Original file line number Diff line number Diff line change @@ -692,6 +692,26 @@ void VPInstruction::execute(VPTransformState &State) {
692692 /* IsScalar*/ GeneratesPerFirstLaneOnly);
693693}
694694
695+ bool VPInstruction::opcodeMayReadOrWriteFromMemory () const {
696+ if (Instruction::isBinaryOp (getOpcode ()))
697+ return false ;
698+ switch (getOpcode ()) {
699+ case Instruction::ICmp:
700+ case Instruction::Select:
701+ case VPInstruction::AnyOf:
702+ case VPInstruction::Not:
703+ case VPInstruction::CalculateTripCountMinusVF:
704+ case VPInstruction::CanonicalIVIncrementForPart:
705+ case VPInstruction::ExtractFromEnd:
706+ case VPInstruction::FirstOrderRecurrenceSplice:
707+ case VPInstruction::LogicalAnd:
708+ case VPInstruction::PtrAdd:
709+ return false ;
710+ default :
711+ return true ;
712+ }
713+ }
714+
695715bool VPInstruction::onlyFirstLaneUsed (const VPValue *Op) const {
696716 assert (is_contained (operands (), Op) && " Op must be an operand of the recipe" );
697717 if (Instruction::isBinaryOp (getOpcode ()))
You can’t perform that action at this time.
0 commit comments