brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.7 KiB · 5529acc Raw
199 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 <2 x float> @_Z5ldexpDv2_fi(<2 x float>, i32)5declare <3 x float> @_Z5ldexpDv3_fi(<3 x float>, i32)6declare <4 x float> @_Z5ldexpDv4_fi(<4 x float>, i32)7declare <8 x float> @_Z5ldexpDv8_fi(<8 x float>, i32)8declare <16 x float> @_Z5ldexpDv16_fi(<16 x float>, i32)9declare <2 x double> @_Z5ldexpDv2_di(<2 x double>, i32)10declare <3 x double> @_Z5ldexpDv3_di(<3 x double>, i32)11declare <4 x double> @_Z5ldexpDv4_di(<4 x double>, i32)12declare <8 x double> @_Z5ldexpDv8_di(<8 x double>, i32)13declare <16 x double> @_Z5ldexpDv16_di(<16 x double>, i32)14declare <2 x half> @_Z5ldexpDv2_Dhi(<2 x half>, i32)15declare <3 x half> @_Z5ldexpDv3_Dhi(<3 x half>, i32)16declare <4 x half> @_Z5ldexpDv4_Dhi(<4 x half>, i32)17declare <8 x half> @_Z5ldexpDv8_Dhi(<8 x half>, i32)18declare <16 x half> @_Z5ldexpDv16_Dhi(<16 x half>, i32)19 20define <2 x float> @test_ldexp_v2f32_i32(<2 x float> %x, i32 %y) {21; CHECK-LABEL: define <2 x float> @test_ldexp_v2f32_i3222; CHECK-SAME: (<2 x float> [[X:%.*]], i32 [[Y:%.*]]) {23; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <2 x i32> poison, i32 [[Y]], i64 024; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <2 x i32> [[DOTSPLATINSERT]], <2 x i32> poison, <2 x i32> zeroinitializer25; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> [[X]], <2 x i32> [[DOTSPLAT]])26; CHECK-NEXT:    ret <2 x float> [[LDEXP]]27;28  %ldexp = tail call <2 x float> @_Z5ldexpDv2_fi(<2 x float> %x, i32 %y)29  ret <2 x float> %ldexp30}31 32define <3 x float> @test_ldexp_v3f32_i32(<3 x float> %x, i32 %y) {33; CHECK-LABEL: define <3 x float> @test_ldexp_v3f32_i3234; CHECK-SAME: (<3 x float> [[X:%.*]], i32 [[Y:%.*]]) {35; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <3 x i32> poison, i32 [[Y]], i64 036; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <3 x i32> [[DOTSPLATINSERT]], <3 x i32> poison, <3 x i32> zeroinitializer37; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <3 x float> @llvm.ldexp.v3f32.v3i32(<3 x float> [[X]], <3 x i32> [[DOTSPLAT]])38; CHECK-NEXT:    ret <3 x float> [[LDEXP]]39;40  %ldexp = tail call <3 x float> @_Z5ldexpDv3_fi(<3 x float> %x, i32 %y)41  ret <3 x float> %ldexp42}43 44define <4 x float> @test_ldexp_v4f32_i32(<4 x float> %x, i32 %y) {45; CHECK-LABEL: define <4 x float> @test_ldexp_v4f32_i3246; CHECK-SAME: (<4 x float> [[X:%.*]], i32 [[Y:%.*]]) {47; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[Y]], i64 048; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer49; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <4 x float> @llvm.ldexp.v4f32.v4i32(<4 x float> [[X]], <4 x i32> [[DOTSPLAT]])50; CHECK-NEXT:    ret <4 x float> [[LDEXP]]51;52  %ldexp = tail call <4 x float> @_Z5ldexpDv4_fi(<4 x float> %x, i32 %y)53  ret <4 x float> %ldexp54}55 56define <8 x float> @test_ldexp_v8f32_i32(<8 x float> %x, i32 %y) {57; CHECK-LABEL: define <8 x float> @test_ldexp_v8f32_i3258; CHECK-SAME: (<8 x float> [[X:%.*]], i32 [[Y:%.*]]) {59; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i32> poison, i32 [[Y]], i64 060; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i32> [[DOTSPLATINSERT]], <8 x i32> poison, <8 x i32> zeroinitializer61; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <8 x float> @llvm.ldexp.v8f32.v8i32(<8 x float> [[X]], <8 x i32> [[DOTSPLAT]])62; CHECK-NEXT:    ret <8 x float> [[LDEXP]]63;64  %ldexp = tail call <8 x float> @_Z5ldexpDv8_fi(<8 x float> %x, i32 %y)65  ret <8 x float> %ldexp66}67 68define <16 x float> @test_ldexp_v16f32_i32(<16 x float> %x, i32 %y) {69; CHECK-LABEL: define <16 x float> @test_ldexp_v16f32_i3270; CHECK-SAME: (<16 x float> [[X:%.*]], i32 [[Y:%.*]]) {71; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i32> poison, i32 [[Y]], i64 072; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i32> [[DOTSPLATINSERT]], <16 x i32> poison, <16 x i32> zeroinitializer73; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <16 x float> @llvm.ldexp.v16f32.v16i32(<16 x float> [[X]], <16 x i32> [[DOTSPLAT]])74; CHECK-NEXT:    ret <16 x float> [[LDEXP]]75;76  %ldexp = tail call <16 x float> @_Z5ldexpDv16_fi(<16 x float> %x, i32 %y)77  ret <16 x float> %ldexp78}79 80define <2 x double> @test_ldexp_v2f64_i32(<2 x double> %x, i32 %y) {81; CHECK-LABEL: define <2 x double> @test_ldexp_v2f64_i3282; CHECK-SAME: (<2 x double> [[X:%.*]], i32 [[Y:%.*]]) {83; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <2 x i32> poison, i32 [[Y]], i64 084; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <2 x i32> [[DOTSPLATINSERT]], <2 x i32> poison, <2 x i32> zeroinitializer85; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <2 x double> @llvm.ldexp.v2f64.v2i32(<2 x double> [[X]], <2 x i32> [[DOTSPLAT]])86; CHECK-NEXT:    ret <2 x double> [[LDEXP]]87;88  %ldexp = tail call <2 x double> @_Z5ldexpDv2_di(<2 x double> %x, i32 %y)89  ret <2 x double> %ldexp90}91 92define <3 x double> @test_ldexp_v3f64_i32(<3 x double> %x, i32 %y) {93; CHECK-LABEL: define <3 x double> @test_ldexp_v3f64_i3294; CHECK-SAME: (<3 x double> [[X:%.*]], i32 [[Y:%.*]]) {95; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <3 x i32> poison, i32 [[Y]], i64 096; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <3 x i32> [[DOTSPLATINSERT]], <3 x i32> poison, <3 x i32> zeroinitializer97; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <3 x double> @llvm.ldexp.v3f64.v3i32(<3 x double> [[X]], <3 x i32> [[DOTSPLAT]])98; CHECK-NEXT:    ret <3 x double> [[LDEXP]]99;100  %ldexp = tail call <3 x double> @_Z5ldexpDv3_di(<3 x double> %x, i32 %y)101  ret <3 x double> %ldexp102}103 104define <4 x double> @test_ldexp_v4f64_i32(<4 x double> %x, i32 %y) {105; CHECK-LABEL: define <4 x double> @test_ldexp_v4f64_i32106; CHECK-SAME: (<4 x double> [[X:%.*]], i32 [[Y:%.*]]) {107; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[Y]], i64 0108; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer109; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <4 x double> @llvm.ldexp.v4f64.v4i32(<4 x double> [[X]], <4 x i32> [[DOTSPLAT]])110; CHECK-NEXT:    ret <4 x double> [[LDEXP]]111;112  %ldexp = tail call <4 x double> @_Z5ldexpDv4_di(<4 x double> %x, i32 %y)113  ret <4 x double> %ldexp114}115 116define <8 x double> @test_ldexp_v8f64_i32(<8 x double> %x, i32 %y) {117; CHECK-LABEL: define <8 x double> @test_ldexp_v8f64_i32118; CHECK-SAME: (<8 x double> [[X:%.*]], i32 [[Y:%.*]]) {119; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i32> poison, i32 [[Y]], i64 0120; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i32> [[DOTSPLATINSERT]], <8 x i32> poison, <8 x i32> zeroinitializer121; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <8 x double> @llvm.ldexp.v8f64.v8i32(<8 x double> [[X]], <8 x i32> [[DOTSPLAT]])122; CHECK-NEXT:    ret <8 x double> [[LDEXP]]123;124  %ldexp = tail call <8 x double> @_Z5ldexpDv8_di(<8 x double> %x, i32 %y)125  ret <8 x double> %ldexp126}127 128define <16 x double> @test_ldexp_v16f64_i32(<16 x double> %x, i32 %y) {129; CHECK-LABEL: define <16 x double> @test_ldexp_v16f64_i32130; CHECK-SAME: (<16 x double> [[X:%.*]], i32 [[Y:%.*]]) {131; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i32> poison, i32 [[Y]], i64 0132; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i32> [[DOTSPLATINSERT]], <16 x i32> poison, <16 x i32> zeroinitializer133; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <16 x double> @llvm.ldexp.v16f64.v16i32(<16 x double> [[X]], <16 x i32> [[DOTSPLAT]])134; CHECK-NEXT:    ret <16 x double> [[LDEXP]]135;136  %ldexp = tail call <16 x double> @_Z5ldexpDv16_di(<16 x double> %x, i32 %y)137  ret <16 x double> %ldexp138}139 140define <2 x half> @test_ldexp_v2f16_i32(<2 x half> %x, i32 %y) {141; CHECK-LABEL: define <2 x half> @test_ldexp_v2f16_i32142; CHECK-SAME: (<2 x half> [[X:%.*]], i32 [[Y:%.*]]) {143; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <2 x i32> poison, i32 [[Y]], i64 0144; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <2 x i32> [[DOTSPLATINSERT]], <2 x i32> poison, <2 x i32> zeroinitializer145; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <2 x half> @llvm.ldexp.v2f16.v2i32(<2 x half> [[X]], <2 x i32> [[DOTSPLAT]])146; CHECK-NEXT:    ret <2 x half> [[LDEXP]]147;148  %ldexp = tail call <2 x half> @_Z5ldexpDv2_Dhi(<2 x half> %x, i32 %y)149  ret <2 x half> %ldexp150}151 152define <3 x half> @test_ldexp_v3f16_i32(<3 x half> %x, i32 %y) {153; CHECK-LABEL: define <3 x half> @test_ldexp_v3f16_i32154; CHECK-SAME: (<3 x half> [[X:%.*]], i32 [[Y:%.*]]) {155; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <3 x i32> poison, i32 [[Y]], i64 0156; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <3 x i32> [[DOTSPLATINSERT]], <3 x i32> poison, <3 x i32> zeroinitializer157; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <3 x half> @llvm.ldexp.v3f16.v3i32(<3 x half> [[X]], <3 x i32> [[DOTSPLAT]])158; CHECK-NEXT:    ret <3 x half> [[LDEXP]]159;160  %ldexp = tail call <3 x half> @_Z5ldexpDv3_Dhi(<3 x half> %x, i32 %y)161  ret <3 x half> %ldexp162}163 164define <4 x half> @test_ldexp_v4f16_i32(<4 x half> %x, i32 %y) {165; CHECK-LABEL: define <4 x half> @test_ldexp_v4f16_i32166; CHECK-SAME: (<4 x half> [[X:%.*]], i32 [[Y:%.*]]) {167; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[Y]], i64 0168; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer169; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <4 x half> @llvm.ldexp.v4f16.v4i32(<4 x half> [[X]], <4 x i32> [[DOTSPLAT]])170; CHECK-NEXT:    ret <4 x half> [[LDEXP]]171;172  %ldexp = tail call <4 x half> @_Z5ldexpDv4_Dhi(<4 x half> %x, i32 %y)173  ret <4 x half> %ldexp174}175 176define <8 x half> @test_ldexp_v8f16_i32(<8 x half> %x, i32 %y) {177; CHECK-LABEL: define <8 x half> @test_ldexp_v8f16_i32178; CHECK-SAME: (<8 x half> [[X:%.*]], i32 [[Y:%.*]]) {179; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i32> poison, i32 [[Y]], i64 0180; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i32> [[DOTSPLATINSERT]], <8 x i32> poison, <8 x i32> zeroinitializer181; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <8 x half> @llvm.ldexp.v8f16.v8i32(<8 x half> [[X]], <8 x i32> [[DOTSPLAT]])182; CHECK-NEXT:    ret <8 x half> [[LDEXP]]183;184  %ldexp = tail call <8 x half> @_Z5ldexpDv8_Dhi(<8 x half> %x, i32 %y)185  ret <8 x half> %ldexp186}187 188define <16 x half> @test_ldexp_v16f16_i32(<16 x half> %x, i32 %y) {189; CHECK-LABEL: define <16 x half> @test_ldexp_v16f16_i32190; CHECK-SAME: (<16 x half> [[X:%.*]], i32 [[Y:%.*]]) {191; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i32> poison, i32 [[Y]], i64 0192; CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i32> [[DOTSPLATINSERT]], <16 x i32> poison, <16 x i32> zeroinitializer193; CHECK-NEXT:    [[LDEXP:%.*]] = tail call <16 x half> @llvm.ldexp.v16f16.v16i32(<16 x half> [[X]], <16 x i32> [[DOTSPLAT]])194; CHECK-NEXT:    ret <16 x half> [[LDEXP]]195;196  %ldexp = tail call <16 x half> @_Z5ldexpDv16_Dhi(<16 x half> %x, i32 %y)197  ret <16 x half> %ldexp198}199