[LV] Allow assume calls in predicated blocks.
authorFlorian Hahn <flo@fhahn.com>
Thu, 16 Jan 2020 10:06:09 +0000 (10:06 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 16 Jan 2020 10:11:35 +0000 (10:11 +0000)
commit23c113802e21253332dc41fba6639106b7b1e461
tree7d30c267d76bcb5f730cefe4a51d3b831181eac1
parent59ac44b3c129070c3c8b35471a24d94360a0a2a9
[LV] Allow assume calls in predicated blocks.

The assume intrinsic is intentionally marked as may reading/writing
memory, to avoid passes moving them around. When flattening the CFG
for predicated blocks, we have to drop the assume calls, as they
are control-flow dependent.

There are some cases where we can do better (when control flow is
preserved), but that is follow-up work.

Fixes PR43620.

Reviewers: hsaito, rengolin, dcaballe, Ayal

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D68814
llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/assume.ll