316 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \3; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names \4; RUN: -ppc-vsr-nums-as-vr < %s | FileCheck %s5; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \6; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names \7; RUN: -ppc-vsr-nums-as-vr < %s | FileCheck %s8; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \9; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \10; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P1011; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \12; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \13; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10-BE14; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr \15; RUN: -ppc-asm-full-reg-names -mtriple=powerpc64-ibm-aix-xcoff < %s | \16; RUN: FileCheck %s --check-prefix=AIX-6417; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr \18; RUN: -ppc-asm-full-reg-names -mtriple=powerpc-ibm-aix-xcoff < %s | \19; RUN: FileCheck %s --check-prefix=AIX-3220 21; Function Attrs: norecurse nounwind readonly22define dso_local <2 x double> @test1(ptr nocapture readonly %Ptr) {23; CHECK-LABEL: test1:24; CHECK: # %bb.0: # %entry25; CHECK-NEXT: lfd f0, 0(r3)26; CHECK-NEXT: xxmrghw vs0, vs0, vs027; CHECK-NEXT: xvcvspdp v2, vs028; CHECK-NEXT: blr29;30; AIX-64-LABEL: test1:31; AIX-64: # %bb.0: # %entry32; AIX-64-NEXT: lfdx f0, 0, r333; AIX-64-NEXT: xxmrghw vs0, vs0, vs034; AIX-64-NEXT: xvcvspdp v2, vs035; AIX-64-NEXT: blr36;37; AIX-32-LABEL: test1:38; AIX-32: # %bb.0: # %entry39; AIX-32-NEXT: lfs f0, 4(r3)40; AIX-32-NEXT: lfs f1, 0(r3)41; AIX-32-NEXT: xxmrghd v2, vs1, vs042; AIX-32-NEXT: blr43entry:44 %0 = load <2 x float>, ptr %Ptr, align 845 %1 = fpext <2 x float> %0 to <2 x double>46 ret <2 x double> %147}48 49; Function Attrs: norecurse nounwind readonly50define dso_local <2 x double> @test2(ptr nocapture readonly %a, ptr nocapture readonly %b) {51; CHECK-LABEL: test2:52; CHECK: # %bb.0: # %entry53; CHECK-NEXT: lfd f0, 0(r4)54; CHECK-NEXT: lfd f1, 0(r3)55; CHECK-NEXT: xvsubsp vs0, vs1, vs056; CHECK-NEXT: xxmrghw vs0, vs0, vs057; CHECK-NEXT: xvcvspdp v2, vs058; CHECK-NEXT: blr59;60; AIX-64-LABEL: test2:61; AIX-64: # %bb.0: # %entry62; AIX-64-NEXT: lfdx f0, 0, r363; AIX-64-NEXT: lfdx f1, 0, r464; AIX-64-NEXT: xvsubsp vs0, vs0, vs165; AIX-64-NEXT: xxmrghw vs0, vs0, vs066; AIX-64-NEXT: xvcvspdp v2, vs067; AIX-64-NEXT: blr68;69; AIX-32-LABEL: test2:70; AIX-32: # %bb.0: # %entry71; AIX-32-NEXT: li r5, 472; AIX-32-NEXT: lxsiwzx v3, 0, r373; AIX-32-NEXT: lxsiwzx v4, 0, r474; AIX-32-NEXT: lxsiwzx v2, r3, r575; AIX-32-NEXT: vmrgow v2, v3, v276; AIX-32-NEXT: lxsiwzx v3, r4, r577; AIX-32-NEXT: vmrgow v3, v4, v378; AIX-32-NEXT: xvsubsp vs0, v2, v379; AIX-32-NEXT: xxsldwi vs1, vs0, vs0, 180; AIX-32-NEXT: xscvspdpn f0, vs081; AIX-32-NEXT: xscvspdpn f1, vs182; AIX-32-NEXT: xxmrghd v2, vs0, vs183; AIX-32-NEXT: blr84entry:85 %0 = load <2 x float>, ptr %a, align 886 %1 = load <2 x float>, ptr %b, align 887 %sub = fsub <2 x float> %0, %188 %2 = fpext <2 x float> %sub to <2 x double>89 ret <2 x double> %290}91 92; Function Attrs: norecurse nounwind readonly93; Function Attrs: norecurse nounwind readonly94define dso_local <2 x double> @test3(ptr nocapture readonly %a, ptr nocapture readonly %b) {95; CHECK-LABEL: test3:96; CHECK: # %bb.0: # %entry97; CHECK-NEXT: lfd f0, 0(r4)98; CHECK-NEXT: lfd f1, 0(r3)99; CHECK-NEXT: xvaddsp vs0, vs1, vs0100; CHECK-NEXT: xxmrghw vs0, vs0, vs0101; CHECK-NEXT: xvcvspdp v2, vs0102; CHECK-NEXT: blr103;104; AIX-64-LABEL: test3:105; AIX-64: # %bb.0: # %entry106; AIX-64-NEXT: lfdx f0, 0, r3107; AIX-64-NEXT: lfdx f1, 0, r4108; AIX-64-NEXT: xvaddsp vs0, vs0, vs1109; AIX-64-NEXT: xxmrghw vs0, vs0, vs0110; AIX-64-NEXT: xvcvspdp v2, vs0111; AIX-64-NEXT: blr112;113; AIX-32-LABEL: test3:114; AIX-32: # %bb.0: # %entry115; AIX-32-NEXT: li r5, 4116; AIX-32-NEXT: lxsiwzx v3, 0, r3117; AIX-32-NEXT: lxsiwzx v4, 0, r4118; AIX-32-NEXT: lxsiwzx v2, r3, r5119; AIX-32-NEXT: vmrgow v2, v3, v2120; AIX-32-NEXT: lxsiwzx v3, r4, r5121; AIX-32-NEXT: vmrgow v3, v4, v3122; AIX-32-NEXT: xvaddsp vs0, v2, v3123; AIX-32-NEXT: xxsldwi vs1, vs0, vs0, 1124; AIX-32-NEXT: xscvspdpn f0, vs0125; AIX-32-NEXT: xscvspdpn f1, vs1126; AIX-32-NEXT: xxmrghd v2, vs0, vs1127; AIX-32-NEXT: blr128entry:129 %0 = load <2 x float>, ptr %a, align 8130 %1 = load <2 x float>, ptr %b, align 8131 %sub = fadd <2 x float> %0, %1132 %2 = fpext <2 x float> %sub to <2 x double>133 ret <2 x double> %2134}135 136; Function Attrs: norecurse nounwind readonly137; Function Attrs: norecurse nounwind readonly138define dso_local <2 x double> @test4(ptr nocapture readonly %a, ptr nocapture readonly %b) {139; CHECK-LABEL: test4:140; CHECK: # %bb.0: # %entry141; CHECK-NEXT: lfd f0, 0(r4)142; CHECK-NEXT: lfd f1, 0(r3)143; CHECK-NEXT: xvmulsp vs0, vs1, vs0144; CHECK-NEXT: xxmrghw vs0, vs0, vs0145; CHECK-NEXT: xvcvspdp v2, vs0146; CHECK-NEXT: blr147;148; AIX-64-LABEL: test4:149; AIX-64: # %bb.0: # %entry150; AIX-64-NEXT: lfdx f0, 0, r3151; AIX-64-NEXT: lfdx f1, 0, r4152; AIX-64-NEXT: xvmulsp vs0, vs0, vs1153; AIX-64-NEXT: xxmrghw vs0, vs0, vs0154; AIX-64-NEXT: xvcvspdp v2, vs0155; AIX-64-NEXT: blr156;157; AIX-32-LABEL: test4:158; AIX-32: # %bb.0: # %entry159; AIX-32-NEXT: li r5, 4160; AIX-32-NEXT: lxsiwzx v3, 0, r3161; AIX-32-NEXT: lxsiwzx v4, 0, r4162; AIX-32-NEXT: lxsiwzx v2, r3, r5163; AIX-32-NEXT: vmrgow v2, v3, v2164; AIX-32-NEXT: lxsiwzx v3, r4, r5165; AIX-32-NEXT: vmrgow v3, v4, v3166; AIX-32-NEXT: xvmulsp vs0, v2, v3167; AIX-32-NEXT: xxsldwi vs1, vs0, vs0, 1168; AIX-32-NEXT: xscvspdpn f0, vs0169; AIX-32-NEXT: xscvspdpn f1, vs1170; AIX-32-NEXT: xxmrghd v2, vs0, vs1171; AIX-32-NEXT: blr172entry:173 %0 = load <2 x float>, ptr %a, align 8174 %1 = load <2 x float>, ptr %b, align 8175 %sub = fmul <2 x float> %0, %1176 %2 = fpext <2 x float> %sub to <2 x double>177 ret <2 x double> %2178}179 180@G = dso_local local_unnamed_addr global <2 x float> <float 3.000000e+00, float 0x3FF3333340000000>, align 8181 182; Function Attrs: mustprogress nofree norecurse nosync nounwind readonly uwtable willreturn183define dso_local <2 x double> @test5(<2 x double> %a) {184; CHECK-P10-LABEL: test5:185; CHECK-P10: # %bb.0: # %entry186; CHECK-P10-NEXT: plfd f0, G@PCREL(0), 1187; CHECK-P10-NEXT: xxmrghw vs0, vs0, vs0188; CHECK-P10-NEXT: xvcvspdp vs0, vs0189; CHECK-P10-NEXT: xvadddp v2, vs0, v2190; CHECK-P10-NEXT: blr191;192; CHECK-P10-BE-LABEL: test5:193; CHECK-P10-BE: # %bb.0: # %entry194; CHECK-P10-BE-NEXT: addis r3, r2, G@toc@ha195; CHECK-P10-BE-NEXT: lfd f0, G@toc@l(r3)196; CHECK-P10-BE-NEXT: xxmrghw vs0, vs0, vs0197; CHECK-P10-BE-NEXT: xvcvspdp vs0, vs0198; CHECK-P10-BE-NEXT: xvadddp v2, vs0, v2199; CHECK-P10-BE-NEXT: blr200;201; AIX-64-LABEL: test5:202; AIX-64: # %bb.0: # %entry203; AIX-64-NEXT: ld r3, L..C0(r2) # @G204; AIX-64-NEXT: lfdx f0, 0, r3205; AIX-64-NEXT: xxmrghw vs0, vs0, vs0206; AIX-64-NEXT: xvcvspdp vs0, vs0207; AIX-64-NEXT: xvadddp v2, vs0, v2208; AIX-64-NEXT: blr209;210; AIX-32-LABEL: test5:211; AIX-32: # %bb.0: # %entry212; AIX-32-NEXT: lwz r3, L..C0(r2) # @G213; AIX-32-NEXT: lfs f0, 4(r3)214; AIX-32-NEXT: lfs f1, 0(r3)215; AIX-32-NEXT: xxmrghd vs0, vs1, vs0216; AIX-32-NEXT: xvadddp v2, vs0, v2217; AIX-32-NEXT: blr218entry:219 %0 = load <2 x float>, ptr @G, align 8220 %1 = fpext <2 x float> %0 to <2 x double>221 %add = fadd <2 x double> %1, %a222 ret <2 x double> %add223}224 225%0 = type <{ i32, i8, [1 x i8], i16, i32, i32, i8, [1 x i8], i16, i32, float, float, double, double, ppc_fp128, { float, float }, { float, float }, { double, double }, { double, double }, { ppc_fp128, ppc_fp128 }, [89856 x i8] }>226@Glob1 = external dso_local unnamed_addr global [25 x %0], align 16227 228define dso_local i32 @test6() #0 {229; CHECK-P10-LABEL: test6:230; CHECK-P10: # %bb.0: # %bb231; CHECK-P10-NEXT: plfd f0, Glob1@PCREL+562536(0), 1232; CHECK-P10-NEXT: xxlxor vs1, vs1, vs1233; CHECK-P10-NEXT: xxmrghw vs0, vs0, vs0234; CHECK-P10-NEXT: xvcvspdp vs0, vs0235; CHECK-P10-NEXT: xvcmpeqdp v2, vs1, vs0236; CHECK-P10-NEXT: xxswapd v3, v2237; CHECK-P10-NEXT: xxland vs0, v2, v3238; CHECK-P10-NEXT: mfvsrld r3, vs0239; CHECK-P10-NEXT: andi. r3, r3, 1240; CHECK-P10-NEXT: bc 4, gt, .LBB5_2241; CHECK-P10-NEXT: # %bb.1: # %bb8242; CHECK-P10-NEXT: .LBB5_2: # %bb7243;244; CHECK-P10-BE-LABEL: test6:245; CHECK-P10-BE: # %bb.0: # %bb246; CHECK-P10-BE-NEXT: addis r3, r2, Glob1@toc@ha247; CHECK-P10-BE-NEXT: xxlxor vs1, vs1, vs1248; CHECK-P10-BE-NEXT: addi r3, r3, Glob1@toc@l249; CHECK-P10-BE-NEXT: plfd f0, 562536(r3), 0250; CHECK-P10-BE-NEXT: xxmrghw vs0, vs0, vs0251; CHECK-P10-BE-NEXT: xvcvspdp vs0, vs0252; CHECK-P10-BE-NEXT: xvcmpeqdp v2, vs1, vs0253; CHECK-P10-BE-NEXT: xxswapd v3, v2254; CHECK-P10-BE-NEXT: xxland vs0, v2, v3255; CHECK-P10-BE-NEXT: mffprd r3, f0256; CHECK-P10-BE-NEXT: andi. r3, r3, 1257; CHECK-P10-BE-NEXT: bc 4, gt, .LBB5_2258; CHECK-P10-BE-NEXT: # %bb.1: # %bb8259; CHECK-P10-BE-NEXT: .LBB5_2: # %bb7260;261; AIX-64-LABEL: test6:262; AIX-64: # %bb.0: # %bb263; AIX-64-NEXT: lis r4, 8264; AIX-64-NEXT: ld r3, L..C1(r2) # @Glob1265; AIX-64-NEXT: xxlxor vs1, vs1, vs1266; AIX-64-NEXT: ori r4, r4, 38248267; AIX-64-NEXT: lfdx f0, r3, r4268; AIX-64-NEXT: xxmrghw vs0, vs0, vs0269; AIX-64-NEXT: xvcvspdp vs0, vs0270; AIX-64-NEXT: xvcmpeqdp v2, vs1, vs0271; AIX-64-NEXT: xxswapd v3, v2272; AIX-64-NEXT: xxland vs0, v2, v3273; AIX-64-NEXT: mffprd r3, f0274; AIX-64-NEXT: andi. r3, r3, 1275; AIX-64-NEXT: bc 4, gt, L..BB5_2276; AIX-64-NEXT: # %bb.1: # %bb8277; AIX-64-NEXT: L..BB5_2: # %bb7278;279; AIX-32-LABEL: test6:280; AIX-32: # %bb.0: # %bb281; AIX-32-NEXT: lis r4, 8282; AIX-32-NEXT: lwz r3, L..C1(r2) # @Glob1283; AIX-32-NEXT: ori r4, r4, 38248284; AIX-32-NEXT: lfsux f0, r3, r4285; AIX-32-NEXT: lfs f1, 4(r3)286; AIX-32-NEXT: addi r3, r1, -16287; AIX-32-NEXT: xxmrghd vs0, vs0, vs1288; AIX-32-NEXT: xxlxor vs1, vs1, vs1289; AIX-32-NEXT: xvcmpeqdp v2, vs1, vs0290; AIX-32-NEXT: xxswapd v3, v2291; AIX-32-NEXT: xxland vs0, v2, v3292; AIX-32-NEXT: stxvw4x vs0, 0, r3293; AIX-32-NEXT: lwz r3, -12(r1)294; AIX-32-NEXT: andi. r3, r3, 1295; AIX-32-NEXT: bc 4, gt, L..BB5_2296; AIX-32-NEXT: # %bb.1: # %bb8297; AIX-32-NEXT: L..BB5_2: # %bb7298bb:299 br label %bb1300 301bb1: ; preds = %bb302 %i = load <2 x float>, ptr getelementptr inbounds ([25 x %0], ptr @Glob1, i64 0, i64 6, i32 20, i64 22392), align 8303 %i2 = fpext <2 x float> %i to <2 x double>304 %i3 = fcmp contract oeq <2 x double> zeroinitializer, %i2305 %i4 = shufflevector <2 x i1> %i3, <2 x i1> poison, <2 x i32> <i32 1, i32 undef>306 %i5 = and <2 x i1> %i3, %i4307 %i6 = extractelement <2 x i1> %i5, i32 0308 br i1 %i6, label %bb8, label %bb7309 310bb7: ; preds = %bb1311 unreachable312 313bb8: ; preds = %bb1314 unreachable315}316