[llvm] [TypePromotion] Support positive addition amounts in isSafeWrap. (PR #81690)

Sam Parker via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 01:34:40 PST 2024


sparker-arm wrote:

> A lot of the signed-truncation-check and lack-of-signed-truncation-check test cases are not the output that InstCombine produces

Then, to allay fears, would you mind adding a test run that first processes the file with instcombine before codegen?

> If anything we should be costing the constants based on target specific cost like getImmCost

There's already some basic heuristics, at the end of TryToPromote, so tracking increased costs of immediates SGTM.

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


More information about the llvm-commits mailing list