[PATCH] D76010: [ValueTracking] Let isGuaranteedNotToBeUndefOrPoison look into more constants/instructions

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 17 00:52:14 PDT 2020


aqjune marked 4 inline comments as done.
aqjune added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4586
+  if (auto FI = dyn_cast<FCmpInst>(V)) {
+    if (FI->getFastMathFlags().none() && llvm::all_of(FI->operands(), OpCheck))
       return true;
----------------
reames wrote:
> As a follow up, it would be nice to re-write this in terms of existing logic.  For example, the operand handling part can be done as:
> if (propagatesFullPoison(&I) && std::all_of(I.operands(), OpCheck)) return true;
> 
> You do need to filter instructions with poison producing flags above that.  For that, you could possible factor out a function "localProducesPoison(Op)" based on the function generatePoisonChecks from PoisonChecking.cpp
> 
> This is optional follow on.  
Yes, I agree having it would be good. I'll make a follow-up patch for this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76010/new/

https://reviews.llvm.org/D76010





More information about the llvm-commits mailing list