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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 08:58:22 PST 2021


jdoerfert added a comment.

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?

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


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

https://reviews.llvm.org/D94180



More information about the llvm-commits mailing list