[PATCH] D123653: [NFC][RISCV][CodeGen] Use ArrayRef in TargetLowering functions
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 17 21:40:48 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:206
- if (!Subtarget.hasStdExtM()) {
- setOperationAction(ISD::MUL, XLenVT, Expand);
- setOperationAction(ISD::MULHS, XLenVT, Expand);
- setOperationAction(ISD::MULHU, XLenVT, Expand);
- setOperationAction(ISD::SDIV, XLenVT, Expand);
- setOperationAction(ISD::UDIV, XLenVT, Expand);
- setOperationAction(ISD::SREM, XLenVT, Expand);
- setOperationAction(ISD::UREM, XLenVT, Expand);
- } else {
+ if (!Subtarget.hasStdExtM())
+ setOperationAction({ISD::MUL, ISD::MULHS, ISD::MULHU, ISD::SDIV, ISD::UDIV,
----------------
This should have curly braces because the `else` has curly braces. See the fourth example here https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:239
+ setOperationAction(ISD::BITREVERSE, MVT::i8, Custom);
// BSWAP i8 doesn't exist.
+ setOperationAction({ISD::BITREVERSE, ISD::BSWAP}, MVT::i16, Custom);
----------------
I think this comment should be with the BITREVERSE for i8 now since it would be part of the initializer list if it existed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123653/new/
https://reviews.llvm.org/D123653
More information about the llvm-commits
mailing list