Skip to content
Commit 754f3ae6 authored by luxufan's avatar luxufan
Browse files

[ValueTracking][InstCombine] Add a new API to allow to ignore poison...

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

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.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D149404
parent deccb2df
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment