[PATCH] D115829: Allow calls with known writes when trying to remove allocas

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 16 09:04:35 PST 2021


reames added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2574
+
+  if (CB.hasOperandBundles())
+    return false;
----------------
nikic wrote:
> Isn't this already covered by `onlyAccessesArgMemory()`? If the operand bundle touches other memory, then that would return false.
The loop below would have to be extended to walk the operand bundle operands as well.  This could totally be done, but it complicates the API just enough I didn't think it was worth doing in an initial patch.

e.g. a operand bundle might capture the pointer of interest


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

https://reviews.llvm.org/D115829



More information about the llvm-commits mailing list