[all-commits] [llvm/llvm-project] f9478f: [InstSimplify] with logical ops: (X & Y) == -1 ? X...
Allen via All-commits
all-commits at lists.llvm.org
Wed Apr 26 00:57:40 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f9478f729e68af4d32f20a93382f94744141d4a3
https://github.com/llvm/llvm-project/commit/f9478f729e68af4d32f20a93382f94744141d4a3
Author: Zhongyunde <zhongyunde at huawei.com>
Date: 2023-04-26 (Wed, 26 Apr 2023)
Changed paths:
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/test/Transforms/InstSimplify/select_or_and.ll
Log Message:
-----------
[InstSimplify] with logical ops: (X & Y) == -1 ? X : -1 --> -1
Use simplifySelectWithICmpEq to handle the implied equalities from the icmp-and,
then both of ICMP_NE and ICMP_EQ will be addressed including vector type.
(X & Y) == -1 ? X : -1 --> -1 (commuted 2 ways)
(X & Y) != -1 ? -1 : X --> -1 (commuted 2 ways)
This is a supplement to the icmp-or scenario on D148986.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D149229
More information about the All-commits
mailing list