[llvm] [DSE] Don't shrink memory intrinsic if its liable to make codegen worse (PR #106425)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 11:21:03 PDT 2024
https://github.com/nikic commented:
I think the general idea here is reasonable, as this is very hard to undo in the backend.
Some thoughts on the implementation:
* Please make sure existing tests retain their intent, and add new ones for the heuristic.
* I think this should be framed more in terms of rounding up to a desirable size. For example, if we're dropping down from 32 to 15, it would be better to drop down to 16 instead.
* It looks like getLoadStoreVecRegBitWidth defaults to 128 and is not overridden on most targets. In the context of this patch, it will be misleading for any (sub-)targets without vectors. 128 bit is a good default assumption for a target that has vectors, but not for a scalar-only target.
https://github.com/llvm/llvm-project/pull/106425
More information about the llvm-commits
mailing list