[PATCH] D146149: [InstCombine] Canonicalize icmp eq pow2 more thoroughly
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 14:02:54 PDT 2023
goldstein.w.n accepted this revision.
goldstein.w.n added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:5765
+
+ // Op0 eq Pow2 -> Op0 ne 0 if Op0 is Pow2 or zero.
+ if (Op1Known.isConstant() && Op1Known.getConstant().isPowerOf2() &&
----------------
nit: "is" -> "is known to be".
also maybe "Pow2" -> "C_Pow2" so its a little clearer to you are refering to the exact same value.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146149/new/
https://reviews.llvm.org/D146149
More information about the llvm-commits
mailing list