[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 24 23:25:44 PDT 2020


aqjune marked an inline comment as done.
aqjune added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4571
+      return true;
+  }
 
----------------
jdoerfert wrote:
> jdoerfert wrote:
> > Nit: No braces.
> > Use OpCheck for BitCastInst as well.
> What does " To guarantee that the result isn't poison, the stripped pointer should be checked whether it is inbounds." mean? You cannot/should bot check the stripped value, e.g. determine how we got here.
> What does " To guarantee that the result isn't poison, the stripped pointer should be checked whether it is inbounds." mean?

It means the stripped pointer should be an in-bounds address of an allocated object, not that it should be `gep inbounds` again ( `.. if the base pointer is not an in bounds address of an allocated object`, LangRef's getelementptr instruction).


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