1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -verify-machineinstrs -filetype=obj < %s \
3 ; RUN: -o /dev/null 2>&1
4 ; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s | FileCheck %s
6 define void @relax_bcc(i1 %a) nounwind {
7 ; CHECK-LABEL: relax_bcc:
9 ; CHECK-NEXT: andi a0, a0, 1
10 ; CHECK-NEXT: bnez a0, .LBB0_1
11 ; CHECK-NEXT: j .LBB0_2
12 ; CHECK-NEXT: .LBB0_1: # %iftrue
14 ; CHECK-NEXT: .space 4096
16 ; CHECK-NEXT: .LBB0_2: # %tail
18 br i1 %a, label %iftrue, label %tail
21 call void asm sideeffect ".space 4096", ""()
28 ; TODO: Extend simm12's MCOperandPredicate so the jalr zero is printed as a jr.
29 define i32 @relax_jal(i1 %a) nounwind {
30 ; CHECK-LABEL: relax_jal:
32 ; CHECK-NEXT: andi a0, a0, 1
33 ; CHECK-NEXT: bnez a0, .LBB1_1
34 ; CHECK-NEXT: # %bb.3:
35 ; CHECK-NEXT: lui a0, %hi(.LBB1_2)
36 ; CHECK-NEXT: jalr zero, %lo(.LBB1_2)(a0)
37 ; CHECK-NEXT: .LBB1_1: # %iftrue
41 ; CHECK-NEXT: .space 1048576
43 ; CHECK-NEXT: addi a0, zero, 1
45 ; CHECK-NEXT: .LBB1_2: # %jmp
48 ; CHECK-NEXT: addi a0, zero, 1
50 br i1 %a, label %iftrue, label %jmp
53 call void asm sideeffect "", ""()
57 call void asm sideeffect "", ""()
61 call void asm sideeffect ".space 1048576", ""()