[llvm] [ConstantFolding] Add flag to disable call folding (PR #140270)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri May 30 04:02:29 PDT 2025
nikic wrote:
@LewisCrawford `@llvm.fabs` must lower to a strictly bitwise operation -- unlike many other FP intrinsics, there is no leeway here. If it fails to do that on NVPTX, that is a backend bug and you need to lower it differently.
-----
I'm not really happy about this flag as implemented. I think a cleaner way would be to tie into the existing AllowNonDeterminstic flag, to disable *all* non-deterministic constant folding. This includes FP calls, but also e.g. non-deterministic NaN results and non-determinism due to FMF.
https://github.com/llvm/llvm-project/pull/140270
More information about the llvm-commits
mailing list