llvm-project/llvm/test/CodeGen/RISCV/inline-option-directive.ll
luxufan 9e8ed3403c [RISCV] Support '.option arch' directive
The proposal of '.option arch' directive is https://github.com/riscv-non-isa/riscv-asm-manual/pull/67

Note: For '.option arch, +/-' directive, version number is not yet supported.

Reviewed By: luismarques, craig.topper

Differential Revision: https://reviews.llvm.org/D123515
2023-05-26 18:39:41 +08:00

11 lines
371 B
LLVM

; RUN: llc -mtriple=riscv64 < %s -o - | FileCheck --check-prefixes=CHECK-ATTRIBUTES %s
; RUN: llc -mtriple=riscv64 < %s -filetype=obj | llvm-readelf -h - \
; RUN: | FileCheck --check-prefixes=CHECK-EFLAGS %s
; CHECK-ATTRIBUTES: .attribute 5, "rv64i2p1"
; CHECK-EFLAGS: Flags: 0x0
define void @test() {
tail call void asm ".option arch, +c", ""()
ret void
}