diff options
author | Jim Lin <jim@andestech.com> | 2025-09-01 09:32:55 +0800 |
---|---|---|
committer | Jim Lin <jim@andestech.com> | 2025-09-01 13:14:27 +0800 |
commit | 0fb1b56b2c2092d14317a7a886c316d987c1088f (patch) | |
tree | 8f7fa870c51162fe7d2e17318379b9a794e59acc /llvm/test | |
parent | 09350bd1c5ebba6cae96afcb70ef8ac097f7e1de (diff) | |
download | llvm-0fb1b56b2c2092d14317a7a886c316d987c1088f.zip llvm-0fb1b56b2c2092d14317a7a886c316d987c1088f.tar.gz llvm-0fb1b56b2c2092d14317a7a886c316d987c1088f.tar.bz2 |
[RISCV] Split the attribute test for THead to attributes-thead.ll. NFC.
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/RISCV/attributes-thead.ll | 56 | ||||
-rw-r--r-- | llvm/test/CodeGen/RISCV/attributes.ll | 36 |
2 files changed, 56 insertions, 36 deletions
diff --git a/llvm/test/CodeGen/RISCV/attributes-thead.ll b/llvm/test/CodeGen/RISCV/attributes-thead.ll new file mode 100644 index 0000000..77b0d03 --- /dev/null +++ b/llvm/test/CodeGen/RISCV/attributes-thead.ll @@ -0,0 +1,56 @@ +;; Generate ELF attributes from llc. + +; RUN: llc -mtriple=riscv32 -mattr=+xtheadba %s -o - | FileCheck --check-prefixes=CHECK,RV32XTHEADBA %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadbb %s -o - | FileCheck --check-prefixes=CHECK,RV32XTHEADBB %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadbs %s -o - | FileCheck --check-prefixes=CHECK,RV32XTHEADBS %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadcmo %s -o - | FileCheck --check-prefix=RV32XTHEADCMO %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadcondmov %s -o - | FileCheck --check-prefix=RV32XTHEADCONDMOV %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadfmemidx %s -o - | FileCheck --check-prefix=RV32XTHEADFMEMIDX %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadmac %s -o - | FileCheck --check-prefixes=CHECK,RV32XTHEADMAC %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadmemidx %s -o - | FileCheck --check-prefix=RV32XTHEADMEMIDX %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadmempair %s -o - | FileCheck --check-prefix=RV32XTHEADMEMPAIR %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadsync %s -o - | FileCheck --check-prefix=RV32XTHEADSYNC %s +; RUN: llc -mtriple=riscv32 -mattr=+xtheadvdot %s -o - | FileCheck --check-prefixes=CHECK,RV32XTHEADVDOT %s + +; RUN: llc -mtriple=riscv64 -mattr=+xtheadba %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADBA %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadbb %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADBB %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadbs %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADBS %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadcmo %s -o - | FileCheck --check-prefix=RV64XTHEADCMO %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadcondmov %s -o - | FileCheck --check-prefix=RV64XTHEADCONDMOV %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadfmemidx %s -o - | FileCheck --check-prefix=RV64XTHEADFMEMIDX %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadmac %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADMAC %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadmemidx %s -o - | FileCheck --check-prefix=RV64XTHEADMEMIDX %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadmempair %s -o - | FileCheck --check-prefix=RV64XTHEADMEMPAIR %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadsync %s -o - | FileCheck --check-prefix=RV64XTHEADSYNC %s +; RUN: llc -mtriple=riscv64 -mattr=+xtheadvdot %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADVDOT %s + +; CHECK: .attribute 4, 16 + +; RV32XTHEADBA: .attribute 5, "rv32i2p1_xtheadba1p0" +; RV32XTHEADBB: .attribute 5, "rv32i2p1_xtheadbb1p0" +; RV32XTHEADBS: .attribute 5, "rv32i2p1_xtheadbs1p0" +; RV32XTHEADCMO: .attribute 5, "rv32i2p1_xtheadcmo1p0" +; RV32XTHEADCONDMOV: .attribute 5, "rv32i2p1_xtheadcondmov1p0" +; RV32XTHEADFMEMIDX: .attribute 5, "rv32i2p1_xtheadfmemidx1p0" +; RV32XTHEADMAC: .attribute 5, "rv32i2p1_xtheadmac1p0" +; RV32XTHEADMEMIDX: .attribute 5, "rv32i2p1_xtheadmemidx1p0" +; RV32XTHEADMEMPAIR: .attribute 5, "rv32i2p1_xtheadmempair1p0" +; RV32XTHEADSYNC: .attribute 5, "rv32i2p1_xtheadsync1p0" +; RV32XTHEADVDOT: .attribute 5, "rv32i2p1_f2p2_d2p2_v1p0_zicsr2p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0_xtheadvdot1p0" + +; RV64XTHEADBA: .attribute 5, "rv64i2p1_xtheadba1p0" +; RV64XTHEADBB: .attribute 5, "rv64i2p1_xtheadbb1p0" +; RV64XTHEADBS: .attribute 5, "rv64i2p1_xtheadbs1p0" +; RV64XTHEADCMO: .attribute 5, "rv64i2p1_xtheadcmo1p0" +; RV64XTHEADCONDMOV: .attribute 5, "rv64i2p1_xtheadcondmov1p0" +; RV64XTHEADFMEMIDX: .attribute 5, "rv64i2p1_xtheadfmemidx1p0" +; RV64XTHEADMAC: .attribute 5, "rv64i2p1_xtheadmac1p0" +; RV64XTHEADMEMIDX: .attribute 5, "rv64i2p1_xtheadmemidx1p0" +; RV64XTHEADMEMPAIR: .attribute 5, "rv64i2p1_xtheadmempair1p0" +; RV64XTHEADSYNC: .attribute 5, "rv64i2p1_xtheadsync1p0" +; RV64XTHEADVDOT: .attribute 5, "rv64i2p1_f2p2_d2p2_v1p0_zicsr2p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0_xtheadvdot1p0" + +define i32 @addi(i32 %a) { + %1 = add i32 %a, 1 + ret i32 %1 +} diff --git a/llvm/test/CodeGen/RISCV/attributes.ll b/llvm/test/CodeGen/RISCV/attributes.ll index f7bcb1b..bbe7bec 100644 --- a/llvm/test/CodeGen/RISCV/attributes.ll +++ b/llvm/test/CodeGen/RISCV/attributes.ll @@ -77,13 +77,6 @@ ; RUN: llc -mtriple=riscv32 -mattr=+xcvmem %s -o - | FileCheck --check-prefix=RV32XCVMEM %s ; RUN: llc -mtriple=riscv32 -mattr=+xcvsimd %s -o - | FileCheck --check-prefix=RV32XCVSIMD %s ; RUN: llc -mtriple=riscv32 -mattr=+xcvbi %s -o - | FileCheck --check-prefix=RV32XCVBI %s -; RUN: llc -mtriple=riscv32 -mattr=+xtheadcmo %s -o - | FileCheck --check-prefix=RV32XTHEADCMO %s -; RUN: llc -mtriple=riscv32 -mattr=+xtheadcondmov %s -o - | FileCheck --check-prefix=RV32XTHEADCONDMOV %s -; RUN: llc -mtriple=riscv32 -mattr=+xtheadfmemidx %s -o - | FileCheck --check-prefix=RV32XTHEADFMEMIDX %s -; RUN: llc -mtriple=riscv32 -mattr=+xtheadmac %s -o - | FileCheck --check-prefixes=CHECK,RV32XTHEADMAC %s -; RUN: llc -mtriple=riscv32 -mattr=+xtheadmemidx %s -o - | FileCheck --check-prefix=RV32XTHEADMEMIDX %s -; RUN: llc -mtriple=riscv32 -mattr=+xtheadmempair %s -o - | FileCheck --check-prefix=RV32XTHEADMEMPAIR %s -; RUN: llc -mtriple=riscv32 -mattr=+xtheadsync %s -o - | FileCheck --check-prefix=RV32XTHEADSYNC %s ; RUN: llc -mtriple=riscv32 -mattr=+xwchc %s -o - | FileCheck --check-prefix=RV32XWCHC %s ; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqccmp %s -o - | FileCheck --check-prefix=RV32XQCCMP %s ; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcia %s -o - | FileCheck --check-prefix=RV32XQCIA %s @@ -250,17 +243,6 @@ ; RUN: llc -mtriple=riscv64 -mattr=+svvptc %s -o - | FileCheck --check-prefixes=CHECK,RV64SVVPTC %s ; RUN: llc -mtriple=riscv64 -mattr=+svinval %s -o - | FileCheck --check-prefixes=CHECK,RV64SVINVAL %s ; RUN: llc -mtriple=riscv64 -mattr=+xventanacondops %s -o - | FileCheck --check-prefixes=CHECK,RV64XVENTANACONDOPS %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadba %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADBA %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadbb %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADBB %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadbs %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADBS %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadcmo %s -o - | FileCheck --check-prefix=RV64XTHEADCMO %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadcondmov %s -o - | FileCheck --check-prefix=RV64XTHEADCONDMOV %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadfmemidx %s -o - | FileCheck --check-prefix=RV64XTHEADFMEMIDX %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadmac %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADMAC %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadmemidx %s -o - | FileCheck --check-prefix=RV64XTHEADMEMIDX %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadmempair %s -o - | FileCheck --check-prefix=RV64XTHEADMEMPAIR %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadsync %s -o - | FileCheck --check-prefix=RV64XTHEADSYNC %s -; RUN: llc -mtriple=riscv64 -mattr=+xtheadvdot %s -o - | FileCheck --check-prefixes=CHECK,RV64XTHEADVDOT %s ; RUN: llc -mtriple=riscv64 -mattr=+xandesperf %s -o - | FileCheck --check-prefix=RV64XANDESPERF %s ; RUN: llc -mtriple=riscv64 -mattr=+xandesbfhcvt %s -o - | FileCheck --check-prefix=RV64XANDESBFHCVT %s ; RUN: llc -mtriple=riscv64 -mattr=+xandesvbfhcvt %s -o - | FileCheck --check-prefix=RV64XANDESVBFHCVT %s @@ -435,13 +417,6 @@ ; RV32XCVMEM: .attribute 5, "rv32i2p1_xcvmem1p0" ; RV32XCVSIMD: .attribute 5, "rv32i2p1_xcvsimd1p0" ; RV32XCVBI: .attribute 5, "rv32i2p1_xcvbi1p0" -; RV32XTHEADCMO: .attribute 5, "rv32i2p1_xtheadcmo1p0" -; RV32XTHEADCONDMOV: .attribute 5, "rv32i2p1_xtheadcondmov1p0" -; RV32XTHEADFMEMIDX: .attribute 5, "rv32i2p1_xtheadfmemidx1p0" -; RV32XTHEADMAC: .attribute 5, "rv32i2p1_xtheadmac1p0" -; RV32XTHEADMEMIDX: .attribute 5, "rv32i2p1_xtheadmemidx1p0" -; RV32XTHEADMEMPAIR: .attribute 5, "rv32i2p1_xtheadmempair1p0" -; RV32XTHEADSYNC: .attribute 5, "rv32i2p1_xtheadsync1p0" ; RV32XWCHC: .attribute 5, "rv32i2p1_zca1p0_xwchc2p2" ; RV32XQCCMP: .attribute 5, "rv32i2p1_zca1p0_xqccmp0p3" ; RV32XQCIA: .attribute 5, "rv32i2p1_xqcia0p7" @@ -610,17 +585,6 @@ ; RV64SVVPTC: .attribute 5, "rv64i2p1_svvptc1p0" ; RV64SVINVAL: .attribute 5, "rv64i2p1_svinval1p0" ; RV64XVENTANACONDOPS: .attribute 5, "rv64i2p1_xventanacondops1p0" -; RV64XTHEADBA: .attribute 5, "rv64i2p1_xtheadba1p0" -; RV64XTHEADBB: .attribute 5, "rv64i2p1_xtheadbb1p0" -; RV64XTHEADBS: .attribute 5, "rv64i2p1_xtheadbs1p0" -; RV64XTHEADCMO: .attribute 5, "rv64i2p1_xtheadcmo1p0" -; RV64XTHEADCONDMOV: .attribute 5, "rv64i2p1_xtheadcondmov1p0" -; RV64XTHEADFMEMIDX: .attribute 5, "rv64i2p1_xtheadfmemidx1p0" -; RV64XTHEADMAC: .attribute 5, "rv64i2p1_xtheadmac1p0" -; RV64XTHEADMEMIDX: .attribute 5, "rv64i2p1_xtheadmemidx1p0" -; RV64XTHEADMEMPAIR: .attribute 5, "rv64i2p1_xtheadmempair1p0" -; RV64XTHEADSYNC: .attribute 5, "rv64i2p1_xtheadsync1p0" -; RV64XTHEADVDOT: .attribute 5, "rv64i2p1_f2p2_d2p2_v1p0_zicsr2p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0_xtheadvdot1p0" ; RV64XANDESPERF: .attribute 5, "rv64i2p1_xandesperf5p0" ; RV64XANDESBFHCVT: .attribute 5, "rv64i2p1_f2p2_zicsr2p0_xandesbfhcvt5p0" ; RV64XANDESVBFHCVT: .attribute 5, "rv64i2p1_f2p2_zicsr2p0_zve32f1p0_zve32x1p0_zvl32b1p0_xandesvbfhcvt5p0" |