blob: 381fb37735dfe064d42be971473e1567e0b95d57 [file] [log] [blame]
Alex Bradburybca0c3c2018-05-11 17:30:28 +00001; RUN: llc -mtriple=riscv32 -mattr=+c -filetype=obj < %s\
2; RUN: | llvm-objdump -triple=riscv32 -mattr=+c -d -riscv-no-aliases -\
3; RUN: | FileCheck -check-prefix=CHECK %s
4
5; This test demonstrates that .option norvc has no effect on codegen when
6; emitting an ELF directly.
7
8define i32 @add(i32 %a, i32 %b) nounwind {
9; CHECK-LABEL: add:
10; CHECK: c.add a0, a1
11; CHECK-NEXT: c.jr ra
12 tail call void asm sideeffect ".option norvc", ""()
13 %add = add nsw i32 %b, %a
14 ret i32 %add
15}