[llvm] [LoopVectorize] Add support for reverse loops in isDereferenceableAndAlignedInLoop (PR #96752)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 01:05:43 PDT 2024


david-arm wrote:

> That's interesting! Is it possible that the current tests don't catch this issue because `load-deref-pred-align.ll` doesn't have a variant with `dereferenceable()`?

Yeah that's right, whereas my early exit autovec tests have a test for dereferenceable pointers. It turns out there is a relatively simple fix by teaching `ScalarEvolution::getRangeRef` to use `Value::getPointerDereferenceableBytes`. If I get time before I go away on holiday I'll get a patch up for this!

https://github.com/llvm/llvm-project/pull/96752


More information about the llvm-commits mailing list