[PATCH] D74141: [InstCombine] Simplify a umul overflow check to a != 0 && b != 0.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 13:16:11 PST 2020


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2741
+    Value *A, *B;
+    if (UMulWithOv->hasNUses(2) &&
+        match(UMulWithOv, m_Intrinsic<Intrinsic::umul_with_overflow>(
----------------
lebedev.ri wrote:
> TLDR: this check shouldn't be here.
I've removed the check and there's a test case (@test3_multiple_res_users).

In that case we end up replacing extract + icmp + or with icmp + icmp + or. Not sure if that will be better in the end, but at least it shouldn't end up worse.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74141





More information about the llvm-commits mailing list