[PATCH] D105392: [InstCombine] Add optimization to prevent poison from being propagated.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 10 05:30:18 PDT 2021


lebedev.ri accepted this revision.
lebedev.ri added a comment.

LG i guess.
Thanks.



================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3556-3558
+  // If all operands are guaranteed to be non-poison, we can drop freeze.
+  if (!MaybePoisonOperand)
+    return OrigOp;
----------------
Oh, hm, actually i suspect this should go into instsimplify, without the artificial PHINode restriction..


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3580-3581
 
+  if (Value *V = pushFreezeToPreventPoisonFromPropagating(I))
+    return replaceInstUsesWith(I, V);
+
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105392



More information about the llvm-commits mailing list