[all-commits] [llvm/llvm-project] 754f3a: [ValueTracking][InstCombine] Add a new API to allo...
luxufan via All-commits
all-commits at lists.llvm.org
Thu May 18 23:51:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 754f3ae65518331b7175d7a9b4a124523ebe6eac
https://github.com/llvm/llvm-project/commit/754f3ae65518331b7175d7a9b4a124523ebe6eac
Author: luxufan <luxufan at iscas.ac.cn>
Date: 2023-05-19 (Fri, 19 May 2023)
Changed paths:
M llvm/include/llvm/Analysis/ValueTracking.h
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
M llvm/test/Transforms/InstCombine/ispow2.ll
M llvm/test/Transforms/InstCombine/prevent-cmp-merge.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list