[PATCH] D76702: [ValueTracking] improve undef/poison analysis for constants
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 24 09:39:32 PDT 2020
aqjune added a comment.
In D76702#1939368 <https://reviews.llvm.org/D76702#1939368>, @spatel wrote:
> Could we unwrap the ConstExpr by opcode similar to what we are doing for Instruction as a follow-up improvement?
Oh yes, I agree it will be great.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4619
+ if (auto *C = dyn_cast<Constant>(V)) {
+ return !isa<UndefValue>(C) && !isa<ConstantExpr>(C) &&
+ !C->containsUndefElement() && !C->containsConstantExpression();
----------------
Just realized that struct values can be given to freeze operation as well, sorry. Fully implementing this will require recursive call of this function.
What about covering ConstantDataVector first? The case which raised https://reviews.llvm.org/D76483 's regression was related with constant vector only.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76702/new/
https://reviews.llvm.org/D76702
More information about the llvm-commits
mailing list