[PATCH] D102367: [Intrinsics] is_constant intrinsic on undef evaluates to false
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 12 17:45:18 PDT 2021
nickdesaulniers planned changes to this revision.
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1843-1848
+ if (isa<UndefValue>(Operands[0]))
+ return ConstantInt::getFalse(Ty->getContext());
// We know we have a "Constant" argument. But we want to only
// return true for manifest constants, not those that depend on
// constants with unknowable values, e.g. GlobalValue or BlockAddress.
if (isManifestConstant(Operands[0]))
----------------
probably should just update `isManifestConstant`
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