brintos

brintos / llvm-project-archived public Read only

0
0
Text · 45.7 KiB · 47763c6 Raw
1343 lines · plain
1! RUN: %flang_fc1 -flang-experimental-hlfir -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefixes="LLVMIR","LLVMIR-LE" %s2! RUN: %flang_fc1 -flang-experimental-hlfir -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefixes="LLVMIR","LLVMIR-BE" %s3! REQUIRES: target=powerpc{{.*}}4 5!---------6! vec_ctf7!---------8! CHECK-LABEL: vec_ctf_test_i4i19subroutine vec_ctf_test_i4i1(arg1)10  vector(integer(4)), intent(in) :: arg111  vector(real(4)) :: r12  r = vec_ctf(arg1, 1_1)13 14! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %{{.*}}, align 1615! LLVMIR: %[[r:.*]] = call contract <4 x float> @llvm.ppc.altivec.vcfsx(<4 x i32> %[[arg1]], i32 1)16! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 1617end subroutine vec_ctf_test_i4i118 19! CHECK-LABEL: vec_ctf_test_i4i220subroutine vec_ctf_test_i4i2(arg1)21  vector(integer(4)), intent(in) :: arg122  vector(real(4)) :: r23  r = vec_ctf(arg1, 1_2)24 25! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %{{.*}}, align 1626! LLVMIR: %[[r:.*]] = call contract <4 x float> @llvm.ppc.altivec.vcfsx(<4 x i32> %[[arg1]], i32 1)27! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 1628end subroutine vec_ctf_test_i4i229 30! CHECK-LABEL: vec_ctf_test_i4i431subroutine vec_ctf_test_i4i4(arg1)32  vector(integer(4)), intent(in) :: arg133  vector(real(4)) :: r34  r = vec_ctf(arg1, 1_4)35 36! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %{{.*}}, align 1637! LLVMIR: %[[r:.*]] = call contract <4 x float> @llvm.ppc.altivec.vcfsx(<4 x i32> %[[arg1]], i32 1)38! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 1639end subroutine vec_ctf_test_i4i440 41! CHECK-LABEL: vec_ctf_test_i4i842subroutine vec_ctf_test_i4i8(arg1)43  vector(integer(4)), intent(in) :: arg144  vector(real(4)) :: r45  r = vec_ctf(arg1, 1_8)46 47! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %{{.*}}, align 1648! LLVMIR: %[[r:.*]] = call contract <4 x float> @llvm.ppc.altivec.vcfsx(<4 x i32> %[[arg1]], i32 1)49! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 1650end subroutine vec_ctf_test_i4i851 52! CHECK-LABEL: vec_ctf_test_i8i153subroutine vec_ctf_test_i8i1(arg1)54  vector(integer(8)), intent(in) :: arg155  vector(real(8)) :: r56  r = vec_ctf(arg1, 3_1)57 58! LLVMIR: %[[arg1:.*]] = load <2 x i64>, ptr %{{.*}}, align 1659! LLVMIR: %[[carg:.*]] = sitofp <2 x i64> %[[arg1]] to <2 x double>60! LLVMIR: %[[r:.*]] = fmul <2 x double> %[[carg]], splat (double 1.250000e-01)61! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 1662end subroutine vec_ctf_test_i8i163 64! CHECK-LABEL: vec_ctf_test_i8i265subroutine vec_ctf_test_i8i2(arg1)66  vector(integer(8)), intent(in) :: arg167  vector(real(8)) :: r68  r = vec_ctf(arg1, 3_2)69 70! LLVMIR: %[[arg1:.*]] = load <2 x i64>, ptr %{{.*}}, align 1671! LLVMIR: %[[carg:.*]] = sitofp <2 x i64> %[[arg1]] to <2 x double>72! LLVMIR: %[[r:.*]] = fmul <2 x double> %[[carg]], splat (double 1.250000e-01)73! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 1674end subroutine vec_ctf_test_i8i275 76! CHECK-LABEL: vec_ctf_test_i8i477subroutine vec_ctf_test_i8i4(arg1)78  vector(integer(8)), intent(in) :: arg179  vector(real(8)) :: r80  r = vec_ctf(arg1, 3_4)81 82! LLVMIR: %[[arg1:.*]] = load <2 x i64>, ptr %{{.*}}, align 1683! LLVMIR: %[[carg:.*]] = sitofp <2 x i64> %[[arg1]] to <2 x double>84! LLVMIR: %[[r:.*]] = fmul <2 x double> %[[carg]], splat (double 1.250000e-01)85! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 1686end subroutine vec_ctf_test_i8i487 88! CHECK-LABEL: vec_ctf_test_i8i889subroutine vec_ctf_test_i8i8(arg1)90  vector(integer(8)), intent(in) :: arg191  vector(real(8)) :: r92  r = vec_ctf(arg1, 3_8)93 94! LLVMIR: %[[arg1:.*]] = load <2 x i64>, ptr %{{.*}}, align 1695! LLVMIR: %[[carg:.*]] = sitofp <2 x i64> %[[arg1]] to <2 x double>96! LLVMIR: %[[r:.*]] = fmul <2 x double> %[[carg]], splat (double 1.250000e-01)97! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 1698end subroutine vec_ctf_test_i8i899 100! CHECK-LABEL: vec_ctf_test_u4i1101subroutine vec_ctf_test_u4i1(arg1)102  vector(unsigned(4)), intent(in) :: arg1103  vector(real(4)) :: r104  r = vec_ctf(arg1, 1_1)105 106! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %{{.*}}, align 16107! LLVMIR: %[[r:.*]] = call contract <4 x float> @llvm.ppc.altivec.vcfux(<4 x i32> %[[arg1]], i32 1)108! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16109end subroutine vec_ctf_test_u4i1110 111! CHECK-LABEL: vec_ctf_test_u4i2112subroutine vec_ctf_test_u4i2(arg1)113  vector(unsigned(4)), intent(in) :: arg1114  vector(real(4)) :: r115  r = vec_ctf(arg1, 1_2)116 117! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %{{.*}}, align 16118! LLVMIR: %[[r:.*]] = call contract <4 x float> @llvm.ppc.altivec.vcfux(<4 x i32> %[[arg1]], i32 1)119! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16120end subroutine vec_ctf_test_u4i2121 122! CHECK-LABEL: vec_ctf_test_u4i4123subroutine vec_ctf_test_u4i4(arg1)124  vector(unsigned(4)), intent(in) :: arg1125  vector(real(4)) :: r126  r = vec_ctf(arg1, 1_4)127 128! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %{{.*}}, align 16129! LLVMIR: %[[r:.*]] = call contract <4 x float> @llvm.ppc.altivec.vcfux(<4 x i32> %[[arg1]], i32 1)130! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16131end subroutine vec_ctf_test_u4i4132 133! CHECK-LABEL: vec_ctf_test_u4i8134subroutine vec_ctf_test_u4i8(arg1)135  vector(unsigned(4)), intent(in) :: arg1136  vector(real(4)) :: r137  r = vec_ctf(arg1, 1_8)138 139! LLVMIR: %[[arg1:.*]] = load <4 x i32>, ptr %{{.*}}, align 16140! LLVMIR: %[[r:.*]] = call contract <4 x float> @llvm.ppc.altivec.vcfux(<4 x i32> %[[arg1]], i32 1)141! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16142end subroutine vec_ctf_test_u4i8143 144! CHECK-LABEL: vec_ctf_test_u8i1145subroutine vec_ctf_test_u8i1(arg1)146  vector(unsigned(8)), intent(in) :: arg1147  vector(real(8)) :: r148  r = vec_ctf(arg1, 3_1)149 150! LLVMIR: %[[arg1:.*]] = load <2 x i64>, ptr %{{.*}}, align 16151! LLVMIR: %[[carg:.*]] = uitofp <2 x i64> %[[arg1]] to <2 x double>152! LLVMIR: %[[r:.*]] = fmul <2 x double> %[[carg]], splat (double 1.250000e-01)153! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16154end subroutine vec_ctf_test_u8i1155 156! CHECK-LABEL: vec_ctf_test_u8i2157subroutine vec_ctf_test_u8i2(arg1)158  vector(unsigned(8)), intent(in) :: arg1159  vector(real(8)) :: r160  r = vec_ctf(arg1, 3_2)161 162! LLVMIR: %[[arg1:.*]] = load <2 x i64>, ptr %{{.*}}, align 16163! LLVMIR: %[[carg:.*]] = uitofp <2 x i64> %[[arg1]] to <2 x double>164! LLVMIR: %[[r:.*]] = fmul <2 x double> %[[carg]], splat (double 1.250000e-01)165! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16166end subroutine vec_ctf_test_u8i2167 168! CHECK-LABEL: vec_ctf_test_u8i4169subroutine vec_ctf_test_u8i4(arg1)170  vector(unsigned(8)), intent(in) :: arg1171  vector(real(8)) :: r172  r = vec_ctf(arg1, 3_4)173 174! LLVMIR: %[[arg1:.*]] = load <2 x i64>, ptr %{{.*}}, align 16175! LLVMIR: %[[carg:.*]] = uitofp <2 x i64> %[[arg1]] to <2 x double>176! LLVMIR: %[[r:.*]] = fmul <2 x double> %[[carg]], splat (double 1.250000e-01)177! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16178end subroutine vec_ctf_test_u8i4179 180! CHECK-LABEL: vec_ctf_test_u8i8181subroutine vec_ctf_test_u8i8(arg1)182  vector(unsigned(8)), intent(in) :: arg1183  vector(real(8)) :: r184  r = vec_ctf(arg1, 3_8)185 186! LLVMIR: %[[arg1:.*]] = load <2 x i64>, ptr %{{.*}}, align 16187! LLVMIR: %[[carg:.*]] = uitofp <2 x i64> %[[arg1]] to <2 x double>188! LLVMIR: %[[r:.*]] = fmul <2 x double> %[[carg]], splat (double 1.250000e-01)189! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16190end subroutine vec_ctf_test_u8i8191 192!-------------193! vec_convert194!-------------195! CHECK-LABEL: vec_convert_test_i1i1196subroutine vec_convert_test_i1i1(v, mold)197  vector(integer(1)) :: v198  vector(integer(1)) :: mold, r199  r = vec_convert(v, mold)200 201! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16202! LLVMIR: store <16 x i8> %[[v]], ptr %{{.*}}, align 16203end subroutine vec_convert_test_i1i1204 205! CHECK-LABEL: vec_convert_test_i1i2206subroutine vec_convert_test_i1i2(v, mold)207  vector(integer(1)) :: v208  vector(integer(2)) :: mold, r209  r = vec_convert(v, mold)210 211! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16212! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <8 x i16>213! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16214end subroutine vec_convert_test_i1i2215 216! CHECK-LABEL: vec_convert_test_i1i4217subroutine vec_convert_test_i1i4(v, mold)218  vector(integer(1)) :: v219  vector(integer(4)) :: mold, r220  r = vec_convert(v, mold)221 222! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16223! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <4 x i32>224! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16225end subroutine vec_convert_test_i1i4226 227! CHECK-LABEL: vec_convert_test_i1i8228subroutine vec_convert_test_i1i8(v, mold)229  vector(integer(1)) :: v230  vector(integer(8)) :: mold, r231  r = vec_convert(v, mold)232 233! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16234! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <2 x i64>235! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16236end subroutine vec_convert_test_i1i8237 238! CHECK-LABEL: vec_convert_test_i1u1239subroutine vec_convert_test_i1u1(v, mold)240  vector(integer(1)) :: v241  vector(unsigned(1)) :: mold, r242  r = vec_convert(v, mold)243 244! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16245! LLVMIR: store <16 x i8> %[[v]], ptr %{{.*}}, align 16246end subroutine vec_convert_test_i1u1247 248! CHECK-LABEL: vec_convert_test_i1u2249subroutine vec_convert_test_i1u2(v, mold)250  vector(integer(1)) :: v251  vector(unsigned(2)) :: mold, r252  r = vec_convert(v, mold)253 254! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16255! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <8 x i16>256! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16257end subroutine vec_convert_test_i1u2258 259! CHECK-LABEL: vec_convert_test_i1u4260subroutine vec_convert_test_i1u4(v, mold)261  vector(integer(1)) :: v262  vector(unsigned(4)) :: mold, r263  r = vec_convert(v, mold)264 265! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16266! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <4 x i32>267! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16268end subroutine vec_convert_test_i1u4269 270! CHECK-LABEL: vec_convert_test_i1u8271subroutine vec_convert_test_i1u8(v, mold)272  vector(integer(1)) :: v273  vector(unsigned(8)) :: mold, r274  r = vec_convert(v, mold)275 276! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16277! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <2 x i64>278! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16279end subroutine vec_convert_test_i1u8280 281! CHECK-LABEL: vec_convert_test_i1r4282subroutine vec_convert_test_i1r4(v, mold)283  vector(integer(1)) :: v284  vector(real(4)) :: mold, r285  r = vec_convert(v, mold)286 287! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16288! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <4 x float>289! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16290end subroutine vec_convert_test_i1r4291 292! CHECK-LABEL: vec_convert_test_i1r8293subroutine vec_convert_test_i1r8(v, mold)294  vector(integer(1)) :: v295  vector(real(8)) :: mold, r296  r = vec_convert(v, mold)297 298! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16299! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <2 x double>300! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16301end subroutine vec_convert_test_i1r8302 303! CHECK-LABEL: vec_convert_test_i2i1304subroutine vec_convert_test_i2i1(v, mold)305  vector(integer(2)) :: v306  vector(integer(1)) :: mold, r307  r = vec_convert(v, mold)308 309! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16310! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <16 x i8>311! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16312end subroutine vec_convert_test_i2i1313 314! CHECK-LABEL: vec_convert_test_i2i2315subroutine vec_convert_test_i2i2(v, mold)316  vector(integer(2)) :: v317  vector(integer(2)) :: mold, r318  r = vec_convert(v, mold)319 320! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16321! LLVMIR: store <8 x i16> %[[v]], ptr %{{.*}}, align 16322end subroutine vec_convert_test_i2i2323 324! CHECK-LABEL: vec_convert_test_i2i4325subroutine vec_convert_test_i2i4(v, mold)326  vector(integer(2)) :: v327  vector(integer(4)) :: mold, r328  r = vec_convert(v, mold)329 330! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16331! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <4 x i32>332! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16333end subroutine vec_convert_test_i2i4334 335! CHECK-LABEL: vec_convert_test_i2i8336subroutine vec_convert_test_i2i8(v, mold)337  vector(integer(2)) :: v338  vector(integer(8)) :: mold, r339  r = vec_convert(v, mold)340 341! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16342! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <2 x i64>343! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16344end subroutine vec_convert_test_i2i8345 346! CHECK-LABEL: vec_convert_test_i2u1347subroutine vec_convert_test_i2u1(v, mold)348  vector(integer(2)) :: v349  vector(unsigned(1)) :: mold, r350  r = vec_convert(v, mold)351 352! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16353! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <16 x i8>354! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16355end subroutine vec_convert_test_i2u1356 357! CHECK-LABEL: vec_convert_test_i2u2358subroutine vec_convert_test_i2u2(v, mold)359  vector(integer(2)) :: v360  vector(unsigned(2)) :: mold, r361  r = vec_convert(v, mold)362 363! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16364! LLVMIR: store <8 x i16> %[[v]], ptr %{{.*}}, align 16365end subroutine vec_convert_test_i2u2366 367! CHECK-LABEL: vec_convert_test_i2u4368subroutine vec_convert_test_i2u4(v, mold)369  vector(integer(2)) :: v370  vector(unsigned(4)) :: mold, r371  r = vec_convert(v, mold)372 373! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16374! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <4 x i32>375! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16376end subroutine vec_convert_test_i2u4377 378! CHECK-LABEL: vec_convert_test_i2u8379subroutine vec_convert_test_i2u8(v, mold)380  vector(integer(2)) :: v381  vector(unsigned(8)) :: mold, r382  r = vec_convert(v, mold)383 384! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16385! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <2 x i64>386! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16387end subroutine vec_convert_test_i2u8388 389! CHECK-LABEL: vec_convert_test_i2r4390subroutine vec_convert_test_i2r4(v, mold)391  vector(integer(2)) :: v392  vector(real(4)) :: mold, r393  r = vec_convert(v, mold)394 395! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16396! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <4 x float>397! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16398end subroutine vec_convert_test_i2r4399 400! CHECK-LABEL: vec_convert_test_i2r8401subroutine vec_convert_test_i2r8(v, mold)402  vector(integer(2)) :: v403  vector(real(8)) :: mold, r404  r = vec_convert(v, mold)405 406! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16407! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <2 x double>408! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16409end subroutine vec_convert_test_i2r8410 411! CHECK-LABEL: vec_convert_test_i4i1412subroutine vec_convert_test_i4i1(v, mold)413  vector(integer(4)) :: v414  vector(integer(1)) :: mold, r415  r = vec_convert(v, mold)416 417! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16418! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <16 x i8>419! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16420end subroutine vec_convert_test_i4i1421 422! CHECK-LABEL: vec_convert_test_i4i2423subroutine vec_convert_test_i4i2(v, mold)424  vector(integer(4)) :: v425  vector(integer(2)) :: mold, r426  r = vec_convert(v, mold)427 428! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16429! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <8 x i16>430! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16431end subroutine vec_convert_test_i4i2432 433! CHECK-LABEL: vec_convert_test_i4i4434subroutine vec_convert_test_i4i4(v, mold)435  vector(integer(4)) :: v436  vector(integer(4)) :: mold, r437  r = vec_convert(v, mold)438 439! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16440! LLVMIR: store <4 x i32> %[[v]], ptr %{{.*}}, align 16441end subroutine vec_convert_test_i4i4442 443! CHECK-LABEL: vec_convert_test_i4i8444subroutine vec_convert_test_i4i8(v, mold)445  vector(integer(4)) :: v446  vector(integer(8)) :: mold, r447  r = vec_convert(v, mold)448 449! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16450! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <2 x i64>451! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16452end subroutine vec_convert_test_i4i8453 454! CHECK-LABEL: vec_convert_test_i4u1455subroutine vec_convert_test_i4u1(v, mold)456  vector(integer(4)) :: v457  vector(unsigned(1)) :: mold, r458  r = vec_convert(v, mold)459 460! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16461! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <16 x i8>462! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16463end subroutine vec_convert_test_i4u1464 465! CHECK-LABEL: vec_convert_test_i4u2466subroutine vec_convert_test_i4u2(v, mold)467  vector(integer(4)) :: v468  vector(unsigned(2)) :: mold, r469  r = vec_convert(v, mold)470 471! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16472! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <8 x i16>473! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16474end subroutine vec_convert_test_i4u2475 476! CHECK-LABEL: vec_convert_test_i4u4477subroutine vec_convert_test_i4u4(v, mold)478  vector(integer(4)) :: v479  vector(unsigned(4)) :: mold, r480  r = vec_convert(v, mold)481 482! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16483! LLVMIR: store <4 x i32> %[[v]], ptr %{{.*}}, align 16484end subroutine vec_convert_test_i4u4485 486! CHECK-LABEL: vec_convert_test_i4u8487subroutine vec_convert_test_i4u8(v, mold)488  vector(integer(4)) :: v489  vector(unsigned(8)) :: mold, r490  r = vec_convert(v, mold)491 492! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16493! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <2 x i64>494! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16495end subroutine vec_convert_test_i4u8496 497! CHECK-LABEL: vec_convert_test_i4r4498subroutine vec_convert_test_i4r4(v, mold)499  vector(integer(4)) :: v500  vector(real(4)) :: mold, r501  r = vec_convert(v, mold)502 503! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16504! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <4 x float>505! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16506end subroutine vec_convert_test_i4r4507 508! CHECK-LABEL: vec_convert_test_i4r8509subroutine vec_convert_test_i4r8(v, mold)510  vector(integer(4)) :: v511  vector(real(8)) :: mold, r512  r = vec_convert(v, mold)513 514! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16515! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <2 x double>516! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16517end subroutine vec_convert_test_i4r8518 519! CHECK-LABEL: vec_convert_test_i8i1520subroutine vec_convert_test_i8i1(v, mold)521  vector(integer(8)) :: v522  vector(integer(1)) :: mold, r523  r = vec_convert(v, mold)524 525! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16526! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <16 x i8>527! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16528end subroutine vec_convert_test_i8i1529 530! CHECK-LABEL: vec_convert_test_i8i2531subroutine vec_convert_test_i8i2(v, mold)532  vector(integer(8)) :: v533  vector(integer(2)) :: mold, r534  r = vec_convert(v, mold)535 536! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16537! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <8 x i16>538! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16539end subroutine vec_convert_test_i8i2540 541! CHECK-LABEL: vec_convert_test_i8i4542subroutine vec_convert_test_i8i4(v, mold)543  vector(integer(8)) :: v544  vector(integer(4)) :: mold, r545  r = vec_convert(v, mold)546 547! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16548! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <4 x i32>549! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16550end subroutine vec_convert_test_i8i4551 552! CHECK-LABEL: vec_convert_test_i8i8553subroutine vec_convert_test_i8i8(v, mold)554  vector(integer(8)) :: v555  vector(integer(8)) :: mold, r556  r = vec_convert(v, mold)557 558! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16559! LLVMIR: store <2 x i64> %[[v]], ptr %{{.*}}, align 16560end subroutine vec_convert_test_i8i8561 562! CHECK-LABEL: vec_convert_test_i8u1563subroutine vec_convert_test_i8u1(v, mold)564  vector(integer(8)) :: v565  vector(unsigned(1)) :: mold, r566  r = vec_convert(v, mold)567 568! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16569! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <16 x i8>570! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16571end subroutine vec_convert_test_i8u1572 573! CHECK-LABEL: vec_convert_test_i8u2574subroutine vec_convert_test_i8u2(v, mold)575  vector(integer(8)) :: v576  vector(unsigned(2)) :: mold, r577  r = vec_convert(v, mold)578 579! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16580! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <8 x i16>581! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16582end subroutine vec_convert_test_i8u2583 584! CHECK-LABEL: vec_convert_test_i8u4585subroutine vec_convert_test_i8u4(v, mold)586  vector(integer(8)) :: v587  vector(unsigned(4)) :: mold, r588  r = vec_convert(v, mold)589 590! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16591! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <4 x i32>592! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16593end subroutine vec_convert_test_i8u4594 595! CHECK-LABEL: vec_convert_test_i8u8596subroutine vec_convert_test_i8u8(v, mold)597  vector(integer(8)) :: v598  vector(unsigned(8)) :: mold, r599  r = vec_convert(v, mold)600 601! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16602! LLVMIR: store <2 x i64> %[[v]], ptr %{{.*}}, align 16603end subroutine vec_convert_test_i8u8604 605! CHECK-LABEL: vec_convert_test_i8r4606subroutine vec_convert_test_i8r4(v, mold)607  vector(integer(8)) :: v608  vector(real(4)) :: mold, r609  r = vec_convert(v, mold)610 611! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16612! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <4 x float>613! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16614end subroutine vec_convert_test_i8r4615 616! CHECK-LABEL: vec_convert_test_i8r8617subroutine vec_convert_test_i8r8(v, mold)618  vector(integer(8)) :: v619  vector(real(8)) :: mold, r620  r = vec_convert(v, mold)621 622! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16623! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <2 x double>624! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16625end subroutine vec_convert_test_i8r8626 627! CHECK-LABEL: vec_convert_test_u1i1628subroutine vec_convert_test_u1i1(v, mold)629  vector(unsigned(1)) :: v630  vector(integer(1)) :: mold, r631  r = vec_convert(v, mold)632 633! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16634! LLVMIR: store <16 x i8> %[[v]], ptr %{{.*}}, align 16635end subroutine vec_convert_test_u1i1636 637! CHECK-LABEL: vec_convert_test_u1i2638subroutine vec_convert_test_u1i2(v, mold)639  vector(unsigned(1)) :: v640  vector(integer(2)) :: mold, r641  r = vec_convert(v, mold)642 643! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16644! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <8 x i16>645! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16646end subroutine vec_convert_test_u1i2647 648! CHECK-LABEL: vec_convert_test_u1i4649subroutine vec_convert_test_u1i4(v, mold)650  vector(unsigned(1)) :: v651  vector(integer(4)) :: mold, r652  r = vec_convert(v, mold)653 654! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16655! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <4 x i32>656! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16657end subroutine vec_convert_test_u1i4658 659! CHECK-LABEL: vec_convert_test_u1i8660subroutine vec_convert_test_u1i8(v, mold)661  vector(unsigned(1)) :: v662  vector(integer(8)) :: mold, r663  r = vec_convert(v, mold)664 665! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16666! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <2 x i64>667! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16668end subroutine vec_convert_test_u1i8669 670! CHECK-LABEL: vec_convert_test_u1u1671subroutine vec_convert_test_u1u1(v, mold)672  vector(unsigned(1)) :: v673  vector(unsigned(1)) :: mold, r674  r = vec_convert(v, mold)675 676! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16677! LLVMIR: store <16 x i8> %[[v]], ptr %{{.*}}, align 16678end subroutine vec_convert_test_u1u1679 680! CHECK-LABEL: vec_convert_test_u1u2681subroutine vec_convert_test_u1u2(v, mold)682  vector(unsigned(1)) :: v683  vector(unsigned(2)) :: mold, r684  r = vec_convert(v, mold)685 686! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16687! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <8 x i16>688! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16689end subroutine vec_convert_test_u1u2690 691! CHECK-LABEL: vec_convert_test_u1u4692subroutine vec_convert_test_u1u4(v, mold)693  vector(unsigned(1)) :: v694  vector(unsigned(4)) :: mold, r695  r = vec_convert(v, mold)696 697! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16698! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <4 x i32>699! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16700end subroutine vec_convert_test_u1u4701 702! CHECK-LABEL: vec_convert_test_u1u8703subroutine vec_convert_test_u1u8(v, mold)704  vector(unsigned(1)) :: v705  vector(unsigned(8)) :: mold, r706  r = vec_convert(v, mold)707 708! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16709! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <2 x i64>710! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16711end subroutine vec_convert_test_u1u8712 713! CHECK-LABEL: vec_convert_test_u1r4714subroutine vec_convert_test_u1r4(v, mold)715  vector(unsigned(1)) :: v716  vector(real(4)) :: mold, r717  r = vec_convert(v, mold)718 719! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16720! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <4 x float>721! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16722end subroutine vec_convert_test_u1r4723 724! CHECK-LABEL: vec_convert_test_u1r8725subroutine vec_convert_test_u1r8(v, mold)726  vector(unsigned(1)) :: v727  vector(real(8)) :: mold, r728  r = vec_convert(v, mold)729 730! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %0, align 16731! LLVMIR: %[[r:.*]] = bitcast <16 x i8> %[[v]] to <2 x double>732! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16733end subroutine vec_convert_test_u1r8734 735! CHECK-LABEL: vec_convert_test_u2i1736subroutine vec_convert_test_u2i1(v, mold)737  vector(unsigned(2)) :: v738  vector(integer(1)) :: mold, r739  r = vec_convert(v, mold)740 741! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16742! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <16 x i8>743! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16744end subroutine vec_convert_test_u2i1745 746! CHECK-LABEL: vec_convert_test_u2i2747subroutine vec_convert_test_u2i2(v, mold)748  vector(unsigned(2)) :: v749  vector(integer(2)) :: mold, r750  r = vec_convert(v, mold)751 752! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16753! LLVMIR: store <8 x i16> %[[v]], ptr %{{.*}}, align 16754end subroutine vec_convert_test_u2i2755 756! CHECK-LABEL: vec_convert_test_u2i4757subroutine vec_convert_test_u2i4(v, mold)758  vector(unsigned(2)) :: v759  vector(integer(4)) :: mold, r760  r = vec_convert(v, mold)761 762! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16763! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <4 x i32>764! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16765end subroutine vec_convert_test_u2i4766 767! CHECK-LABEL: vec_convert_test_u2i8768subroutine vec_convert_test_u2i8(v, mold)769  vector(unsigned(2)) :: v770  vector(integer(8)) :: mold, r771  r = vec_convert(v, mold)772 773! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16774! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <2 x i64>775! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16776end subroutine vec_convert_test_u2i8777 778! CHECK-LABEL: vec_convert_test_u2u1779subroutine vec_convert_test_u2u1(v, mold)780  vector(unsigned(2)) :: v781  vector(unsigned(1)) :: mold, r782  r = vec_convert(v, mold)783 784! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16785! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <16 x i8>786! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16787end subroutine vec_convert_test_u2u1788 789! CHECK-LABEL: vec_convert_test_u2u2790subroutine vec_convert_test_u2u2(v, mold)791  vector(unsigned(2)) :: v792  vector(unsigned(2)) :: mold, r793  r = vec_convert(v, mold)794 795! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16796! LLVMIR: store <8 x i16> %[[v]], ptr %{{.*}}, align 16797end subroutine vec_convert_test_u2u2798 799! CHECK-LABEL: vec_convert_test_u2u4800subroutine vec_convert_test_u2u4(v, mold)801  vector(unsigned(2)) :: v802  vector(unsigned(4)) :: mold, r803  r = vec_convert(v, mold)804 805! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16806! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <4 x i32>807! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16808end subroutine vec_convert_test_u2u4809 810! CHECK-LABEL: vec_convert_test_u2u8811subroutine vec_convert_test_u2u8(v, mold)812  vector(unsigned(2)) :: v813  vector(unsigned(8)) :: mold, r814  r = vec_convert(v, mold)815 816! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16817! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <2 x i64>818! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16819end subroutine vec_convert_test_u2u8820 821! CHECK-LABEL: vec_convert_test_u2r4822subroutine vec_convert_test_u2r4(v, mold)823  vector(unsigned(2)) :: v824  vector(real(4)) :: mold, r825  r = vec_convert(v, mold)826 827! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16828! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <4 x float>829! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16830end subroutine vec_convert_test_u2r4831 832! CHECK-LABEL: vec_convert_test_u2r8833subroutine vec_convert_test_u2r8(v, mold)834  vector(unsigned(2)) :: v835  vector(real(8)) :: mold, r836  r = vec_convert(v, mold)837 838! LLVMIR: %[[v:.*]] = load <8 x i16>, ptr %0, align 16839! LLVMIR: %[[r:.*]] = bitcast <8 x i16> %[[v]] to <2 x double>840! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16841end subroutine vec_convert_test_u2r8842 843! CHECK-LABEL: vec_convert_test_u4i1844subroutine vec_convert_test_u4i1(v, mold)845  vector(unsigned(4)) :: v846  vector(integer(1)) :: mold, r847  r = vec_convert(v, mold)848 849! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16850! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <16 x i8>851! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16852end subroutine vec_convert_test_u4i1853 854! CHECK-LABEL: vec_convert_test_u4i2855subroutine vec_convert_test_u4i2(v, mold)856  vector(unsigned(4)) :: v857  vector(integer(2)) :: mold, r858  r = vec_convert(v, mold)859 860! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16861! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <8 x i16>862! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16863end subroutine vec_convert_test_u4i2864 865! CHECK-LABEL: vec_convert_test_u4i4866subroutine vec_convert_test_u4i4(v, mold)867  vector(unsigned(4)) :: v868  vector(integer(4)) :: mold, r869  r = vec_convert(v, mold)870 871! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16872! LLVMIR: store <4 x i32> %[[v]], ptr %{{.*}}, align 16873end subroutine vec_convert_test_u4i4874 875! CHECK-LABEL: vec_convert_test_u4i8876subroutine vec_convert_test_u4i8(v, mold)877  vector(unsigned(4)) :: v878  vector(integer(8)) :: mold, r879  r = vec_convert(v, mold)880 881! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16882! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <2 x i64>883! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16884end subroutine vec_convert_test_u4i8885 886! CHECK-LABEL: vec_convert_test_u4u1887subroutine vec_convert_test_u4u1(v, mold)888  vector(unsigned(4)) :: v889  vector(unsigned(1)) :: mold, r890  r = vec_convert(v, mold)891 892! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16893! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <16 x i8>894! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16895end subroutine vec_convert_test_u4u1896 897! CHECK-LABEL: vec_convert_test_u4u2898subroutine vec_convert_test_u4u2(v, mold)899  vector(unsigned(4)) :: v900  vector(unsigned(2)) :: mold, r901  r = vec_convert(v, mold)902 903! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16904! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <8 x i16>905! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16906end subroutine vec_convert_test_u4u2907 908! CHECK-LABEL: vec_convert_test_u4u4909subroutine vec_convert_test_u4u4(v, mold)910  vector(unsigned(4)) :: v911  vector(unsigned(4)) :: mold, r912  r = vec_convert(v, mold)913 914! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16915! LLVMIR: store <4 x i32> %[[v]], ptr %{{.*}}, align 16916end subroutine vec_convert_test_u4u4917 918! CHECK-LABEL: vec_convert_test_u4u8919subroutine vec_convert_test_u4u8(v, mold)920  vector(unsigned(4)) :: v921  vector(unsigned(8)) :: mold, r922  r = vec_convert(v, mold)923 924! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16925! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <2 x i64>926! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 16927end subroutine vec_convert_test_u4u8928 929! CHECK-LABEL: vec_convert_test_u4r4930subroutine vec_convert_test_u4r4(v, mold)931  vector(unsigned(4)) :: v932  vector(real(4)) :: mold, r933  r = vec_convert(v, mold)934 935! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16936! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <4 x float>937! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 16938end subroutine vec_convert_test_u4r4939 940! CHECK-LABEL: vec_convert_test_u4r8941subroutine vec_convert_test_u4r8(v, mold)942  vector(unsigned(4)) :: v943  vector(real(8)) :: mold, r944  r = vec_convert(v, mold)945 946! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %0, align 16947! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <2 x double>948! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 16949end subroutine vec_convert_test_u4r8950 951! CHECK-LABEL: vec_convert_test_u8i1952subroutine vec_convert_test_u8i1(v, mold)953  vector(unsigned(8)) :: v954  vector(integer(1)) :: mold, r955  r = vec_convert(v, mold)956 957! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16958! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <16 x i8>959! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 16960end subroutine vec_convert_test_u8i1961 962! CHECK-LABEL: vec_convert_test_u8i2963subroutine vec_convert_test_u8i2(v, mold)964  vector(unsigned(8)) :: v965  vector(integer(2)) :: mold, r966  r = vec_convert(v, mold)967 968! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16969! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <8 x i16>970! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 16971end subroutine vec_convert_test_u8i2972 973! CHECK-LABEL: vec_convert_test_u8i4974subroutine vec_convert_test_u8i4(v, mold)975  vector(unsigned(8)) :: v976  vector(integer(4)) :: mold, r977  r = vec_convert(v, mold)978 979! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16980! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <4 x i32>981! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 16982end subroutine vec_convert_test_u8i4983 984! CHECK-LABEL: vec_convert_test_u8i8985subroutine vec_convert_test_u8i8(v, mold)986  vector(unsigned(8)) :: v987  vector(integer(8)) :: mold, r988  r = vec_convert(v, mold)989 990! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 16991! LLVMIR: store <2 x i64> %[[v]], ptr %{{.*}}, align 16992end subroutine vec_convert_test_u8i8993 994! CHECK-LABEL: vec_convert_test_u8u1995subroutine vec_convert_test_u8u1(v, mold)996  vector(unsigned(8)) :: v997  vector(unsigned(1)) :: mold, r998  r = vec_convert(v, mold)999 1000! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 161001! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <16 x i8>1002! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 161003end subroutine vec_convert_test_u8u11004 1005! CHECK-LABEL: vec_convert_test_u8u21006subroutine vec_convert_test_u8u2(v, mold)1007  vector(unsigned(8)) :: v1008  vector(unsigned(2)) :: mold, r1009  r = vec_convert(v, mold)1010 1011! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 161012! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <8 x i16>1013! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 161014end subroutine vec_convert_test_u8u21015 1016! CHECK-LABEL: vec_convert_test_u8u41017subroutine vec_convert_test_u8u4(v, mold)1018  vector(unsigned(8)) :: v1019  vector(unsigned(4)) :: mold, r1020  r = vec_convert(v, mold)1021 1022! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 161023! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <4 x i32>1024! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 161025end subroutine vec_convert_test_u8u41026 1027! CHECK-LABEL: vec_convert_test_u8u81028subroutine vec_convert_test_u8u8(v, mold)1029  vector(unsigned(8)) :: v1030  vector(unsigned(8)) :: mold, r1031  r = vec_convert(v, mold)1032 1033! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 161034! LLVMIR: store <2 x i64> %[[v]], ptr %{{.*}}, align 161035end subroutine vec_convert_test_u8u81036 1037! CHECK-LABEL: vec_convert_test_u8r41038subroutine vec_convert_test_u8r4(v, mold)1039  vector(unsigned(8)) :: v1040  vector(real(4)) :: mold, r1041  r = vec_convert(v, mold)1042 1043! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 161044! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <4 x float>1045! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 161046end subroutine vec_convert_test_u8r41047 1048! CHECK-LABEL: vec_convert_test_u8r81049subroutine vec_convert_test_u8r8(v, mold)1050  vector(unsigned(8)) :: v1051  vector(real(8)) :: mold, r1052  r = vec_convert(v, mold)1053 1054! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %0, align 161055! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <2 x double>1056! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 161057end subroutine vec_convert_test_u8r81058 1059! CHECK-LABEL: vec_convert_test_r4i11060subroutine vec_convert_test_r4i1(v, mold)1061  vector(real(4)) :: v1062  vector(integer(1)) :: mold, r1063  r = vec_convert(v, mold)1064 1065! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161066! LLVMIR: %[[r:.*]] = bitcast <4 x float> %[[v]] to <16 x i8>1067! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 161068end subroutine vec_convert_test_r4i11069 1070! CHECK-LABEL: vec_convert_test_r4i21071subroutine vec_convert_test_r4i2(v, mold)1072  vector(real(4)) :: v1073  vector(integer(2)) :: mold, r1074  r = vec_convert(v, mold)1075 1076! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161077! LLVMIR: %[[r:.*]] = bitcast <4 x float> %[[v]] to <8 x i16>1078! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 161079end subroutine vec_convert_test_r4i21080 1081! CHECK-LABEL: vec_convert_test_r4i41082subroutine vec_convert_test_r4i4(v, mold)1083  vector(real(4)) :: v1084  vector(integer(4)) :: mold, r1085  r = vec_convert(v, mold)1086 1087! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161088! LLVMIR: %[[r:.*]] = bitcast <4 x float> %[[v]] to <4 x i32>1089! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 161090end subroutine vec_convert_test_r4i41091 1092! CHECK-LABEL: vec_convert_test_r4i81093subroutine vec_convert_test_r4i8(v, mold)1094  vector(real(4)) :: v1095  vector(integer(8)) :: mold, r1096  r = vec_convert(v, mold)1097 1098! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161099! LLVMIR: %[[r:.*]] = bitcast <4 x float> %[[v]] to <2 x i64>1100! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 161101end subroutine vec_convert_test_r4i81102 1103! CHECK-LABEL: vec_convert_test_r4u11104subroutine vec_convert_test_r4u1(v, mold)1105  vector(real(4)) :: v1106  vector(unsigned(1)) :: mold, r1107  r = vec_convert(v, mold)1108 1109! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161110! LLVMIR: %[[r:.*]] = bitcast <4 x float> %[[v]] to <16 x i8>1111! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 161112end subroutine vec_convert_test_r4u11113 1114! CHECK-LABEL: vec_convert_test_r4u21115subroutine vec_convert_test_r4u2(v, mold)1116  vector(real(4)) :: v1117  vector(unsigned(2)) :: mold, r1118  r = vec_convert(v, mold)1119 1120! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161121! LLVMIR: %[[r:.*]] = bitcast <4 x float> %[[v]] to <8 x i16>1122! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 161123end subroutine vec_convert_test_r4u21124 1125! CHECK-LABEL: vec_convert_test_r4u41126subroutine vec_convert_test_r4u4(v, mold)1127  vector(real(4)) :: v1128  vector(unsigned(4)) :: mold, r1129  r = vec_convert(v, mold)1130 1131! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161132! LLVMIR: %[[r:.*]] = bitcast <4 x float> %[[v]] to <4 x i32>1133! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 161134end subroutine vec_convert_test_r4u41135 1136! CHECK-LABEL: vec_convert_test_r4u81137subroutine vec_convert_test_r4u8(v, mold)1138  vector(real(4)) :: v1139  vector(unsigned(8)) :: mold, r1140  r = vec_convert(v, mold)1141 1142! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161143! LLVMIR: %[[r:.*]] = bitcast <4 x float> %[[v]] to <2 x i64>1144! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 161145end subroutine vec_convert_test_r4u81146 1147! CHECK-LABEL: vec_convert_test_r4r41148subroutine vec_convert_test_r4r4(v, mold)1149  vector(real(4)) :: v1150  vector(real(4)) :: mold, r1151  r = vec_convert(v, mold)1152 1153! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161154! LLVMIR: store <4 x float> %[[v]], ptr %{{.*}}, align 161155end subroutine vec_convert_test_r4r41156 1157! CHECK-LABEL: vec_convert_test_r4r81158subroutine vec_convert_test_r4r8(v, mold)1159  vector(real(4)) :: v1160  vector(real(8)) :: mold, r1161  r = vec_convert(v, mold)1162 1163! LLVMIR: %[[v:.*]] = load <4 x float>, ptr %0, align 161164! LLVMIR: %[[r:.*]] = bitcast <4 x float> %[[v]] to <2 x double>1165! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 161166end subroutine vec_convert_test_r4r81167 1168! CHECK-LABEL: vec_convert_test_r8i11169subroutine vec_convert_test_r8i1(v, mold)1170  vector(real(8)) :: v1171  vector(integer(1)) :: mold, r1172  r = vec_convert(v, mold)1173 1174! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161175! LLVMIR: %[[r:.*]] = bitcast <2 x double> %[[v]] to <16 x i8>1176! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 161177end subroutine vec_convert_test_r8i11178 1179! CHECK-LABEL: vec_convert_test_r8i21180subroutine vec_convert_test_r8i2(v, mold)1181  vector(real(8)) :: v1182  vector(integer(2)) :: mold, r1183  r = vec_convert(v, mold)1184 1185! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161186! LLVMIR: %[[r:.*]] = bitcast <2 x double> %[[v]] to <8 x i16>1187! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 161188end subroutine vec_convert_test_r8i21189 1190! CHECK-LABEL: vec_convert_test_r8i41191subroutine vec_convert_test_r8i4(v, mold)1192  vector(real(8)) :: v1193  vector(integer(4)) :: mold, r1194  r = vec_convert(v, mold)1195 1196! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161197! LLVMIR: %[[r:.*]] = bitcast <2 x double> %[[v]] to <4 x i32>1198! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 161199end subroutine vec_convert_test_r8i41200 1201! CHECK-LABEL: vec_convert_test_r8i81202subroutine vec_convert_test_r8i8(v, mold)1203  vector(real(8)) :: v1204  vector(integer(8)) :: mold, r1205  r = vec_convert(v, mold)1206 1207! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161208! LLVMIR: %[[r:.*]] = bitcast <2 x double> %[[v]] to <2 x i64>1209! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 161210end subroutine vec_convert_test_r8i81211 1212! CHECK-LABEL: vec_convert_test_r8u11213subroutine vec_convert_test_r8u1(v, mold)1214  vector(real(8)) :: v1215  vector(unsigned(1)) :: mold, r1216  r = vec_convert(v, mold)1217 1218! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161219! LLVMIR: %[[r:.*]] = bitcast <2 x double> %[[v]] to <16 x i8>1220! LLVMIR: store <16 x i8> %[[r]], ptr %{{.*}}, align 161221end subroutine vec_convert_test_r8u11222 1223! CHECK-LABEL: vec_convert_test_r8u21224subroutine vec_convert_test_r8u2(v, mold)1225  vector(real(8)) :: v1226  vector(unsigned(2)) :: mold, r1227  r = vec_convert(v, mold)1228 1229! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161230! LLVMIR: %[[r:.*]] = bitcast <2 x double> %[[v]] to <8 x i16>1231! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 161232end subroutine vec_convert_test_r8u21233 1234! CHECK-LABEL: vec_convert_test_r8u41235subroutine vec_convert_test_r8u4(v, mold)1236  vector(real(8)) :: v1237  vector(unsigned(4)) :: mold, r1238  r = vec_convert(v, mold)1239 1240! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161241! LLVMIR: %[[r:.*]] = bitcast <2 x double> %[[v]] to <4 x i32>1242! LLVMIR: store <4 x i32> %[[r]], ptr %{{.*}}, align 161243end subroutine vec_convert_test_r8u41244 1245! CHECK-LABEL: vec_convert_test_r8u81246subroutine vec_convert_test_r8u8(v, mold)1247  vector(real(8)) :: v1248  vector(unsigned(8)) :: mold, r1249  r = vec_convert(v, mold)1250 1251! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161252! LLVMIR: %[[r:.*]] = bitcast <2 x double> %[[v]] to <2 x i64>1253! LLVMIR: store <2 x i64> %[[r]], ptr %{{.*}}, align 161254end subroutine vec_convert_test_r8u81255 1256! CHECK-LABEL: vec_convert_test_r8r41257subroutine vec_convert_test_r8r4(v, mold)1258  vector(real(8)) :: v1259  vector(real(4)) :: mold, r1260  r = vec_convert(v, mold)1261 1262! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161263! LLVMIR: %[[r:.*]] = bitcast <2 x double> %[[v]] to <4 x float>1264! LLVMIR: store <4 x float> %[[r]], ptr %{{.*}}, align 161265end subroutine vec_convert_test_r8r41266 1267! CHECK-LABEL: vec_convert_test_r8r81268subroutine vec_convert_test_r8r8(v, mold)1269  vector(real(8)) :: v1270  vector(real(8)) :: mold, r1271  r = vec_convert(v, mold)1272 1273! LLVMIR: %[[v:.*]] = load <2 x double>, ptr %0, align 161274! LLVMIR: store <2 x double> %[[v]], ptr %{{.*}}, align 161275end subroutine vec_convert_test_r8r81276 1277! CHECK-LABEL: vec_convert_test_i1i1_array1278subroutine vec_convert_test_i1i1_array(v, mold)1279  vector(integer(1)) :: v1280  vector(integer(1)) :: mold(4, 8), r1281  r = vec_convert(v, mold)1282 1283! LLVMIR: %[[v:.*]] = load <16 x i8>, ptr %{{.*}}, align 161284! LLVMIR: store <16 x i8> %[[v]], ptr %{{.*}}, align 161285end subroutine vec_convert_test_i1i1_array1286 1287! CHECK-LABEL: vec_convert_test_i4r8_array1288subroutine vec_convert_test_i4r8_array(v, mold)1289  vector(integer(4)) :: v1290  vector(real(8)) :: mold(2, 4, 8), r1291  r = vec_convert(v, mold)1292 1293! LLVMIR: %[[v:.*]] = load <4 x i32>, ptr %{{.*}}, align 161294! LLVMIR: %[[r:.*]] = bitcast <4 x i32> %[[v]] to <2 x double>1295! LLVMIR: store <2 x double> %[[r]], ptr %{{.*}}, align 161296end subroutine vec_convert_test_i4r8_array1297 1298! CHECK-LABEL: vec_convert_test_u8i2_array1299subroutine vec_convert_test_u8i2_array(v, mold)1300  vector(unsigned(8)) :: v1301  vector(integer(2)) :: mold(10), r1302  r = vec_convert(v, mold)1303 1304! LLVMIR: %[[v:.*]] = load <2 x i64>, ptr %{{.*}}, align 161305! LLVMIR: %[[r:.*]] = bitcast <2 x i64> %[[v]] to <8 x i16>1306! LLVMIR: store <8 x i16> %[[r]], ptr %{{.*}}, align 161307end subroutine vec_convert_test_u8i2_array1308 1309!---------1310! vec_cvf1311!---------1312! CHECK-LABEL: vec_cvf_test_r4r81313subroutine vec_cvf_test_r4r8(arg1)1314  vector(real(8)), intent(in) :: arg11315  vector(real(4)) :: r1316  r = vec_cvf(arg1)1317 1318! LLVMIR: %[[arg:.*]] = load <2 x double>, ptr %{{.*}}, align 161319! LLVMIR: %[[call:.*]] = call contract <4 x float> @llvm.ppc.vsx.xvcvdpsp(<2 x double> %[[arg]])1320! LLVMIR-LE: %[[b:.*]] = bitcast <4 x float> %[[call]] to <16 x i8>1321! LLVMIR-LE: %[[sh:.*]] = shufflevector <16 x i8> %[[b]], <16 x i8> %[[b]], <16 x i32> <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15, i32 8, i32 9, i32 10, i32 11>1322! LLVMIR-LE: %[[r:.*]] = bitcast <16 x i8> %[[sh]] to <4 x float>1323! LLVMIR-LE: store <4 x float> %[[r]], ptr %{{.*}}, align 161324! LLVMIR-BE: store <4 x float> %[[call]], ptr %{{.*}}, align 161325end subroutine vec_cvf_test_r4r81326 1327! CHECK-LABEL: vec_cvf_test_r8r41328subroutine vec_cvf_test_r8r4(arg1)1329  vector(real(4)), intent(in) :: arg11330  vector(real(8)) :: r1331  r = vec_cvf(arg1)1332 1333! LLVMIR: %[[arg:.*]] = load <4 x float>, ptr %{{.*}}, align 161334! LLVMIR-LE: %[[bfi:.*]] = bitcast <4 x float> %[[arg]] to <16 x i8>1335! LLVMIR-LE: %[[sh:.*]] = shufflevector <16 x i8> %[[bfi]], <16 x i8> %[[bfi]], <16 x i32> <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15, i32 8, i32 9, i32 10, i32 11>1336! LLVMIR-LE: %[[bif:.*]] = bitcast <16 x i8> %[[sh]] to <4 x float>1337! LLVMIR-LE: %[[r:.*]] = call contract <2 x double> @llvm.ppc.vsx.xvcvspdp(<4 x float> %[[bif]])1338! LLVMIR-LE: store <2 x double> %[[r]], ptr %{{.*}}, align 161339! LLVMIR-BE: %[[r:.*]] = call contract <2 x double> @llvm.ppc.vsx.xvcvspdp(<4 x float> %[[arg]])1340! LLVMIR-BE: store <2 x double> %[[call]], ptr %{{.*}}, align 161341end subroutine vec_cvf_test_r8r41342 1343