121 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2; RUN: llc -O0 -mtriple=aarch64-linux-gnu -global-isel -stop-after=irtranslator %s -o - | FileCheck %s3 4define { half, half } @test_sincos_f16(half %a) {5 ; CHECK-LABEL: name: test_sincos_f166 ; CHECK: bb.1 (%ir-block.0):7 ; CHECK-NEXT: liveins: $h08 ; CHECK-NEXT: {{ $}}9 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h010 ; CHECK-NEXT: [[FSINCOS:%[0-9]+]]:_(s16), [[FSINCOS1:%[0-9]+]]:_ = G_FSINCOS [[COPY]]11 ; CHECK-NEXT: $h0 = COPY [[FSINCOS]](s16)12 ; CHECK-NEXT: $h1 = COPY [[FSINCOS1]](s16)13 ; CHECK-NEXT: RET_ReallyLR implicit $h0, implicit $h114 %result = call { half, half } @llvm.sincos.f16(half %a)15 ret { half, half } %result16}17 18define { <2 x half>, <2 x half> } @test_sincos_v2f16(<2 x half> %a) {19 ; CHECK-LABEL: name: test_sincos_v2f1620 ; CHECK: bb.1 (%ir-block.0):21 ; CHECK-NEXT: liveins: $d022 ; CHECK-NEXT: {{ $}}23 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d024 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)25 ; CHECK-NEXT: [[FSINCOS:%[0-9]+]]:_(<2 x s16>), [[FSINCOS1:%[0-9]+]]:_ = G_FSINCOS [[UV]]26 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(s16), [[UV3:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[FSINCOS]](<2 x s16>)27 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s16) = G_IMPLICIT_DEF28 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s16>) = G_BUILD_VECTOR [[UV2]](s16), [[UV3]](s16), [[DEF]](s16), [[DEF]](s16)29 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s16), [[UV5:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[FSINCOS1]](<2 x s16>)30 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s16>) = G_BUILD_VECTOR [[UV4]](s16), [[UV5]](s16), [[DEF]](s16), [[DEF]](s16)31 ; CHECK-NEXT: $d0 = COPY [[BUILD_VECTOR]](<4 x s16>)32 ; CHECK-NEXT: $d1 = COPY [[BUILD_VECTOR1]](<4 x s16>)33 ; CHECK-NEXT: RET_ReallyLR implicit $d0, implicit $d134 %result = call { <2 x half>, <2 x half> } @llvm.sincos.v2f16(<2 x half> %a)35 ret { <2 x half>, <2 x half> } %result36}37 38define { float, float } @test_sincos_f32(float %a) {39 ; CHECK-LABEL: name: test_sincos_f3240 ; CHECK: bb.1 (%ir-block.0):41 ; CHECK-NEXT: liveins: $s042 ; CHECK-NEXT: {{ $}}43 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $s044 ; CHECK-NEXT: [[FSINCOS:%[0-9]+]]:_(s32), [[FSINCOS1:%[0-9]+]]:_ = G_FSINCOS [[COPY]]45 ; CHECK-NEXT: $s0 = COPY [[FSINCOS]](s32)46 ; CHECK-NEXT: $s1 = COPY [[FSINCOS1]](s32)47 ; CHECK-NEXT: RET_ReallyLR implicit $s0, implicit $s148 %result = call { float, float } @llvm.sincos.f32(float %a)49 ret { float, float } %result50}51 52define { <2 x float>, <2 x float> } @test_sincos_v2f32(<2 x float> %a) {53 ; CHECK-LABEL: name: test_sincos_v2f3254 ; CHECK: bb.1 (%ir-block.0):55 ; CHECK-NEXT: liveins: $d056 ; CHECK-NEXT: {{ $}}57 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $d058 ; CHECK-NEXT: [[FSINCOS:%[0-9]+]]:_(<2 x s32>), [[FSINCOS1:%[0-9]+]]:_ = G_FSINCOS [[COPY]]59 ; CHECK-NEXT: $d0 = COPY [[FSINCOS]](<2 x s32>)60 ; CHECK-NEXT: $d1 = COPY [[FSINCOS1]](<2 x s32>)61 ; CHECK-NEXT: RET_ReallyLR implicit $d0, implicit $d162 %result = call { <2 x float>, <2 x float> } @llvm.sincos.v2f32(<2 x float> %a)63 ret { <2 x float>, <2 x float> } %result64}65 66define { double, double } @test_sincos_f64(double %a) {67 ; CHECK-LABEL: name: test_sincos_f6468 ; CHECK: bb.1 (%ir-block.0):69 ; CHECK-NEXT: liveins: $d070 ; CHECK-NEXT: {{ $}}71 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $d072 ; CHECK-NEXT: [[FSINCOS:%[0-9]+]]:_(s64), [[FSINCOS1:%[0-9]+]]:_ = G_FSINCOS [[COPY]]73 ; CHECK-NEXT: $d0 = COPY [[FSINCOS]](s64)74 ; CHECK-NEXT: $d1 = COPY [[FSINCOS1]](s64)75 ; CHECK-NEXT: RET_ReallyLR implicit $d0, implicit $d176 %result = call { double, double } @llvm.sincos.f64(double %a)77 ret { double, double } %result78}79 80define { <2 x double>, <2 x double> } @test_sincos_v2f64(<2 x double> %a) {81 ; CHECK-LABEL: name: test_sincos_v2f6482 ; CHECK: bb.1 (%ir-block.0):83 ; CHECK-NEXT: liveins: $q084 ; CHECK-NEXT: {{ $}}85 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q086 ; CHECK-NEXT: [[FSINCOS:%[0-9]+]]:_(<2 x s64>), [[FSINCOS1:%[0-9]+]]:_ = G_FSINCOS [[COPY]]87 ; CHECK-NEXT: $q0 = COPY [[FSINCOS]](<2 x s64>)88 ; CHECK-NEXT: $q1 = COPY [[FSINCOS1]](<2 x s64>)89 ; CHECK-NEXT: RET_ReallyLR implicit $q0, implicit $q190 %result = call { <2 x double>, <2 x double> } @llvm.sincos.v2f64(<2 x double> %a)91 ret { <2 x double>, <2 x double> } %result92}93 94define { fp128, fp128 } @test_sincos_f128(fp128 %a) {95 ; CHECK-LABEL: name: test_sincos_f12896 ; CHECK: bb.1 (%ir-block.0):97 ; CHECK-NEXT: liveins: $q098 ; CHECK-NEXT: {{ $}}99 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $q0100 ; CHECK-NEXT: [[FSINCOS:%[0-9]+]]:_(s128), [[FSINCOS1:%[0-9]+]]:_ = G_FSINCOS [[COPY]]101 ; CHECK-NEXT: $q0 = COPY [[FSINCOS]](s128)102 ; CHECK-NEXT: $q1 = COPY [[FSINCOS1]](s128)103 ; CHECK-NEXT: RET_ReallyLR implicit $q0, implicit $q1104 %result = call { fp128, fp128 } @llvm.sincos.f16(fp128 %a)105 ret { fp128, fp128 } %result106}107 108define { float, float } @test_sincos_f32_afn(float %a) {109 ; CHECK-LABEL: name: test_sincos_f32_afn110 ; CHECK: bb.1 (%ir-block.0):111 ; CHECK-NEXT: liveins: $s0112 ; CHECK-NEXT: {{ $}}113 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $s0114 ; CHECK-NEXT: [[FSINCOS:%[0-9]+]]:_(s32), [[FSINCOS1:%[0-9]+]]:_ = afn G_FSINCOS [[COPY]]115 ; CHECK-NEXT: $s0 = COPY [[FSINCOS]](s32)116 ; CHECK-NEXT: $s1 = COPY [[FSINCOS1]](s32)117 ; CHECK-NEXT: RET_ReallyLR implicit $s0, implicit $s1118 %result = call afn { float, float } @llvm.sincos.f32(float %a)119 ret { float, float } %result120}121