[PATCH] D137949: [RISCV] Branchless lowering for (select (x < 0), TrueConstant, FalseConstant) and (select (x >= 0), TrueConstant, FalseConstant)
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 09:09:29 PST 2022
craig.topper requested changes to this revision.
craig.topper added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:9636
+ if (CCVal == ISD::CondCode::SETGE)
+ std::swap(TrueV, FalseV);
+
----------------
If you swap TrueV and FalseV here you need to swap them back at the end.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:9652
+ }
+ std::swap(TrueSImm, FalseSImm);
+ }
----------------
Was this supposed to be TrueV and FalseV?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137949/new/
https://reviews.llvm.org/D137949
More information about the llvm-commits
mailing list