[PATCH] D149404: [ValueTracking][InstCombine] Add a new API to allow to ignore poison generating flags or metadatas when implying poison
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 20:30:04 PDT 2023
StephenFan created this revision.
StephenFan added reviewers: nikic, goldstein.w.n.
Herald added a subscriber: hiraditya.
Herald added a project: All.
StephenFan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch add a new API `impliesPoisonIgnoreFlagsOrMetadatas` which is
the same as `impliesPoison` but ignoring poison generating flags or
metadatas in the process of implying poison and recording these ignored
instructions.
In InstCombineSelect, replacing `impliesPoison` with
`impliesPoisonIgnoreFlagsOrMetadatas` to allow more patterns like
`select i1 %a, i1 %b, i1 false` to be optimized to and/or instructions
by droping the poison generating flags or metadatas.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149404
Files:
llvm/include/llvm/Analysis/ValueTracking.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/ispow2.ll
llvm/test/Transforms/InstCombine/prevent-cmp-merge.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149404.517781.patch
Type: text/x-patch
Size: 11142 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230428/a0e216fc/attachment.bin>
More information about the llvm-commits
mailing list