[PATCH] D115480: [InstCombine] Fold icmp of truncated left shift

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 09:40:43 PDT 2022


spatel updated this revision to Diff 458032.
spatel added a comment.

Patch updated:

1. Added/removed/pre-committed tests.
2. Adjusted position of fold.

The diffs show that we can already fold some of these patterns via other transforms, but it is limited based on data type. That seems like an unnecessary restriction for this pattern since we can reduce to a single instruction (no one-use limits either). There are many TODO enhancements that can be done in follow-up patches.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115480/new/

https://reviews.llvm.org/D115480

Files:
  llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  llvm/test/Transforms/InstCombine/icmp-trunc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115480.458032.patch
Type: text/x-patch
Size: 3431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220905/1e6b71f3/attachment.bin>


More information about the llvm-commits mailing list