brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.0 KiB · 0e98985 Raw
139 lines · plain
1; RUN: llc -mtriple arm-unknown -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed='gisel*' %s -o - 2>&1 | FileCheck %s -check-prefixes=CHECK2; RUN: llc -mtriple arm-unknown -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed='gisel*' -relocation-model=pic %s -o - 2>&1 | FileCheck %s -check-prefixes=PIC3; RUN: llc -mtriple arm-unknown -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed='gisel*' -relocation-model=ropi %s -o - 2>&1 | FileCheck %s -check-prefixes=ROPI4; RUN: llc -mtriple arm-unknown -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed='gisel*' -relocation-model=rwpi %s -o - 2>&1 | FileCheck %s -check-prefixes=RWPI5; RUN: llc -mtriple arm-unknown -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed='gisel*' -relocation-model=ropi-rwpi %s -o - 2>&1 | FileCheck %s -check-prefixes=ROPI-RWPI6 7; This file checks that we use the fallback path for things that are known to8; be unsupported on the ARM target. It should progressively shrink in size.9 10define <4 x i32> @test_int_vectors(<4 x i32> %a, <4 x i32> %b) {11; CHECK: remark: {{.*}} unable to lower arguments: <4 x i32> (<4 x i32>, <4 x i32>)12; CHECK-LABEL: warning: Instruction selection used fallback path for test_int_vectors13  %res = add <4 x i32> %a, %b14  ret <4 x i32> %res15}16 17define <4 x float> @test_float_vectors(<4 x float> %a, <4 x float> %b) {18; CHECK: remark: {{.*}} unable to lower arguments: <4 x float> (<4 x float>, <4 x float>)19; CHECK-LABEL: warning: Instruction selection used fallback path for test_float_vectors20  %res = fadd <4 x float> %a, %b21  ret <4 x float> %res22}23 24define i64 @test_i64(i64 %a, i64 %b) {25; CHECK: remark: {{.*}} unable to lower arguments: i64 (i64, i64)26; CHECK-LABEL: warning: Instruction selection used fallback path for test_i6427  %res = add i64 %a, %b28  ret i64 %res29}30 31define void @test_i64_arr([1 x i64] %a) {32; CHECK: remark: {{.*}} unable to lower arguments: void ([1 x i64])33; CHECK-LABEL: warning: Instruction selection used fallback path for test_i64_arr34  ret void35}36 37define i128 @test_i128(i128 %a, i128 %b) {38; CHECK: remark: {{.*}} unable to lower arguments: i128 (i128, i128)39; CHECK-LABEL: warning: Instruction selection used fallback path for test_i12840  %res = add i128 %a, %b41  ret i128 %res42}43 44define i17 @test_funny_ints(i17 %a, i17 %b) {45; CHECK: remark: {{.*}} unable to lower arguments: i17 (i17, i17)46; CHECK-LABEL: warning: Instruction selection used fallback path for test_funny_ints47  %res = add i17 %a, %b48  ret i17 %res49}50 51define half @test_half(half %a, half %b) {52; CHECK: remark: {{.*}} unable to legalize instruction: %{{[0-9]+}}:_(s16) = G_FADD %{{[0-9]+}}:_, %{{[0-9]+}}:_ (in function: test_half)53; CHECK-LABEL: warning: Instruction selection used fallback path for test_half54  %res = fadd half %a, %b55  ret half %res56}57 58declare [16 x i32] @ret_demotion_target()59 60define [16 x i32] @test_ret_demotion() {61; CHECK: remark: {{.*}} unable to translate instruction: call{{.*}} @ret_demotion_target62; CHECK-LABEL: warning: Instruction selection used fallback path for test_ret_demotion63  %res = call [16 x i32] @ret_demotion_target()64  ret [16 x i32] %res65}66 67%large.struct = type { i32, i32, i32, i32, i32} ; Doesn't fit in R0-R368 69declare %large.struct @large_struct_return_target()70 71define %large.struct @test_large_struct_return() {72; CHECK: remark: {{.*}} unable to translate instruction: call{{.*}} @large_struct_return_target73; CHECK-LABEL: warning: Instruction selection used fallback path for test_large_struct_return74  %r = call %large.struct @large_struct_return_target()75  ret %large.struct %r76}77 78%mixed.struct = type {ptr, float, i32}79 80define %mixed.struct @test_mixed_struct(%mixed.struct %x) {81; CHECK: remark: {{.*}} unable to lower arguments: %mixed.struct (%mixed.struct)82; CHECK-LABEL: warning: Instruction selection used fallback path for test_mixed_struct83  ret %mixed.struct %x84}85 86%bad.element.type = type {i24, i24}87 88define void @test_bad_element_struct(%bad.element.type %x) {89; CHECK: remark: {{.*}} unable to lower arguments: void (%bad.element.type)90; CHECK-LABEL: warning: Instruction selection used fallback path for test_bad_element_struct91  ret void92}93 94define void @test_vararg_definition(i32 %a, ...) {95; CHECK: remark: {{.*}} unable to lower arguments: void (i32, ...)96; CHECK-LABEL: warning: Instruction selection used fallback path for test_vararg_definition97  ret void98}99 100define i32 @test_thumb(i32 %a) #0 {101; CHECK: remark: {{.*}} unable to lower arguments: i32 (i32)102; CHECK-LABEL: warning: Instruction selection used fallback path for test_thumb103  ret i32 %a104}105 106@thread_local_global = thread_local global i32 42107 108define i32 @test_thread_local_global() {109; CHECK: remark: {{.*}} cannot select: {{.*}} G_GLOBAL_VALUE110; CHECK-LABEL: warning: Instruction selection used fallback path for test_thread_local_global111; PIC: remark: {{.*}} cannot select: {{.*}} G_GLOBAL_VALUE112; PIC-LABEL: warning: Instruction selection used fallback path for test_thread_local_global113; ROPI: remark: {{.*}} cannot select: {{.*}} G_GLOBAL_VALUE114; ROPI-LABEL: warning: Instruction selection used fallback path for test_thread_local_global115; RWPI: remark: {{.*}} cannot select: {{.*}} G_GLOBAL_VALUE116; RWPI-LABEL: warning: Instruction selection used fallback path for test_thread_local_global117; ROPI-RWPI: remark: {{.*}} cannot select: {{.*}} G_GLOBAL_VALUE118; ROPI-RWPI-LABEL: warning: Instruction selection used fallback path for test_thread_local_global119  %v = load i32, ptr @thread_local_global120  ret i32 %v121}122 123%byval.class = type { i32 }124 125define void @test_byval_arg(ptr byval(%byval.class) %x) {126; CHECK: remark: {{.*}} unable to lower arguments: void (ptr)127; CHECK-LABEL: warning: Instruction selection used fallback path for test_byval128  ret void129}130 131define void @test_byval_param(ptr %x) {132; CHECK: remark: {{.*}} unable to translate instruction: call133; CHECK-LABEL: warning: Instruction selection used fallback path for test_byval_param134  call void @test_byval_arg(ptr byval(%byval.class) %x)135  ret void136}137 138attributes #0 = { "target-features"="+thumb-mode" }139