Skip to content

Commit

Permalink
[RISCV] Options for Load/Store pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdmitrovic-syrmia authored and BgZun committed Mar 22, 2024
1 parent b037497 commit fae1aa8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2089,9 +2089,9 @@ void Clang::AddRISCVTargetArgs(const ArgList &Args,

if (Arg *A = Args.getLastArg(options::OPT_mload_store_pairs,
options::OPT_mno_load_store_pairs)) {
if (A->getOption().matches(options::OPT_mno_load_store_pairs)) {
if (A->getOption().matches(options::OPT_mload_store_pairs)) {
CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-riscv-load-store-pairs=0");
CmdArgs.push_back("-riscv-load-store-pairs=1");
}
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVSubtarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static cl::opt<unsigned> RISCVMinimumJumpTableEntries(
static cl::opt<bool> UseLoadStorePairsOpt(
"riscv-load-store-pairs",
cl::desc("RISCV: Optimize for load-store bonding"),
cl::init(true), cl::Hidden);
cl::init(false), cl::Hidden);

static cl::opt<bool> UseCCMovInsn(
"riscv-ccmov",
Expand Down
10 changes: 5 additions & 5 deletions llvm/test/CodeGen/RISCV/load-store-pair.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
; RUN: | FileCheck %s -check-prefix=RV64I
; RUN: llc -mtriple=riscv64 -target-abi lp64d -mattr=+d -verify-machineinstrs < %s \
; RUN: | FileCheck %s -check-prefix=RV64D
; RUN: llc -mtriple=riscv32 -mattr=+load-store-pairs -verify-machineinstrs < %s \
; RUN: llc -mtriple=riscv32 -mattr=+load-store-pairs -riscv-load-store-pairs=1 -verify-machineinstrs < %s \
; RUN: | FileCheck %s -check-prefix=RV32I_PAIR
; RUN: llc -mtriple=riscv32 -target-abi ilp32d -mattr=+d,+load-store-pairs -verify-machineinstrs < %s \
; RUN: llc -mtriple=riscv32 -target-abi ilp32d -mattr=+d,+load-store-pairs -riscv-load-store-pairs=1 -verify-machineinstrs < %s \
; RUN: | FileCheck %s -check-prefix=RV32D_PAIR
; RUN: llc -mtriple=riscv64 -mattr=+load-store-pairs -verify-machineinstrs < %s \
; RUN: llc -mtriple=riscv64 -mattr=+load-store-pairs -riscv-load-store-pairs=1 -verify-machineinstrs < %s \
; RUN: | FileCheck %s -check-prefix=RV64I_PAIR
; RUN: llc -mtriple=riscv64 -mcpu i8500 -verify-machineinstrs < %s \
; RUN: llc -mtriple=riscv64 -mcpu i8500 -mattr=+load-store-pairs -riscv-load-store-pairs=1 -verify-machineinstrs < %s \
; RUN: | FileCheck %s -check-prefix=RV64I_8500
; RUN: llc -mtriple=riscv64 -target-abi lp64d -mattr=+d,+load-store-pairs -verify-machineinstrs < %s \
; RUN: llc -mtriple=riscv64 -target-abi lp64d -mattr=+d,+load-store-pairs -riscv-load-store-pairs=1 -verify-machineinstrs < %s \
; RUN: | FileCheck %s -check-prefix=RV64D_PAIR
; RUN: llc -mtriple=riscv64 -target-abi lp64d -mattr=+d -verify-machineinstrs < %s \
; RUN: | FileCheck %s -check-prefix=RV64D_8500
Expand Down

0 comments on commit fae1aa8

Please sign in to comment.