[PATCH] D102367: [Intrinsics] is_constant intrinsic on undef evaluates to false
Joerg Sonnenberger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 12 19:59:34 PDT 2021
joerg added a comment.
One of the mots important use cases of __builtin_constant_p is ensuring that inline assembler variants that require immediate arguments are DCE'ed. There are some other use cases where it is used for compile-time assertions of invariants, so we do want to be as correct as possible. All that said, I fully agree that `is.constant(undef)` should fold to false as it is consistent with the `immarg` parameter attribute and other places. Even stronger, I would argue that it applies even to `is.constant(freeze undef)`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102367/new/
https://reviews.llvm.org/D102367
More information about the llvm-commits
mailing list