[llvm] [ConstantHoisting] Add a TTI hook to prevent hoisting. (PR #69004)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 06:42:30 PDT 2023


paulwalker-arm wrote:

I’ve looked to see if I can change the meaning of `getIntImmCostInst` to better reflect the intent of constant hoisting but I see it’s also used by ScalarEvolution when it calculates the cost of an expression tree.  I don’t see what else I can do differently here because at the end of the day the cost of generating the immediate for `sdiv i64 %a, 4294967087` is not free.

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


More information about the llvm-commits mailing list