[PATCH] D131729: [RISCV] Move xori creation for scalar setccs to lowering.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 10:01:48 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3633
+ SDValue SetCC = DAG.getSetCC(
+ DL, VT, LHS, DAG.getConstant(Imm + 1, DL, OpVT), CCVal);
+ return DAG.getLogicalNOT(DL, SetCC, VT);
----------------
reames wrote:
> I'm not following something here. You're increment the rhs of a GT or UGT in the manner I'd expect to apply to a GE or UGE, but also not changing the condition code?
>
> This looks like a dag combine btw, why does this need to be done during lowering at all?
The condition code was swapped on line 3623.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3638
+
+ // Swap the operands.
+ return DAG.getSetCC(DL, VT, RHS, LHS, CCVal);
----------------
reames wrote:
> Why is swapping the operands correct here? I don't follow?
Line 3623 swapped the condition code so it is now setlt or setltu
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131729/new/
https://reviews.llvm.org/D131729
More information about the llvm-commits
mailing list