pankaj-chawla wrote:

@efriedma-quic The trip count cannot be computed in this case because the IV 
wraparound is well defined. It is getting incremented by 3 and we cannot prove 
that (u-l) is evenly divisible by 3. I am not sure how a range check helps. May 
be we need a different check like (u-l) % 3 == 0. Can vectorizer even process 
loops whose trip count cannot be computed by ScalarEvolution? May be if we can 
add support for such cases in PredicatedScalarEvolution it can work. 

There are other consequences of treating signed integers has having 
well-defined wraparound behavior like unsigned integers. If the vectorizer 
cannot prove that the index does not wraparound, it would have to resort to 
generating gathers/scatters rather than widened loads/stores. 

I am curious. Does -fwrapv have any implications for ABI compatibility or is 
there any other reason to enable it, except for pure MSVC compatibility?

https://github.com/llvm/llvm-project/pull/198538
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to