Alex Bradbury | 9c03e4c | 2018-11-12 14:25:07 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=riscv32 -mattr=+relax -filetype=obj < %s \ |
2 | ; RUN: | llvm-objdump -d -r - | FileCheck %s | ||||
3 | |||||
4 | ; This test demonstrates that .option norelax has no effect on codegen | ||||
5 | ; when emitting an ELF directly. | ||||
6 | |||||
7 | declare i32 @foo(i32) | ||||
8 | |||||
9 | define i32 @bar(i32 %a) nounwind { | ||||
10 | ; CHECK-LABEL: bar: | ||||
11 | ; CHECK: R_RISCV_CALL | ||||
12 | ; CHECK: R_RISCV_RELAX | ||||
13 | tail call void asm sideeffect ".option norelax", ""() | ||||
14 | %1 = call i32 @foo(i32 %a) | ||||
15 | ret i32 %1 | ||||
16 | } |