summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/RISCV/option-norvc.ll
blob: db96a1106bb4954b8bbed02b8434ddd5bdb66f11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llc -mtriple=riscv32 -mattr=+c  -filetype=obj < %s\
; RUN: | llvm-objdump -triple=riscv32 -mattr=+c -d -M no-aliases -\
; RUN: | FileCheck -check-prefix=CHECK %s

; This test demonstrates that .option norvc has no effect on codegen when
; emitting an ELF directly.

define i32 @add(i32 %a, i32 %b) nounwind {
; CHECK-LABEL: add:
; CHECK:    c.add a0, a1
; CHECK-NEXT:    c.jr ra
  tail call void asm sideeffect ".option norvc", ""()
  %add = add nsw i32 %b, %a
  ret i32 %add
}
OpenPOWER on IntegriCloud