[PATCH] D97244: [SimplifyCFG] Update passingValueIsAlwaysUndefined to check more attributes

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 17:17:29 PDT 2021


Carrot added inline comments.


================
Comment at: llvm/include/llvm/IR/InstrTypes.h:1663
+           paramHasAttr(ArgNo, Attribute::Dereferenceable) ||
+           // dereferenceable implies noundef, and null is a well-defined value.
+           paramHasAttr(ArgNo, Attribute::DereferenceableOrNull);
----------------
It is not true for "this" parameter. It always has dereferenceable and nonnull attribute, if "this" is not used in the function, passing in undef is no problem.

It causes wrong code generated for our application.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97244



More information about the llvm-commits mailing list