[all-commits] [llvm/llvm-project] 444f08: [InstCombine] fold icmp of truncated left shift, p...
Sanjay Patel via All-commits
all-commits at lists.llvm.org
Thu Sep 8 09:44:19 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 444f08c832c8ba67ad595037b58e3ac616a756f1
https://github.com/llvm/llvm-project/commit/444f08c832c8ba67ad595037b58e3ac616a756f1
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-09-08 (Thu, 08 Sep 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/icmp-trunc.ll
Log Message:
-----------
[InstCombine] fold icmp of truncated left shift, part 2
(trunc (1 << Y) to iN) == 2**C --> Y == C
(trunc (1 << Y) to iN) != 2**C --> Y != C
https://alive2.llvm.org/ce/z/xnFPo5
Follow-up to d9e1f9d7591b0d3e4d. This was a suggested
enhancement mentioned in issue #51889.
More information about the All-commits
mailing list