[PATCH] D79249: [NOT FOR REVIEW] Experimental support for zero-or-trap behavior foruninitialized variables.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 08:07:12 PDT 2020


jdoerfert added a comment.

FWIW, I tried to solve something similar the other day. My solution sketch looked like this: https://godbolt.org/z/bRQPjd
The idea would be that we teach DSE (and others) to remove the `llvm.undef.init` intrinsic if the location is overwritten.
In the example above only SROA kicks in properly. I guess this solution is more powerful though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79249





More information about the llvm-commits mailing list