1; RUN: llc -o - %s -verify-machineinstrs -mtriple=aarch64-linux-gnu -mattr=+neon | FileCheck %s 2; RUN: llc -o - %s -verify-machineinstrs -mtriple=aarch64-linux-gnu \ 3; RUN: -mattr=+neon -global-isel -global-isel-abort=2 \ 4; RUN: -pass-remarks-missed=gisel* \ 5; RUN: 2>&1 | FileCheck %s --check-prefixes=FALLBACK,GISEL 6 7; FALLBACK-NOT: remark{{.*}}test_cos_v2f32 8define <2 x float> @test_cos_v2f64(<2 x double> %v1) { 9; CHECK-LABEL: test_cos_v2f64: 10; CHECK: bl cos 11; CHECK: bl cos 12; GISEL-LABEL: test_cos_v2f64: 13; GISEL: bl cos 14; GISEL: bl cos 15 %1 = call <2 x double> @llvm.cos.v2f64(<2 x double> %v1) 16 %2 = fptrunc <2 x double> %1 to <2 x float> 17 ret <2 x float> %2 18} 19 20; FALLBACK-NOT: remark{{.*}}test_sin_v2f32 21define <2 x float> @test_sin_v2f64(<2 x double> %v1) { 22; CHECK-LABEL: test_sin_v2f64: 23; CHECK: bl sin 24; CHECK: bl sin 25; GISEL-LABEL: test_sin_v2f64: 26; GISEL: bl sin 27; GISEL: bl sin 28 %1 = call <2 x double> @llvm.sin.v2f64(<2 x double> %v1) 29 %2 = fptrunc <2 x double> %1 to <2 x float> 30 ret <2 x float> %2 31} 32 33define <2 x float> @test_pow_v2f64(<2 x double> %v1, <2 x double> %v2) { 34; CHECK-LABEL: test_pow_v2f64: 35; CHECK: bl pow 36; CHECK: bl pow 37 %1 = call <2 x double> @llvm.pow.v2f64(<2 x double> %v1, <2 x double> %v2) 38 %2 = fptrunc <2 x double> %1 to <2 x float> 39 ret <2 x float> %2 40} 41 42declare <2 x double> @llvm.cos.v2f64(<2 x double>) 43declare <2 x double> @llvm.sin.v2f64(<2 x double>) 44declare <2 x double> @llvm.pow.v2f64(<2 x double>, <2 x double>) 45 46; FALLBACK-NOT: remark{{.*}}test_cos_v2f32 47define <2 x float> @test_cos_v2f32(<2 x float> %v1) { 48; CHECK-LABEL: test_cos_v2f32: 49; CHECK: bl cos 50; CHECK: bl cos 51; GISEL-LABEL: test_cos_v2f32: 52; GISEL: bl cos 53; GISEL: bl cos 54 %1 = call <2 x float> @llvm.cos.v2f32(<2 x float> %v1) 55 ret <2 x float> %1 56} 57 58; FALLBACK-NOT: remark{{.*}}test_sin_v2f32 59define <2 x float> @test_sin_v2f32(<2 x float> %v1) { 60; CHECK-LABEL: test_sin_v2f32: 61; CHECK: bl sin 62; CHECK: bl sin 63; GISEL-LABEL: test_sin_v2f32: 64; GISEL: bl sin 65; GISEL: bl sin 66 %1 = call <2 x float> @llvm.sin.v2f32(<2 x float> %v1) 67 ret <2 x float> %1 68} 69 70define <2 x float> @test_pow_v2f32(<2 x float> %v1, <2 x float> %v2) { 71; CHECK-LABEL: test_pow_v2f32: 72; CHECK: bl pow 73; CHECK: bl pow 74 %1 = call <2 x float> @llvm.pow.v2f32(<2 x float> %v1, <2 x float> %v2) 75 ret <2 x float> %1 76} 77 78declare <2 x float> @llvm.cos.v2f32(<2 x float>) 79declare <2 x float> @llvm.sin.v2f32(<2 x float>) 80declare <2 x float> @llvm.pow.v2f32(<2 x float>, <2 x float>) 81 82; FALLBACK-NOT: remark{{.*}}test_cos_v4f32 83define <4 x float> @test_cos_v4f32(<4 x float> %v1) { 84; CHECK-LABEL: test_cos_v4f32: 85; CHECK: bl cos 86; CHECK: bl cos 87; CHECK: bl cos 88; CHECK: bl cos 89; GISEL-LABEL: test_cos_v4f32: 90; GISEL: bl cos 91; GISEL: bl cos 92; GISEL: bl cos 93; GISEL: bl cos 94 %1 = call <4 x float> @llvm.cos.v4f32(<4 x float> %v1) 95 ret <4 x float> %1 96} 97 98; FALLBACK-NOT: remark{{.*}}test_sin_v4f32 99define <4 x float> @test_sin_v4f32(<4 x float> %v1) { 100; CHECK-LABEL: test_sin_v4f32: 101; CHECK: bl sin 102; CHECK: bl sin 103; CHECK: bl sin 104; CHECK: bl sin 105; GISEL-LABEL: test_sin_v4f32: 106; GISEL: bl sin 107; GISEL: bl sin 108; GISEL: bl sin 109; GISEL: bl sin 110 %1 = call <4 x float> @llvm.sin.v4f32(<4 x float> %v1) 111 ret <4 x float> %1 112} 113 114define <4 x float> @test_pow_v4f32(<4 x float> %v1, <4 x float> %v2) { 115; CHECK-LABEL: test_pow_v4f32: 116; CHECK: bl pow 117; CHECK: bl pow 118; CHECK: bl pow 119; CHECK: bl pow 120 %1 = call <4 x float> @llvm.pow.v4f32(<4 x float> %v1, <4 x float> %v2) 121 ret <4 x float> %1 122} 123 124declare <4 x float> @llvm.cos.v4f32(<4 x float>) 125declare <4 x float> @llvm.sin.v4f32(<4 x float>) 126declare <4 x float> @llvm.pow.v4f32(<4 x float>, <4 x float>) 127