If we have an assume which is known to execute and whose operand is invariant, we can lift that into the pre-header. So long as we don't change which paths the assume executes on, this is a legal transformation. It's likely to be a useful canonicalization as other transforms only look for dominating assumes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/Transforms/LICM/assume.ll | ||
---|---|---|
36 ↗ | (On Diff #159406) | Could you please add another test where assume uses a Phi or another unhoistable value from the loop, and therefore cannot be hoisted? |