[llvm] Edit Semantics Description of `@llvm.is.constant.*` (PR #77519)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 27 16:28:19 PST 2024
NCGThompson wrote:
> The Lower-Constant-Intrinsic pass will remove all instructions that haven't been folded otherwise. It folds to true for material constants and false otherwise. As such, the statement is false for all normal optimization pipelines.
There is an exception with `alwaysinline` if `@llvm.is.constant` is called directly on a function's input. `@llvm.is.constant` while be optimized to `true`, but the `true` won't be propagated further with -O0.
https://github.com/llvm/llvm-project/pull/77519
More information about the llvm-commits
mailing list