42 lines · plain
1; RUN: llc -mtriple=aarch64_be -fast-isel=false < %s | FileCheck %s2; RUN: llc -mtriple=aarch64_be -fast-isel=true < %s | FileCheck %s3 4; Check narrow argument passing via stack - callee end5define i32 @test_narrow_args_callee(i64 %x0, i64 %x1, i64 %x2, i64 %x3, i64 %x4, i64 %x5, i64 %x6, i64 %x7, i8 %c, i16 %s) #0 {6entry:7 %conv = zext i8 %c to i328 %conv1 = sext i16 %s to i329 %add = add nsw i32 %conv1, %conv10; CHECK-LABEL: test_narrow_args_callee:11; CHECK-DAG: ldrb w{{[0-9]}}, [sp, #7]12; CHECK-DAG: ldr{{s?}}h w{{[0-9]}}, [sp, #14]13 ret i32 %add14}15 16; Check narrow argument passing via stack - caller end17define i32 @test_narrow_args_caller() #0 {18entry:19 %call = tail call i32 @test_narrow_args_callee(i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i64 undef, i8 8, i16 9)20; CHECK-LABEL: test_narrow_args_caller:21; CHECK-DAG: strh w{{[0-9]}}, [sp, #14]22; CHECK-DAG: strb w{{[0-9]}}, [sp, #7]23 ret i32 %call24}25 26define float @test_block_addr([8 x float], [1 x float] %in) {27; CHECK-LABEL: test_block_addr:28; CHECK: ldr s0, [sp]29 %val = extractvalue [1 x float] %in, 030 ret float %val31}32 33define void @test_block_addr_callee() {34; CHECK-LABEL: test_block_addr_callee:35; CHECK: sub sp, sp, #3236; CHECK: str {{[a-z0-9]+}}, [sp, #16]37; CHECK: bl test_block_addr38 %val = insertvalue [1 x float] undef, float 0.0, 039 call float @test_block_addr([8 x float] undef, [1 x float] %val)40 ret void41}42