[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

Will Dietz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 9 09:42:46 PST 2017


dtzWill requested changes to this revision.
dtzWill added a comment.
This revision now requires changes to proceed.

After some thought, can we discuss why this is a good idea?

This increases the cyclomatic complexity of code that already is difficult to reason about, and seems like it's both brittle and out-of-place in CGExprScalar.

It really seems it would be better to let InstCombine or some other analysis/transform deal with proving checks redundant instead of attempting to do so on-the-fly during CodeGen.

Can you better motivate why this is worth theses costs, or explain your use case a bit more?


https://reviews.llvm.org/D29369





More information about the cfe-commits mailing list