[PATCH] D150900: [InstCombine] Insert a bitcast to enable merging similar store insts

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 20 01:25:06 PDT 2023


nikic requested changes to this revision.
nikic added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:1605
 
+  auto OtherStoreIsMergeable = [&](StoreInst *OtherStore) -> StoreInst * {
+    if (!OtherStore ||
----------------
Doesn't look like returning `StoreInst *` is needed/useful anymore -- return bool instead?


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:1638
           return false;
-        break;
       }
----------------
This `break` got dropped. I think this is the reason for the test regressions and the crashes in pre-merge checks.

Took me a while to spot because I usually only look on the right side of the diff...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150900



More information about the llvm-commits mailing list