[llvm] [RISCV] Allow tail memcmp expansion (PR #121460)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 08:29:30 PST 2025


topperc wrote:

> As far as I can, the reference optimization is assuming that unaligned loads are legal and fast. This is not true for us. As such, this optimization is not sound.
> 
> Please, stop posting additional memcmp enable patches until you've addressed the soundness issues in that code with unaligned loads. It a waste of your time, and a waste of reviewers time.

What are the soundness issues? I thought we only had costing issues?

The code in `RISCVTTIImpl::enableMemCmpExpansion` currently checks `ST->enableUnalignedScalarMem()` before enabling any expansion.

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


More information about the llvm-commits mailing list