[PATCH] D139363: [SDAG] try to convert bit set/clear to signbit test when trunc is free
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 13:49:19 PST 2022
RKSimon added a comment.
What about if we limited this to just feeding select / brcond ?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:3725
+ auto *AndC = dyn_cast<ConstantSDNode>(N0.getOperand(1));
+ if (AndC && N0.hasOneUse() && isNullConstant(N1) &&
+ AndC->getAPIntValue().isPowerOf2()) {
----------------
Move hasOneUse() to end of the if() condition as its heaviest test?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139363/new/
https://reviews.llvm.org/D139363
More information about the llvm-commits
mailing list