[PATCH] D75401: [ValueTracking] Let isGuaranteedNotToBeUndefOrPoison look into branch conditions of dominating blocks' terminators

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 22:25:42 PST 2020


jdoerfert added inline comments.


================
Comment at: llvm/include/llvm/Analysis/ValueTracking.h:575
+  /// and returns true if it is guaranteed to be never undef or poison
+  /// immediately before the CtxI.
+  bool isGuaranteedNotToBeUndefOrPoison(const Value *V,
----------------
If CtxI and DT are specified...


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4585
+    N = N->getIDom();
+  }
+
----------------

Style: Remove `hasCond` (which should be `HasCond` btw.) and just `return true` in the conditionals. Remove the else to.

Nit: `N` -> `Dominator` (or similar), 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75401





More information about the llvm-commits mailing list