[PATCH] D144933: [instcombine] Simplify separate_storage hints.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 00:16:12 PST 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2529
+          Value *Hint = U.get();
+          Value *UnderlyingObject = getUnderlyingObject(Hint, 0);
+          if (Hint != UnderlyingObject) {
----------------



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2530
+          Value *UnderlyingObject = getUnderlyingObject(Hint, 0);
+          if (Hint != UnderlyingObject) {
+            replaceUse(const_cast<Use &>(U), UnderlyingObject);
----------------
Drop braces.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2531
+          if (Hint != UnderlyingObject) {
+            replaceUse(const_cast<Use &>(U), UnderlyingObject);
+          }
----------------
Sounds like OBO.Inputs should be a MutableArrayRef...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144933



More information about the llvm-commits mailing list