Report multiple reasons for not vectorizing a loop instead of stopping and reporting the first reason only, under ORE->allowExtraAnalysis() - via Clang's -fsave-optimization-record or opt's -pass-remarks-missed.
Removed checking and reporting if we CantComputeNumberOfIterations from LoopVectorizationLegality::canVectorize(), as
LAI::canAnalyzeLoop() is doing so, called by canVectorizeMemory(). This redundancy is caught by a lit test once multiple reasons are reported. Can be committed separately.
Patch initially developed by Dror Barak.
I am curious what others think but I am not sure we want to advertise this, i.e. this is more of a bug than a feature. After PR32352 this should work even without -fsave-optimization-record.