lukel97 wrote: Hi, I noticed we have very similar code for this in BasicTTIImpl.h so I opened up an alternative PR that would deduplicate these: https://github.com/llvm/llvm-project/pull/115983 https://github.com/llvm/llvm-project/pull/115978