[PATCH] D118317: [InstCombine] Fold and-reduce idiom
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 27 20:20:56 PST 2022
mkazantsev added a comment.
I'll extend the predicate in the follow-up later today, thanks!
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:5915
+ // Make sure we don't increase the number of instructions.
+ if (!InnerICmp->hasOneUse() || !BitCast->hasOneUse())
+ return nullptr;
----------------
spatel wrote:
> You could roll these checks into the match line above with `m_OneUse()`...and that removes the need to capture the bitcast and inner icmp?
I didn't know we had this, thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118317/new/
https://reviews.llvm.org/D118317
More information about the llvm-commits
mailing list