[PATCH] D119629: [DAG] computeKnownBits - add ISD::AVGCEILU handling
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 13 08:08:37 PST 2022
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3138-3139
+ KnownBits One = KnownBits::makeConstant(APInt(BitWidth + 1, 1));
+ Known = KnownBits::computeForAddSub(true, false, Known, Known2);
+ Known = KnownBits::computeForAddSub(true, false, Known, One);
+ Known = Known.extractBits(BitWidth, 1);
----------------
I think you could do all of this with a single call to computeForAddCarry with carry-in known to be 1.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119629/new/
https://reviews.llvm.org/D119629
More information about the llvm-commits
mailing list