brintos

brintos / llvm-project-archived public Read only

0
0
Text · 12.5 KiB · 1e89475 Raw
277 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 22; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-simplifylib %s | FileCheck %s3 4declare float @_Z8copysignff(float, float)5declare <2 x float> @_Z8copysignDv2_fS_(<2 x float>, <2 x float>)6declare <3 x float> @_Z8copysignDv3_fS_(<3 x float>, <3 x float>)7declare <4 x float> @_Z8copysignDv4_fS_(<4 x float>, <4 x float>)8declare <8 x float> @_Z8copysignDv8_fS_(<8 x float>, <8 x float>)9declare <16 x float> @_Z8copysignDv16_fS_(<16 x float>, <16 x float>)10declare double @_Z8copysigndd(double, double)11declare <2 x double> @_Z8copysignDv2_dS_(<2 x double>, <2 x double>)12declare <3 x double> @_Z8copysignDv3_dS_(<3 x double>, <3 x double>)13declare <4 x double> @_Z8copysignDv4_dS_(<4 x double>, <4 x double>)14declare <8 x double> @_Z8copysignDv8_dS_(<8 x double>, <8 x double>)15declare <16 x double> @_Z8copysignDv16_dS_(<16 x double>, <16 x double>)16declare half @_Z8copysignDhDh(half, half)17declare <2 x half> @_Z8copysignDv2_DhS_(<2 x half>, <2 x half>)18declare <3 x half> @_Z8copysignDv3_DhS_(<3 x half>, <3 x half>)19declare <4 x half> @_Z8copysignDv4_DhS_(<4 x half>, <4 x half>)20declare <8 x half> @_Z8copysignDv8_DhS_(<8 x half>, <8 x half>)21declare <16 x half> @_Z8copysignDv16_DhS_(<16 x half>, <16 x half>)22 23define float @test_copysign_f32(float %x, float %y) {24; CHECK-LABEL: define float @test_copysign_f3225; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {26; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call float @llvm.copysign.f32(float [[X]], float [[Y]])27; CHECK-NEXT:    ret float [[COPYSIGN]]28;29  %copysign = tail call float @_Z8copysignff(float %x, float %y)30  ret float %copysign31}32 33define float @test_copysign_f32_nnan(float %x, float %y) {34; CHECK-LABEL: define float @test_copysign_f32_nnan35; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {36; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call nnan float @llvm.copysign.f32(float [[X]], float [[Y]])37; CHECK-NEXT:    ret float [[COPYSIGN]]38;39  %copysign = tail call nnan float @_Z8copysignff(float %x, float %y)40  ret float %copysign41}42 43define <2 x float> @test_copysign_v2f32(<2 x float> %x, <2 x float> %y) {44; CHECK-LABEL: define <2 x float> @test_copysign_v2f3245; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x float> [[Y:%.*]]) {46; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <2 x float> @llvm.copysign.v2f32(<2 x float> [[X]], <2 x float> [[Y]])47; CHECK-NEXT:    ret <2 x float> [[COPYSIGN]]48;49  %copysign = tail call <2 x float> @_Z8copysignDv2_fS_(<2 x float> %x, <2 x float> %y)50  ret <2 x float> %copysign51}52 53define <3 x float> @test_copysign_v3f32(<3 x float> %x, <3 x float> %y) {54; CHECK-LABEL: define <3 x float> @test_copysign_v3f3255; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {56; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <3 x float> @llvm.copysign.v3f32(<3 x float> [[X]], <3 x float> [[Y]])57; CHECK-NEXT:    ret <3 x float> [[COPYSIGN]]58;59  %copysign = tail call <3 x float> @_Z8copysignDv3_fS_(<3 x float> %x, <3 x float> %y)60  ret <3 x float> %copysign61}62 63define <4 x float> @test_copysign_v4f32(<4 x float> %x, <4 x float> %y) {64; CHECK-LABEL: define <4 x float> @test_copysign_v4f3265; CHECK-SAME: (<4 x float> [[X:%.*]], <4 x float> [[Y:%.*]]) {66; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <4 x float> @llvm.copysign.v4f32(<4 x float> [[X]], <4 x float> [[Y]])67; CHECK-NEXT:    ret <4 x float> [[COPYSIGN]]68;69  %copysign = tail call <4 x float> @_Z8copysignDv4_fS_(<4 x float> %x, <4 x float> %y)70  ret <4 x float> %copysign71}72 73define <8 x float> @test_copysign_v8f32(<8 x float> %x, <8 x float> %y) {74; CHECK-LABEL: define <8 x float> @test_copysign_v8f3275; CHECK-SAME: (<8 x float> [[X:%.*]], <8 x float> [[Y:%.*]]) {76; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <8 x float> @llvm.copysign.v8f32(<8 x float> [[X]], <8 x float> [[Y]])77; CHECK-NEXT:    ret <8 x float> [[COPYSIGN]]78;79  %copysign = tail call <8 x float> @_Z8copysignDv8_fS_(<8 x float> %x, <8 x float> %y)80  ret <8 x float> %copysign81}82 83define <16 x float> @test_copysign_v16f32(<16 x float> %x, <16 x float> %y) {84; CHECK-LABEL: define <16 x float> @test_copysign_v16f3285; CHECK-SAME: (<16 x float> [[X:%.*]], <16 x float> [[Y:%.*]]) {86; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <16 x float> @llvm.copysign.v16f32(<16 x float> [[X]], <16 x float> [[Y]])87; CHECK-NEXT:    ret <16 x float> [[COPYSIGN]]88;89  %copysign = tail call <16 x float> @_Z8copysignDv16_fS_(<16 x float> %x, <16 x float> %y)90  ret <16 x float> %copysign91}92 93define double @test_copysign_f64(double %x, double %y) {94; CHECK-LABEL: define double @test_copysign_f6495; CHECK-SAME: (double [[X:%.*]], double [[Y:%.*]]) {96; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call double @llvm.copysign.f64(double [[X]], double [[Y]])97; CHECK-NEXT:    ret double [[COPYSIGN]]98;99  %copysign = tail call double @_Z8copysigndd(double %x, double %y)100  ret double %copysign101}102 103define <2 x double> @test_copysign_v2f64(<2 x double> %x, <2 x double> %y) {104; CHECK-LABEL: define <2 x double> @test_copysign_v2f64105; CHECK-SAME: (<2 x double> [[X:%.*]], <2 x double> [[Y:%.*]]) {106; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <2 x double> @llvm.copysign.v2f64(<2 x double> [[X]], <2 x double> [[Y]])107; CHECK-NEXT:    ret <2 x double> [[COPYSIGN]]108;109  %copysign = tail call <2 x double> @_Z8copysignDv2_dS_(<2 x double> %x, <2 x double> %y)110  ret <2 x double> %copysign111}112 113define <3 x double> @test_copysign_v3f64(<3 x double> %x, <3 x double> %y) {114; CHECK-LABEL: define <3 x double> @test_copysign_v3f64115; CHECK-SAME: (<3 x double> [[X:%.*]], <3 x double> [[Y:%.*]]) {116; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <3 x double> @llvm.copysign.v3f64(<3 x double> [[X]], <3 x double> [[Y]])117; CHECK-NEXT:    ret <3 x double> [[COPYSIGN]]118;119  %copysign = tail call <3 x double> @_Z8copysignDv3_dS_(<3 x double> %x, <3 x double> %y)120  ret <3 x double> %copysign121}122 123define <4 x double> @test_copysign_v4f64(<4 x double> %x, <4 x double> %y) {124; CHECK-LABEL: define <4 x double> @test_copysign_v4f64125; CHECK-SAME: (<4 x double> [[X:%.*]], <4 x double> [[Y:%.*]]) {126; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <4 x double> @llvm.copysign.v4f64(<4 x double> [[X]], <4 x double> [[Y]])127; CHECK-NEXT:    ret <4 x double> [[COPYSIGN]]128;129  %copysign = tail call <4 x double> @_Z8copysignDv4_dS_(<4 x double> %x, <4 x double> %y)130  ret <4 x double> %copysign131}132 133define <8 x double> @test_copysign_v8f64(<8 x double> %x, <8 x double> %y) {134; CHECK-LABEL: define <8 x double> @test_copysign_v8f64135; CHECK-SAME: (<8 x double> [[X:%.*]], <8 x double> [[Y:%.*]]) {136; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <8 x double> @llvm.copysign.v8f64(<8 x double> [[X]], <8 x double> [[Y]])137; CHECK-NEXT:    ret <8 x double> [[COPYSIGN]]138;139  %copysign = tail call <8 x double> @_Z8copysignDv8_dS_(<8 x double> %x, <8 x double> %y)140  ret <8 x double> %copysign141}142 143define <16 x double> @test_copysign_v16f64(<16 x double> %x, <16 x double> %y) {144; CHECK-LABEL: define <16 x double> @test_copysign_v16f64145; CHECK-SAME: (<16 x double> [[X:%.*]], <16 x double> [[Y:%.*]]) {146; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <16 x double> @llvm.copysign.v16f64(<16 x double> [[X]], <16 x double> [[Y]])147; CHECK-NEXT:    ret <16 x double> [[COPYSIGN]]148;149  %copysign = tail call <16 x double> @_Z8copysignDv16_dS_(<16 x double> %x, <16 x double> %y)150  ret <16 x double> %copysign151}152 153define half @test_copysign_f16(half %x, half %y) {154; CHECK-LABEL: define half @test_copysign_f16155; CHECK-SAME: (half [[X:%.*]], half [[Y:%.*]]) {156; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call half @llvm.copysign.f16(half [[X]], half [[Y]])157; CHECK-NEXT:    ret half [[COPYSIGN]]158;159  %copysign = tail call half @_Z8copysignDhDh(half %x, half %y)160  ret half %copysign161}162 163define <2 x half> @test_copysign_v2f16(<2 x half> %x, <2 x half> %y) {164; CHECK-LABEL: define <2 x half> @test_copysign_v2f16165; CHECK-SAME: (<2 x half> [[X:%.*]], <2 x half> [[Y:%.*]]) {166; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <2 x half> @llvm.copysign.v2f16(<2 x half> [[X]], <2 x half> [[Y]])167; CHECK-NEXT:    ret <2 x half> [[COPYSIGN]]168;169  %copysign = tail call <2 x half> @_Z8copysignDv2_DhS_(<2 x half> %x, <2 x half> %y)170  ret <2 x half> %copysign171}172 173define <3 x half> @test_copysign_v3f16(<3 x half> %x, <3 x half> %y) {174; CHECK-LABEL: define <3 x half> @test_copysign_v3f16175; CHECK-SAME: (<3 x half> [[X:%.*]], <3 x half> [[Y:%.*]]) {176; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <3 x half> @llvm.copysign.v3f16(<3 x half> [[X]], <3 x half> [[Y]])177; CHECK-NEXT:    ret <3 x half> [[COPYSIGN]]178;179  %copysign = tail call <3 x half> @_Z8copysignDv3_DhS_(<3 x half> %x, <3 x half> %y)180  ret <3 x half> %copysign181}182 183define <4 x half> @test_copysign_v4f16(<4 x half> %x, <4 x half> %y) {184; CHECK-LABEL: define <4 x half> @test_copysign_v4f16185; CHECK-SAME: (<4 x half> [[X:%.*]], <4 x half> [[Y:%.*]]) {186; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <4 x half> @llvm.copysign.v4f16(<4 x half> [[X]], <4 x half> [[Y]])187; CHECK-NEXT:    ret <4 x half> [[COPYSIGN]]188;189  %copysign = tail call <4 x half> @_Z8copysignDv4_DhS_(<4 x half> %x, <4 x half> %y)190  ret <4 x half> %copysign191}192 193define <8 x half> @test_copysign_v8f16(<8 x half> %x, <8 x half> %y) {194; CHECK-LABEL: define <8 x half> @test_copysign_v8f16195; CHECK-SAME: (<8 x half> [[X:%.*]], <8 x half> [[Y:%.*]]) {196; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <8 x half> @llvm.copysign.v8f16(<8 x half> [[X]], <8 x half> [[Y]])197; CHECK-NEXT:    ret <8 x half> [[COPYSIGN]]198;199  %copysign = tail call <8 x half> @_Z8copysignDv8_DhS_(<8 x half> %x, <8 x half> %y)200  ret <8 x half> %copysign201}202 203define <16 x half> @test_copysign_v16f16(<16 x half> %x, <16 x half> %y) {204; CHECK-LABEL: define <16 x half> @test_copysign_v16f16205; CHECK-SAME: (<16 x half> [[X:%.*]], <16 x half> [[Y:%.*]]) {206; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call <16 x half> @llvm.copysign.v16f16(<16 x half> [[X]], <16 x half> [[Y]])207; CHECK-NEXT:    ret <16 x half> [[COPYSIGN]]208;209  %copysign = tail call <16 x half> @_Z8copysignDv16_DhS_(<16 x half> %x, <16 x half> %y)210  ret <16 x half> %copysign211}212 213define float @test_copysign_f32_minsize(float %x, float %y) #0 {214; CHECK-LABEL: define float @test_copysign_f32_minsize215; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) #[[ATTR0:[0-9]+]] {216; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call float @llvm.copysign.f32(float [[X]], float [[Y]])217; CHECK-NEXT:    ret float [[COPYSIGN]]218;219  %copysign = tail call float @_Z8copysignff(float %x, float %y)220  ret float %copysign221}222 223define float @test_copysign_f32_nnan_minsize(float %x, float %y) #0 {224; CHECK-LABEL: define float @test_copysign_f32_nnan_minsize225; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) #[[ATTR0]] {226; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call nnan float @llvm.copysign.f32(float [[X]], float [[Y]])227; CHECK-NEXT:    ret float [[COPYSIGN]]228;229  %copysign = tail call nnan float @_Z8copysignff(float %x, float %y)230  ret float %copysign231}232 233define float @test_copysign_f32_noinline(float %x, float %y) {234; CHECK-LABEL: define float @test_copysign_f32_noinline235; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {236; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call float @_Z8copysignff(float [[X]], float [[Y]]) #[[ATTR3:[0-9]+]]237; CHECK-NEXT:    ret float [[COPYSIGN]]238;239  %copysign = tail call float @_Z8copysignff(float %x, float %y) #1240  ret float %copysign241}242 243define float @test_copysign_f32_nnan_noinline(float %x, float %y) {244; CHECK-LABEL: define float @test_copysign_f32_nnan_noinline245; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {246; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call nnan float @_Z8copysignff(float [[X]], float [[Y]]) #[[ATTR3]]247; CHECK-NEXT:    ret float [[COPYSIGN]]248;249  %copysign = tail call nnan float @_Z8copysignff(float %x, float %y) #1250  ret float %copysign251}252 253define float @test_copysign_f32_strictfp(float %x, float %y) #2 {254; CHECK-LABEL: define float @test_copysign_f32_strictfp255; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) #[[ATTR1:[0-9]+]] {256; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call nnan nsz float @llvm.copysign.f32(float [[X]], float [[Y]]) #[[ATTR1]]257; CHECK-NEXT:    ret float [[COPYSIGN]]258;259  %copysign = tail call nsz nnan float @_Z8copysignff(float %x, float %y) #2260  ret float %copysign261}262 263define float @test_copysign_f32_fast_nobuiltin(float %x, float %y) {264; CHECK-LABEL: define float @test_copysign_f32_fast_nobuiltin265; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {266; CHECK-NEXT:    [[COPYSIGN:%.*]] = tail call fast float @_Z8copysignff(float [[X]], float [[Y]]) #[[ATTR4:[0-9]+]]267; CHECK-NEXT:    ret float [[COPYSIGN]]268;269  %copysign = tail call fast float @_Z8copysignff(float %x, float %y) #3270  ret float %copysign271}272 273attributes #0 = { minsize }274attributes #1 = { noinline }275attributes #2 = { strictfp }276attributes #3 = { nobuiltin }277