[llvm] [ConstantFolding] Fold nextafter/nextafterf/nexttoward/nexttowardf (PR #166250)

Sayan Sivakumaran via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 5 05:18:16 PST 2025


sivakusayan wrote:

Even though it wasn't linked in the issue post, I suspect I'll need to follow the Instruction combining contributor guidelines and precommit the tests. I'll try to do that and clean up the PR later today.

As an aside, I was somewhat unsure how to write the lit `nexttoward` tests, since `long double` compiles to a different IR type depending on the target. I was thinking maybe having something like `constant-folding-nexttoward-fp128.ll` and `constant-folding-nexttoward-x86-fp40.ll`, seems fine?

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


More information about the llvm-commits mailing list