[PATCH] D146635: [LegalizeTypes][RISCV] Add a special case for (add X, -1) to ExpandIntRes_ADDSUB
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 16:38:41 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:3043
+ if (isAllOnesConstant(LoOps[1]))
+ Hi = DAG.getNode(ISD::SUB, dl, NVT, HiOps[0], Carry);
+ else
----------------
This overwrites the `Hi` that was calculated above and is only correct if HiOps[1] is also all ones.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146635/new/
https://reviews.llvm.org/D146635
More information about the llvm-commits
mailing list