Need a loop example requiring a runtime memory check while vectorizing


I’m checking the code of the loop vectorizer pass and specially on the ‘LoopVectorizationLegality’, ‘CanVectorizeMemroy()’ .

I would really appreciate if you can give me a C code example for a loop where the Vectorization is possible but we need a runtime memory check.

Thanks in advance

Sara Elshobaky has an example.

- Ben