HomePhabricator

[LV] Emitting SCEV checks with OptForSize

Description

[LV] Emitting SCEV checks with OptForSize

When optimising for size and SCEV runtime checks need to be emitted to check
overflow behaviour, the loop vectorizer can run in this assert:

LoopVectorize.cpp:2699: void llvm::InnerLoopVectorizer::emitSCEVChecks(
llvm::Loop *, llvm::BasicBlock *): Assertion `!BB->getParent()->hasOptSize()
&& "Cannot SCEV check stride or overflow when opt

We should not generate predicates while optimising for size because
code will be generated for predicates such as these SCEV overflow runtime
checks.

This should fix PR43371.

Differential Revision: https://reviews.llvm.org/D68082

Details

Committed
SjoerdMeijerOct 9 2019, 6:19 AM
Differential Revision
D68082: [LV] Emitting SCEV checks with OptForSize
Parents
rL374165: [mips] Rename local variable. NFC
Branches
Unknown
Tags
Unknown