[all-commits] [llvm/llvm-project] b43dd2: [InstCombine] improve fold for icmp_eq_and to icmp...
ZCBing via All-commits
all-commits at lists.llvm.org
Tue Jul 5 02:18:52 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b43dd2f6c4a370f11a386dde73ad9bb51a0b6b5c
https://github.com/llvm/llvm-project/commit/b43dd2f6c4a370f11a386dde73ad9bb51a0b6b5c
Author: Chenbing Zheng <Chenbing.Zheng at streamcomputing.com>
Date: 2022-07-05 (Tue, 05 Jul 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/lshr-and-negC-icmpeq-zero.ll
Log Message:
-----------
[InstCombine] improve fold for icmp_eq_and to icmp_ult
In D95959, the improve analysis for "C >> X" broken the fold
((%x & C) == 0) --> %x u< (-C) iff (-C) is power of two.
It simplifies C, but fails to satisfy the fold condition.
This patch try to restore C before the fold.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D128790
More information about the All-commits
mailing list