[PATCH] D123054: InstructionCombining: merge realloc and free handling

Augie Fackler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 09:10:32 PDT 2022


durin42 updated this revision to Diff 420912.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123054

Files:
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp


Index: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
===================================================================
--- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2744,15 +2744,7 @@
           continue;
         }
 
-        if (isFreeCall(I, &TLI) && getAllocationFamily(I, &TLI) == Family) {
-          assert(Family);
-          Users.emplace_back(I);
-          continue;
-        }
-
-        if (isReallocLikeFn(I, &TLI) &&
-            getAllocationFamily(I, &TLI) == Family) {
-          assert(Family);
+        if (Family && getAllocationFamily(I, &TLI) == Family) {
           Users.emplace_back(I);
           Worklist.push_back(I);
           continue;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123054.420912.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220406/cfaf183e/attachment.bin>


More information about the llvm-commits mailing list