HomePhabricator

[LV] Emitting SCEV checks with OptForSize

Authored by SjoerdMeijer on Oct 9 2019, 6:19 AM.

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

llvm-svn: 374166

Details

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