summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/RISCV/option-norelax.ll
blob: ad2b324937902edba2f4f9bce920676369975e96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
; RUN: llc -mtriple=riscv32 -mattr=+relax -filetype=obj < %s \
; RUN:     | llvm-objdump -d -r - | FileCheck %s

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

declare i32 @foo(i32)

define i32 @bar(i32 %a) nounwind {
; CHECK-LABEL: bar:
; CHECK: R_RISCV_CALL
; CHECK: R_RISCV_RELAX
  tail call void asm sideeffect ".option norelax", ""()
  %1 = call i32 @foo(i32 %a)
  ret i32 %1
}
OpenPOWER on IntegriCloud