]> granicus.if.org Git - llvm/commit
[LV] Inform about exactly reason of loop illegality
authorFlorian Hahn <flo@fhahn.com>
Thu, 30 May 2019 05:03:12 +0000 (05:03 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 30 May 2019 05:03:12 +0000 (05:03 +0000)
commit7c4db390c2afbe2577ba17359f9e1ab734b1f217
tree0a582f0110c5d53a2d3529e671c47eddaa549f7e
parente2cb0b774cfd385f642b6d687cc4a35c70ee7784
[LV] Inform about exactly reason of loop illegality

Currently, only the following information is provided by LoopVectorizer
in the case when the CF of the loop is not legal for vectorization:

 LV: Can't vectorize the instructions or CFG
    LV: Not vectorizing: Cannot prove legality.

But this information is not enough for the root cause analysis; what is
exactly wrong with the loop should also be printed:

 LV: Not vectorizing: The exiting block is not the loop latch.

Patch by Pavel Samolysov.

Reviewers: mkuper, hsaito, rengolin, fhahn

Reviewed By: fhahn

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362056 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
test/Transforms/LoopVectorize/legal_preheader_check.ll [deleted file]
test/Transforms/LoopVectorize/loop-legality-checks.ll [new file with mode: 0644]