[PATCH] D142345: [X86] Transform `(icmp eq/ne Abs(A), Pow2)` -> `(and/or (icmp eq/ne A,Pow2), (icmp eq/ne A,-Pow2))`
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 26 03:25:12 PST 2023
pengfei added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:53411
+
+ // With C as a power of 2 and C != 0 and C != INT_MIN:
+ // icmp eq Abs(X) C ->
----------------
Seems for `0` and `INT_MIN`, we can simply transform to `icmp eq/ne A, C`. Should we do it together given we already got the constant, or a follow?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142345/new/
https://reviews.llvm.org/D142345
More information about the llvm-commits
mailing list