[llvm] [Analysis] Assign a CodeSize cost of 1 for division instructions rather than TTI::TCC_Expensive (PR #176524)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 16 23:23:06 PST 2026


arsenm wrote:

> I would expect the CodeSize for division to be 1 for a backend that supports it.

This doesn't include that check. We have multiple inline division expansions in ExpandLargeDivRem and in the DAG, all of which are pretty big. The known-power-of-2 case optimization is also sometimes larger than a single instruction 

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


More information about the llvm-commits mailing list