[PATCH] D83440: [InstSimplify] Re-enable select ?, undef, X -> X transform when X is provably not poison

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 01:47:56 PDT 2020


nlopes added a comment.

In D83440#2143450 <https://reviews.llvm.org/D83440#2143450>, @brooksmoses wrote:

> A question about this: We got a couple of dozen MSAN warnings in the Google codebase from the revision that removed these -- I'm guessing that perhaps what happened was that the undef in question was a use-of-uninitialized-value, and this optimization was hiding the use so the MSAN checks didn't trigger. Is re-enabling this going to make those MSAN warnings go away again, re-hiding this undefined behavior?


Yes, it may hide some warnings.
But that's life. Optimizations do hide programming errors. This is not the only one for sure. But it's ok as you are checking the code that will run. If the compiler can "fix" bugs automatically, then developers don't need to worry about those. As long as you keep running these checks continuously to track changes in the compiler like this one :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83440





More information about the llvm-commits mailing list