[PATCH] D133328: [InstCombine] Fold icmp x, ~x and icmp ~x, x by testing the sign

Tian Zhou via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 15:47:33 PDT 2022


tianz created this revision.
tianz added a reviewer: spatel.
Herald added a subscriber: hiraditya.
Herald added a project: All.
tianz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

[InstCombine] Fold icmp x, ~x and icmp ~x, x by testing the sign

Fixes #57532.

Examples:
https://alive2.llvm.org/ce/z/XBj9Pf
https://alive2.llvm.org/ce/z/UNkucP


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133328

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133328.458060.patch
Type: text/x-patch
Size: 5208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220905/602c6f17/attachment.bin>


More information about the llvm-commits mailing list