[PATCH] D100177: [X86][BMI] Fold cmpeq/ne(or(X,Y),X) --> cmpeq/ne(and(~X,Y),0) (PR44136)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 9 07:26:40 PDT 2021
RKSimon added a comment.
In D100177#2679647 <https://reviews.llvm.org/D100177#2679647>, @spatel wrote:
> LGTM - unless there's a danger of reversal (infinite looping), it should be fine to remove the BMI predicate to make things uniform.
> Every x86 has `test`, and I don't see any implementations where it would perform at lower perf than other basic ALU instructions, so that ensures we're no worse off using not+test.
Cheers, I'll remove the BMI limit - the plan is to add the reverse fold in InstCombine (see PR44136) but there isn't an equivalent in DAG afaict.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100177/new/
https://reviews.llvm.org/D100177
More information about the llvm-commits
mailing list