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

Augie Fackler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 07:41:36 PDT 2022


durin42 edited the summary of this revision.
durin42 updated this revision to Diff 420851.

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.420851.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220406/287321f9/attachment.bin>


More information about the llvm-commits mailing list