[PATCH] D149404: [ValueTracking][InstCombine] Add a new API to allow to ignore poison generating flags or metadatas when implying poison

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 05:23:15 PDT 2023


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

LGTM



================
Comment at: llvm/include/llvm/Analysis/ValueTracking.h:890
+/// Return true if V is poison given that ValAssumedPoison is already poison.
+/// Poison generating flags or metadatas are ignored in the process of implying.
+/// And the instructions ignored will be recorded in IgnoredInsts.
----------------
metadatas -> metadata


================
Comment at: llvm/include/llvm/Analysis/ValueTracking.h:891
+/// Poison generating flags or metadatas are ignored in the process of implying.
+/// And the instructions ignored will be recorded in IgnoredInsts.
+bool impliesPoisonIgnoreFlagsOrMetadata(
----------------
instructions ignored -> ignored instructions


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2926
 
+  auto dropPoisonGeneratingFlagsAndMetadata = [](SmallVectorImpl<Instruction *> &Insts) {
+    for (auto *I : Insts)
----------------
`SmallVectorImpl<Instruction *> &` -> `ArrayRef<Instruction *>`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149404



More information about the llvm-commits mailing list