We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e9a5f8 commit 3caeea3Copy full SHA for 3caeea3
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -1598,6 +1598,8 @@ void VPlanTransforms::licm(VPlan &Plan) {
1598
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
1599
vp_depth_first_shallow(LoopRegion->getEntry()))) {
1600
for (VPRecipeBase &R : make_early_inc_range(*VPBB)) {
1601
+ // TODO: Relax checks in the future, e.g. we could also hoist reads, if
1602
+ // their memory location is not modified in the vector loop.
1603
if (R.mayHaveSideEffects() || R.mayReadFromMemory() || R.isPhi() ||
1604
any_of(R.operands(), [](VPValue *Op) {
1605
return !Op->isDefinedOutsideVectorRegions();
0 commit comments