[PATCH] D94180: [SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument.

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 09:21:53 PST 2021


xbolva00 added a comment.

In D94180#2484644 <https://reviews.llvm.org/D94180#2484644>, @jdoerfert wrote:

> Why only use GEPs? And it looks to me you only check the offset, doesn't that miscompile:
> `call(nonnull noundef (gep %p, 0))` which an arbitrary %p?

Added test9_gep_mismatch.

> I would have assumed you check for nonnull and noundef, then you ask isKnownNull, and it's UB if all 3 are true.

We dont have 'isKnownNull' or miss I something?


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

https://reviews.llvm.org/D94180



More information about the llvm-commits mailing list