[PATCH] D96642: [ValueTracking] Dereferenced pointers are noundef

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 13 01:57:23 PST 2021


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/include/llvm/Analysis/ValueTracking.h:594
+  /// Insert operands of I into Ops such that I will trigger undefined behavior
+  /// if I is executed and that operand is not a well-defined value.
+  void getGuaranteedWellDefinedOps(const Instruction *I,
----------------
, i.e. has undef bits or is poison.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:5174
+  getGuaranteedWellDefinedOps(I, Operands);
+  switch (I->getOpcode()) {
+  case Instruction::UDiv:
----------------
Add a comment that these may be *partially* undef and thus not well-defined?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96642



More information about the llvm-commits mailing list