[PATCH] D142542: [InstSimplify] Simplify icmp between Shl instructions of the same value
Matt Devereau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 07:45:17 PST 2023
MattDevereau added a comment.
@nikic I will move out the tests and precommit them. I've updated the condition to
if (!NUW || (ICmpInst::isSigned(Pred) && !NSW) ||
!isKnownNonZero(LBO->getOperand(0), Q.DL))
To properly assess the flags for the combine
================
Comment at: llvm/test/Transforms/InstSimplify/compare.ll:2886
+ %x2 = shl i8 %or, 2
+ %cmp = icmp slt i8 %x1, %x2
+ ret i1 %cmp
----------------
nikic wrote:
> Based on test name, this was supposed to be ult?
Correct, I will update this before pushing, thank you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142542/new/
https://reviews.llvm.org/D142542
More information about the llvm-commits
mailing list