[LV] Let recordVectorLoopValueForInductionCast to check if IV was created from the...
authorAndrei Elovikov <andrei.elovikov@intel.com>
Tue, 20 Mar 2018 09:04:39 +0000 (09:04 +0000)
committerAndrei Elovikov <andrei.elovikov@intel.com>
Tue, 20 Mar 2018 09:04:39 +0000 (09:04 +0000)
commit8b8253fdc79e80f5de9aeed2201ea2d7582b729b
tree247f1522b0948b2d5af8fb636b0d6597163da358
parent1bbe00e0ca2d37df87286bbc6108998b2fb4d643
[LV] Let recordVectorLoopValueForInductionCast to check if IV was created from the cast.

Summary:
It turned out to be error-prone to expect the callers to handle that - better to
leave the decision to this routine and make the required data to be explicitly
passed to the function.

This handles the case that was missed in the r322473 and fixes the assert
mentioned in PR36524.

Reviewers: dorit, mssimpso, Ayal, dcaballe

Reviewed By: dcaballe

Subscribers: Ka-Ka, hiraditya, dneilson, hsaito, llvm-commits

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

llvm-svn: 327960
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/X86/pr36524.ll [new file with mode: 0644]