[PATCH] D132989: [InstSimplify] Odd - X ==/!= X -> false/true
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 5 08:50:06 PDT 2022
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:3134
+ if (Pred == CmpInst::ICMP_EQ)
+ return ConstantInt::getFalse(getCompareTy(RHS));
+ if (Pred == CmpInst::ICMP_NE)
----------------
This can be shortened like the code above:
return getFalse(ITy);
...
return getTrue(ITy);
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132989/new/
https://reviews.llvm.org/D132989
More information about the llvm-commits
mailing list