[all-commits] [llvm/llvm-project] 4220ef: [InstCombine] Add fold for redundant sign bits cou...
Alexander Shaposhnikov via All-commits
all-commits at lists.llvm.org
Sat Jul 30 02:07:20 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4220ef2be1c911f92b48a895fdd18e4077b322f5
https://github.com/llvm/llvm-project/commit/4220ef2be1c911f92b48a895fdd18e4077b322f5
Author: Alexander Shaposhnikov <ashaposhnikov at google.com>
Date: 2022-07-30 (Sat, 30 Jul 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
M llvm/test/Transforms/InstCombine/icmp.ll
Log Message:
-----------
[InstCombine] Add fold for redundant sign bits count comparison
For power-of-2 C:
((X s>> ShiftC) ^ X) u< C --> (X + C) u< (C << 1)
((X s>> ShiftC) ^ X) u> (C - 1) --> (X + C) u> ((C << 1) - 1)
(https://github.com/llvm/llvm-project/issues/56479)
Test plan:
0/ ninja check-llvm check-clang + bootstrap LLVM/Clang
1/ https://alive2.llvm.org/ce/z/eEUfx3
Differential revision: https://reviews.llvm.org/D130433
More information about the All-commits
mailing list