Skip to content

Commit 3caeea3

Browse files
committed
!fixup add TODO
1 parent 7e9a5f8 commit 3caeea3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,8 @@ void VPlanTransforms::licm(VPlan &Plan) {
15981598
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
15991599
vp_depth_first_shallow(LoopRegion->getEntry()))) {
16001600
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.
16011603
if (R.mayHaveSideEffects() || R.mayReadFromMemory() || R.isPhi() ||
16021604
any_of(R.operands(), [](VPValue *Op) {
16031605
return !Op->isDefinedOutsideVectorRegions();

0 commit comments

Comments
 (0)