[all-commits] [llvm/llvm-project] b80f31: [InstSimplify] with logical ops: (X | Y) ? 0 : X -...
Allen via All-commits
all-commits at lists.llvm.org
Tue Apr 25 06:52:48 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b80f31c48d63743ece1062f30d5f747a03ee5695
https://github.com/llvm/llvm-project/commit/b80f31c48d63743ece1062f30d5f747a03ee5695
Author: Zhongyunde <zhongyunde at huawei.com>
Date: 2023-04-25 (Tue, 25 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) ? 0 : X --> 0
Use simplifySelectWithICmpEq to handle the implied equalities from the icmp-or,
then both of ICMP_NE and ICMP_EQ will be addressed
(X | Y) == 0 ? X : 0 --> 0 (commuted 2 ways)
(X | Y) != 0 ? 0 : X --> 0 (commuted 2 ways)
Fixes https://github.com/llvm/llvm-project/issues/62263
Reviewed By: nikic, RKSimon
Differential Revision: https://reviews.llvm.org/D148986
More information about the All-commits
mailing list