[llvm] [llvm][LICM] Add flag to control re-association (PR #149829)

Theodoros Theodoridis via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 11 04:59:05 PDT 2025


thetheodor wrote:

> So generally, what this transform is doing for the multi-use case is somewhat iffy. It goes against our usual policy to not increase instruction count.
> 
> This already came up in the discussion on the original PR in #81608 and #102114 later restricted it to at most two uses.
> 
> Ideally we'd find a way here to provide good behavior for everyone without toolchains having to specify non-default options. For example, I'm wondering whether it makes sense to limit the multi-use case to FP ops only, but not integers ops?

@nikic if you'd prefer to limit the multi-use to FP, I can update this PR to do this and drop the flag.

@rj-jesus would that still work for your original use-case?

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


More information about the llvm-commits mailing list