[PATCH] D60649: [InstCombine] Remove redundant/bogus mul_with_overflow folds

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 13 12:42:36 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL358339: [InstCombine] Remove redundant/bogus mul_with_overflow combines (authored by nikic, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D60649?vs=195005&id=195030#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D60649

Files:
  llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp


Index: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
===================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -4011,14 +4011,6 @@
 
   case OCF_UNSIGNED_MUL:
   case OCF_SIGNED_MUL: {
-    // X * undef -> undef
-    if (isa<UndefValue>(RHS))
-      return SetResult(RHS, UndefValue::get(Builder.getInt1Ty()), false);
-
-    // X * 0 -> {0, false}
-    if (match(RHS, m_Zero()))
-      return SetResult(RHS, Builder.getFalse(), false);
-
     // X * 1 -> {X, false}
     if (match(RHS, m_One()))
       return SetResult(LHS, Builder.getFalse(), false);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60649.195030.patch
Type: text/x-patch
Size: 714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190413/685a3b3f/attachment.bin>


More information about the llvm-commits mailing list