[PATCH] D68814: [LV] Allow assume calls in predicated blocks.
Gil Rapaport via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 01:45:04 PST 2019
gilr added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:89
+void VPlanTransforms::DropAssumes(VPlan &Plan) {
+ for (VPBasicBlock &VPBB : Plan.loop_basicblocks()) {
+ for (VPRecipeBase &Ingredient : make_early_inc_range(VPBB)) {
----------------
Shouldn't this recurse into regions for completeness?
================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:98
+ Instruction *Inst = &*I++;
+ assert(!match(Inst, m_Intrinsic<Intrinsic::assume>()));
+ }
----------------
This block is only asserting. Can it be compressed into the asserted expression / go under an #ifdef assert / use llvm_unreachable()?
================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.h:32
+
+ static void DropAssumes(VPlan &Plan);
};
----------------
dropAssumes()?
================
Comment at: llvm/test/Transforms/LoopVectorize/predicate-assume.ll:10
+
+; CHECK: digraph VPlan {
+; CHECK: N0 [label =
----------------
Enough to CHECK for VPlan and then CHECK-NOT for the assert?
================
Comment at: llvm/test/Transforms/LoopVectorize/predicate-assume.ll:39
+
+define void @foo(float* noalias nocapture readonly %a, float* noalias nocapture %b, i32 %n) {
+; CHECK-LABEL: @foo(
----------------
Enough to CHECK for vector.body and then CHECK-NOT for the assert?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68814/new/
https://reviews.llvm.org/D68814
More information about the llvm-commits
mailing list