[PATCH] D149404: [ValueTracking][InstCombine] Add a new API to allow to ignore poison generating flags or metadatas when implying poison
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 08:16:59 PDT 2023
fhahn added a comment.
I am seeing regressions due to dropping poison generating flags. For the test case below, we now drop the `inbounds` from `%gep` to `select` with `and` but it is not clear to me that replacing `select` with `and` outweighs the loss of poison generating flags?
The particular case I am looking at requires `inbounds` on the GEP to trigger further optimizations.
define i1 @test(ptr %base, i64 noundef %len, ptr %p2) {
bb:
%gep = getelementptr inbounds i32, ptr %base, i64 %len
%c.1 = icmp uge ptr %p2, %base
%c.2 = icmp ult ptr %p2, %gep
%select = select i1 %c.1, i1 %c.2, i1 false
ret i1 %select
}
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