Skip to content

Commit

Permalink
[RISCV] Remove check and update test file in D121183
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D122290
  • Loading branch information
luxufan committed Mar 23, 2022
1 parent 227496d commit 5800fb4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
Expand Up @@ -80,16 +80,7 @@ static MCSubtargetInfo *createRISCVMCSubtargetInfo(const Triple &TT,
if (CPU.empty() || CPU == "generic")
CPU = TT.isArch64Bit() ? "generic-rv64" : "generic-rv32";

MCSubtargetInfo *STI =
createRISCVMCSubtargetInfoImpl(TT, CPU, /*TuneCPU*/ CPU, FS);

// Check if Feature string is valid
auto ISAInfo =
RISCVFeatures::parseFeatureBits(TT.isArch64Bit(), STI->getFeatureBits());
if (!ISAInfo)
report_fatal_error(ISAInfo.takeError());
else
return STI;
return createRISCVMCSubtargetInfoImpl(TT, CPU, /*TuneCPU*/ CPU, FS);
}

static MCInstPrinter *createRISCVMCInstPrinter(const Triple &T,
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/RISCV/mattr-invalid-combination.ll
Expand Up @@ -2,4 +2,4 @@
; RUN: not --crash llc -mtriple=riscv64 -mattr=+e < %s 2>&1 \
; RUN: | FileCheck -check-prefix=RV64E %s

; RV64E: LLVM ERROR: standard user-level extension 'e' requires 'rv32'
; RV64E: LLVM ERROR: RV32E can't be enabled for an RV64 target
2 changes: 1 addition & 1 deletion llvm/test/MC/RISCV/mattr-invalid-combination.s
@@ -1,4 +1,4 @@
# RUN: not --crash llvm-mc -triple riscv64 -mattr=+e < %s 2>&1 \
# RUN: | FileCheck %s -check-prefix=RV64E

# RV64E: LLVM ERROR: standard user-level extension 'e' requires 'rv32'
# RV64E: LLVM ERROR: RV32E can't be enabled for an RV64 target

0 comments on commit 5800fb4

Please sign in to comment.