[PATCH] D115853: [RISCV][NFC] Move ilp32e/rv32e checks to AsmParser and TargetLowering

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 30 04:57:25 PST 2021


asb added inline comments.


================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp:54
     TargetABI = ABI_Unknown;
-  } else if (IsRV32E && TargetABI != ABI_ILP32E && TargetABI != ABI_Unknown) {
-    // TODO: move this checking to RISCVTargetLowering and RISCVAsmParser
----------------
This code path can be exercised through a test like those in test/CodeGen/RISCV/target-abi-invalid.ll (e.g. targeting riscv32 -mattr=+e and without setting the ABI to ilp32e). With ilp32e ABI support not yet landed but some support for command-line options etc, the current state of affairs is a bit weird. But I think it would be better to add a test case to taret-abi-invalid.ll rather than removing this logic.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115853/new/

https://reviews.llvm.org/D115853



More information about the llvm-commits mailing list