[PATCH] D67356: [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 13:15:27 PDT 2019
lebedev.ri marked 2 inline comments as done.
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2249
+ if (Value *X = foldUnsignedUnderflowCheck(RHS, LHS, /*IsAnd=*/false, Builder))
+ return X;
+
----------------
vsk wrote:
> Does the 'or of icmps' case arise anywhere?
Define arise. We can trivially get one from another via De Morgan laws:
`(a && b) ? c : d` <--> `!(a && b) ? d : c` <--> `(!a || !b) ? d : c`,
It's *really* bad idea to intentionally not handle such nearby patterns.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67356/new/
https://reviews.llvm.org/D67356
More information about the llvm-commits
mailing list