[PATCH] D74228: [PatternMatch] Match XOR variant of unsigned-add overflow check.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 15 08:42:54 PST 2020
nikic added a comment.
Taking a step back here, I'd like to question why InstCombine does this fold in the first place. This was introduced in https://github.com/llvm/llvm-project/commit/1cf0734b2f6b346993c41c18f4d6a9f2d1e11189, but I'm not quite clear on the motivations (and if they still apply after we introduced saturation intrinsics?). As we consider `a + b < a` the canonical overflow pattern for the case where `a + b` is used, why wouldn't we use the same pattern for the case where it is not used as well?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74228/new/
https://reviews.llvm.org/D74228
More information about the llvm-commits
mailing list