brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.6 KiB · 1291190 Raw
274 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mcpu=pwr9 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \3; RUN:    -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P9LE4; RUN: llc -mcpu=pwr9 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \5; RUN:    -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P9BE6; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \7; RUN:    -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P8LE8; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \9; RUN:    -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P8BE10 11; Function Attrs: norecurse nounwind readonly12define <2 x i64> @s2v_test1(ptr nocapture readonly %int32, <2 x i64> %vec)  {13; P9LE-LABEL: s2v_test1:14; P9LE:       # %bb.0: # %entry15; P9LE-NEXT:    lfiwax f0, 0, r316; P9LE-NEXT:    xxmrghd v2, v2, vs017; P9LE-NEXT:    blr18;19; P9BE-LABEL: s2v_test1:20; P9BE:       # %bb.0: # %entry21; P9BE-NEXT:    lfiwax f0, 0, r322; P9BE-NEXT:    xxpermdi v2, vs0, v2, 123; P9BE-NEXT:    blr24;25; P8LE-LABEL: s2v_test1:26; P8LE:       # %bb.0: # %entry27; P8LE-NEXT:    lfiwax f0, 0, r328; P8LE-NEXT:    xxmrghd v2, v2, vs029; P8LE-NEXT:    blr30;31; P8BE-LABEL: s2v_test1:32; P8BE:       # %bb.0: # %entry33; P8BE-NEXT:    lfiwax f0, 0, r334; P8BE-NEXT:    xxpermdi v2, vs0, v2, 135; P8BE-NEXT:    blr36 37 38 39entry:40  %0 = load i32, ptr %int32, align 441  %conv = sext i32 %0 to i6442  %vecins = insertelement <2 x i64> %vec, i64 %conv, i32 043  ret <2 x i64> %vecins44}45 46; Function Attrs: norecurse nounwind readonly47define <2 x i64> @s2v_test2(ptr nocapture readonly %int32, <2 x i64> %vec)  {48; P9LE-LABEL: s2v_test2:49; P9LE:       # %bb.0: # %entry50; P9LE-NEXT:    addi r3, r3, 451; P9LE-NEXT:    lfiwax f0, 0, r352; P9LE-NEXT:    xxmrghd v2, v2, vs053; P9LE-NEXT:    blr54;55; P9BE-LABEL: s2v_test2:56; P9BE:       # %bb.0: # %entry57; P9BE-NEXT:    addi r3, r3, 458; P9BE-NEXT:    lfiwax f0, 0, r359; P9BE-NEXT:    xxpermdi v2, vs0, v2, 160; P9BE-NEXT:    blr61;62; P8LE-LABEL: s2v_test2:63; P8LE:       # %bb.0: # %entry64; P8LE-NEXT:    addi r3, r3, 465; P8LE-NEXT:    lfiwax f0, 0, r366; P8LE-NEXT:    xxmrghd v2, v2, vs067; P8LE-NEXT:    blr68;69; P8BE-LABEL: s2v_test2:70; P8BE:       # %bb.0: # %entry71; P8BE-NEXT:    addi r3, r3, 472; P8BE-NEXT:    lfiwax f0, 0, r373; P8BE-NEXT:    xxpermdi v2, vs0, v2, 174; P8BE-NEXT:    blr75 76 77 78entry:79  %arrayidx = getelementptr inbounds i32, ptr %int32, i64 180  %0 = load i32, ptr %arrayidx, align 481  %conv = sext i32 %0 to i6482  %vecins = insertelement <2 x i64> %vec, i64 %conv, i32 083  ret <2 x i64> %vecins84}85 86; Function Attrs: norecurse nounwind readonly87define <2 x i64> @s2v_test3(ptr nocapture readonly %int32, <2 x i64> %vec, i32 signext %Idx)  {88; P9LE-LABEL: s2v_test3:89; P9LE:       # %bb.0: # %entry90; P9LE-NEXT:    sldi r4, r7, 291; P9LE-NEXT:    lfiwax f0, r3, r492; P9LE-NEXT:    xxmrghd v2, v2, vs093; P9LE-NEXT:    blr94;95; P9BE-LABEL: s2v_test3:96; P9BE:       # %bb.0: # %entry97; P9BE-NEXT:    sldi r4, r7, 298; P9BE-NEXT:    lfiwax f0, r3, r499; P9BE-NEXT:    xxpermdi v2, vs0, v2, 1100; P9BE-NEXT:    blr101;102; P8LE-LABEL: s2v_test3:103; P8LE:       # %bb.0: # %entry104; P8LE-NEXT:    sldi r4, r7, 2105; P8LE-NEXT:    lfiwax f0, r3, r4106; P8LE-NEXT:    xxmrghd v2, v2, vs0107; P8LE-NEXT:    blr108;109; P8BE-LABEL: s2v_test3:110; P8BE:       # %bb.0: # %entry111; P8BE-NEXT:    sldi r4, r7, 2112; P8BE-NEXT:    lfiwax f0, r3, r4113; P8BE-NEXT:    xxpermdi v2, vs0, v2, 1114; P8BE-NEXT:    blr115 116 117 118entry:119  %idxprom = sext i32 %Idx to i64120  %arrayidx = getelementptr inbounds i32, ptr %int32, i64 %idxprom121  %0 = load i32, ptr %arrayidx, align 4122  %conv = sext i32 %0 to i64123  %vecins = insertelement <2 x i64> %vec, i64 %conv, i32 0124  ret <2 x i64> %vecins125}126 127; Function Attrs: norecurse nounwind readonly128define <2 x i64> @s2v_test4(ptr nocapture readonly %int32, <2 x i64> %vec)  {129; P9LE-LABEL: s2v_test4:130; P9LE:       # %bb.0: # %entry131; P9LE-NEXT:    addi r3, r3, 4132; P9LE-NEXT:    lfiwax f0, 0, r3133; P9LE-NEXT:    xxmrghd v2, v2, vs0134; P9LE-NEXT:    blr135;136; P9BE-LABEL: s2v_test4:137; P9BE:       # %bb.0: # %entry138; P9BE-NEXT:    addi r3, r3, 4139; P9BE-NEXT:    lfiwax f0, 0, r3140; P9BE-NEXT:    xxpermdi v2, vs0, v2, 1141; P9BE-NEXT:    blr142;143; P8LE-LABEL: s2v_test4:144; P8LE:       # %bb.0: # %entry145; P8LE-NEXT:    addi r3, r3, 4146; P8LE-NEXT:    lfiwax f0, 0, r3147; P8LE-NEXT:    xxmrghd v2, v2, vs0148; P8LE-NEXT:    blr149;150; P8BE-LABEL: s2v_test4:151; P8BE:       # %bb.0: # %entry152; P8BE-NEXT:    addi r3, r3, 4153; P8BE-NEXT:    lfiwax f0, 0, r3154; P8BE-NEXT:    xxpermdi v2, vs0, v2, 1155; P8BE-NEXT:    blr156 157 158 159entry:160  %arrayidx = getelementptr inbounds i32, ptr %int32, i64 1161  %0 = load i32, ptr %arrayidx, align 4162  %conv = sext i32 %0 to i64163  %vecins = insertelement <2 x i64> %vec, i64 %conv, i32 0164  ret <2 x i64> %vecins165}166 167; Function Attrs: norecurse nounwind readonly168define <2 x i64> @s2v_test5(<2 x i64> %vec, ptr nocapture readonly %ptr1)  {169; P9LE-LABEL: s2v_test5:170; P9LE:       # %bb.0: # %entry171; P9LE-NEXT:    lfiwax f0, 0, r5172; P9LE-NEXT:    xxmrghd v2, v2, vs0173; P9LE-NEXT:    blr174;175; P9BE-LABEL: s2v_test5:176; P9BE:       # %bb.0: # %entry177; P9BE-NEXT:    lfiwax f0, 0, r5178; P9BE-NEXT:    xxpermdi v2, vs0, v2, 1179; P9BE-NEXT:    blr180;181; P8LE-LABEL: s2v_test5:182; P8LE:       # %bb.0: # %entry183; P8LE-NEXT:    lfiwax f0, 0, r5184; P8LE-NEXT:    xxmrghd v2, v2, vs0185; P8LE-NEXT:    blr186;187; P8BE-LABEL: s2v_test5:188; P8BE:       # %bb.0: # %entry189; P8BE-NEXT:    lfiwax f0, 0, r5190; P8BE-NEXT:    xxpermdi v2, vs0, v2, 1191; P8BE-NEXT:    blr192 193 194 195entry:196  %0 = load i32, ptr %ptr1, align 4197  %conv = sext i32 %0 to i64198  %vecins = insertelement <2 x i64> %vec, i64 %conv, i32 0199  ret <2 x i64> %vecins200}201 202; Function Attrs: norecurse nounwind readonly203define <2 x i64> @s2v_test6(ptr nocapture readonly %ptr)  {204; P9LE-LABEL: s2v_test6:205; P9LE:       # %bb.0: # %entry206; P9LE-NEXT:    lfiwax f0, 0, r3207; P9LE-NEXT:    xxspltd v2, f0, 0208; P9LE-NEXT:    blr209;210; P9BE-LABEL: s2v_test6:211; P9BE:       # %bb.0: # %entry212; P9BE-NEXT:    lfiwax f0, 0, r3213; P9BE-NEXT:    xxspltd v2, f0, 0214; P9BE-NEXT:    blr215;216; P8LE-LABEL: s2v_test6:217; P8LE:       # %bb.0: # %entry218; P8LE-NEXT:    lfiwax f0, 0, r3219; P8LE-NEXT:    xxspltd v2, f0, 0220; P8LE-NEXT:    blr221;222; P8BE-LABEL: s2v_test6:223; P8BE:       # %bb.0: # %entry224; P8BE-NEXT:    lfiwax f0, 0, r3225; P8BE-NEXT:    xxspltd v2, f0, 0226; P8BE-NEXT:    blr227 228 229 230entry:231  %0 = load i32, ptr %ptr, align 4232  %conv = sext i32 %0 to i64233  %splat.splatinsert = insertelement <2 x i64> undef, i64 %conv, i32 0234  %splat.splat = shufflevector <2 x i64> %splat.splatinsert, <2 x i64> undef, <2 x i32> zeroinitializer235  ret <2 x i64> %splat.splat236}237 238; Function Attrs: norecurse nounwind readonly239define <2 x i64> @s2v_test7(ptr nocapture readonly %ptr)  {240; P9LE-LABEL: s2v_test7:241; P9LE:       # %bb.0: # %entry242; P9LE-NEXT:    lfiwax f0, 0, r3243; P9LE-NEXT:    xxspltd v2, f0, 0244; P9LE-NEXT:    blr245;246; P9BE-LABEL: s2v_test7:247; P9BE:       # %bb.0: # %entry248; P9BE-NEXT:    lfiwax f0, 0, r3249; P9BE-NEXT:    xxspltd v2, f0, 0250; P9BE-NEXT:    blr251;252; P8LE-LABEL: s2v_test7:253; P8LE:       # %bb.0: # %entry254; P8LE-NEXT:    lfiwax f0, 0, r3255; P8LE-NEXT:    xxspltd v2, f0, 0256; P8LE-NEXT:    blr257;258; P8BE-LABEL: s2v_test7:259; P8BE:       # %bb.0: # %entry260; P8BE-NEXT:    lfiwax f0, 0, r3261; P8BE-NEXT:    xxspltd v2, f0, 0262; P8BE-NEXT:    blr263 264 265 266entry:267  %0 = load i32, ptr %ptr, align 4268  %conv = sext i32 %0 to i64269  %splat.splatinsert = insertelement <2 x i64> undef, i64 %conv, i32 0270  %splat.splat = shufflevector <2 x i64> %splat.splatinsert, <2 x i64> undef, <2 x i32> zeroinitializer271  ret <2 x i64> %splat.splat272}273 274