[PATCH] D4276: Added llvm.is.constant intrinsic
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 13 12:54:21 PDT 2018
efriedma added a comment.
I guess lowering llvm.objectsize and llvm.is.constant at the same time makes sense; okay. They should probably both be lowered earlier, though.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1592
+ return true;
+ } else if (isa<ConstantAggregate>(c) || isa<ConstantExpr>(c)) {
+ for (const Value *subc : c->operand_values()) {
----------------
jyknight wrote:
> efriedma wrote:
> > Probably doesn't make sense to check for ConstantExpr here; if isManifestConstant is true for all the operands of a ConstantExpr, it should get constant-folded.
> If I remove that, then this clause fails in the test case:
> @llvm.is.constant.p0i64(i64* inttoptr (i32 42 to i64*))
> because there's no way to express a pointer with a constant value directly.
Okay.
https://reviews.llvm.org/D4276
More information about the llvm-commits
mailing list