[PATCH] D134277: [RISCV] Combine comparison and logic ops.
Ilya Andreev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 01:50:53 PST 2022
iabg-sc added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:8451
+ OperationType TypeOfCmp = OperationType::None;
+ if (ISD::isUnsignedIntSetCC(RefOpcode))
+ TypeOfCmp = OperationType::Unsigned;
----------------
craig.topper wrote:
> Seems like rather than an enum we can have
>
> ```
> bool IsUnsigned = ISD::isUnsignedIntSetCC(RefOpcode);
> assert((IsUnsigned || ISD::isSignedIntSetCC(RefOpcode)) &&
> "Operation neither with signed or unsigned integers.");
> ``
Thanks. It is more clear. Initially enum was used, because there could be fp operations too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134277/new/
https://reviews.llvm.org/D134277
More information about the llvm-commits
mailing list