Skip to content

Commit c97067e

Browse files
committed
[RISCV] Zalrsc+Zamo should imply A.
1 parent 65c895d commit c97067e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

llvm/lib/TargetParser/RISCVISAInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ void RISCVISAInfo::updateImplication() {
887887
}
888888

889889
static constexpr StringLiteral CombineIntoExts[] = {
890-
{"b"}, {"zk"}, {"zkn"}, {"zks"}, {"zvkn"},
890+
{"a"}, {"b"}, {"zk"}, {"zkn"}, {"zks"}, {"zvkn"},
891891
{"zvknc"}, {"zvkng"}, {"zvks"}, {"zvksc"}, {"zvksg"},
892892
};
893893

llvm/test/CodeGen/RISCV/attributes.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
; RUN: llc -mtriple=riscv32 -mattr=+xwchc %s -o - | FileCheck --check-prefix=RV32XWCHC %s
8181
; RUN: llc -mtriple=riscv32 -mattr=+zaamo %s -o - | FileCheck --check-prefix=RV32ZAAMO %s
8282
; RUN: llc -mtriple=riscv32 -mattr=+zalrsc %s -o - | FileCheck --check-prefix=RV32ZALRSC %s
83+
; RUN: llc -mtriple=riscv32 -mattr=+zaamo,+zalrsc %s -o - | FileCheck --check-prefixes=CHECK,RV32COMBINEINTOA %s
8384
; RUN: llc -mtriple=riscv32 -mattr=+zca %s -o - | FileCheck --check-prefixes=CHECK,RV32ZCA %s
8485
; RUN: llc -mtriple=riscv32 -mattr=+zcb %s -o - | FileCheck --check-prefixes=CHECK,RV32ZCB %s
8586
; RUN: llc -mtriple=riscv32 -mattr=+zcd %s -o - | FileCheck --check-prefixes=CHECK,RV32ZCD %s
@@ -227,6 +228,7 @@
227228
; RUN: llc -mtriple=riscv64 -mattr=+ztso %s -o - | FileCheck --check-prefixes=CHECK,RV64ZTSO %s
228229
; RUN: llc -mtriple=riscv64 -mattr=+zaamo %s -o - | FileCheck --check-prefix=RV64ZAAMO %s
229230
; RUN: llc -mtriple=riscv64 -mattr=+zalrsc %s -o - | FileCheck --check-prefix=RV64ZALRSC %s
231+
; RUN: llc -mtriple=riscv64 -mattr=+zaamo,+zalrsc %s -o - | FileCheck --check-prefixes=CHECK,RV64COMBINEINTOA %s
230232
; RUN: llc -mtriple=riscv64 -mattr=+zca %s -o - | FileCheck --check-prefixes=CHECK,RV64ZCA %s
231233
; RUN: llc -mtriple=riscv64 -mattr=+zcb %s -o - | FileCheck --check-prefixes=CHECK,RV64ZCB %s
232234
; RUN: llc -mtriple=riscv64 -mattr=+zcd %s -o - | FileCheck --check-prefixes=CHECK,RV64ZCD %s
@@ -392,6 +394,7 @@
392394
; RV32XWCHC: .attribute 5, "rv32i2p1_zca1p0_xwchc2p2"
393395
; RV32ZAAMO: .attribute 5, "rv32i2p1_zaamo1p0"
394396
; RV32ZALRSC: .attribute 5, "rv32i2p1_zalrsc1p0"
397+
; RV32COMBINEINTOA: .attribute 5, "rv32i2p1_a2p1_zaamo1p0_zalrsc1p0"
395398
; RV32ZCA: .attribute 5, "rv32i2p1_zca1p0"
396399
; RV32ZCB: .attribute 5, "rv32i2p1_zca1p0_zcb1p0"
397400
; RV32ZCD: .attribute 5, "rv32i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcd1p0"
@@ -537,6 +540,7 @@
537540
; RV64ZTSO: .attribute 5, "rv64i2p1_ztso1p0"
538541
; RV64ZAAMO: .attribute 5, "rv64i2p1_zaamo1p0"
539542
; RV64ZALRSC: .attribute 5, "rv64i2p1_zalrsc1p0"
543+
; RV64COMBINEINTOA: .attribute 5, "rv64i2p1_a2p1_zaamo1p0_zalrsc1p0"
540544
; RV64ZCA: .attribute 5, "rv64i2p1_zca1p0"
541545
; RV64ZCB: .attribute 5, "rv64i2p1_zca1p0_zcb1p0"
542546
; RV64ZCD: .attribute 5, "rv64i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcd1p0"

0 commit comments

Comments
 (0)