1 ; RUN: llc < %s -mtriple=riscv64 | FileCheck %s
2 ; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16
3 ; RUN: llc < %s -mtriple=riscv64 -align-loops=32 | FileCheck %s -check-prefix=ALIGN_32
7 define void @test(i32 %n, i32 %m) nounwind {
12 ; ALIGN_16-LABEL: test:
13 ; ALIGN_16: .p2align 4{{$}}
14 ; ALIGN_16-NEXT: .LBB0_1: # %outer
15 ; ALIGN_16: .p2align 4{{$}}
16 ; ALIGN_16-NEXT: .LBB0_2: # %inner
18 ; ALIGN_32-LABEL: test:
19 ; ALIGN_32: .p2align 5{{$}}
20 ; ALIGN_32-NEXT: .LBB0_1: # %outer
21 ; ALIGN_32: .p2align 5{{$}}
22 ; ALIGN_32-NEXT: .LBB0_2: # %inner
27 %outer.iv = phi i32 [0, %entry], [%outer.iv.next, %outer_bb]
31 %inner.iv = phi i32 [0, %outer], [%inner.iv.next, %inner]
33 %inner.iv.next = add i32 %inner.iv, 1
34 %inner.cond = icmp ne i32 %inner.iv.next, %m
35 br i1 %inner.cond, label %inner, label %outer_bb
38 %outer.iv.next = add i32 %outer.iv, 1
39 %outer.cond = icmp ne i32 %outer.iv.next, %n
40 br i1 %outer.cond, label %outer, label %exit