[PATCH] D83926: [ValueTracking] Let isGuaranteedNotToBeUndefOrPoison use canCreateUndefOrPoison
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 19 06:30:01 PDT 2020
nikic added inline comments.
================
Comment at: llvm/include/llvm/Analysis/ValueTracking.h:611
+ /// or poison value. If V is an aggregate value or vector, check whether all
+ /// elements (except paddings) are not undef or poison.
/// Note that this is different from canCreateUndefOrPoison because the
----------------
paddings -> padding
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4795
+ return true;
+ }
+
----------------
The positioning here is a bit odd, I'd move this below (or inside) the Operator check.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4836
+ if (isa<ConstantExpr>(V))
+ return false;
+
----------------
Does this conservative return still make sense? At this point this should only be an optimization (don't bother with dominator checks for const exprs) than something that is needed for correctness.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83926/new/
https://reviews.llvm.org/D83926
More information about the llvm-commits
mailing list