[llvm] [LoopFusion] Initial Cost Model (PR #224626)

Ehsan Amiri via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 07:17:31 PDT 2026


================

----------------
amehsan wrote:

I think `Type` is part of the key because you are concerned that two pointers may walk over the same array but one of them is used to load smaller values and the other is used to load larger values (e.g., 32 bit vs 16 bit values).

I don't know how likely is it that this happens in practice, but even it happens there is still a resuse opportunity. you can first load the larger value and then extract the smaller value from the register without loading it again. 

I suggest removing the type from your key.

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


More information about the llvm-commits mailing list