623 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux \3; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr | FileCheck \4; RUN: --check-prefix=P8 %s5; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux \6; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr | FileCheck \7; RUN: --check-prefix=P9 %s8 9; FIXME: Constrained fpext would fail if VSX feature disabled. Add no-vsx10 11declare float @llvm.experimental.constrained.ceil.f32(float, metadata)12declare double @llvm.experimental.constrained.ceil.f64(double, metadata)13declare <4 x float> @llvm.experimental.constrained.ceil.v4f32(<4 x float>, metadata)14declare <2 x double> @llvm.experimental.constrained.ceil.v2f64(<2 x double>, metadata)15 16declare float @llvm.experimental.constrained.floor.f32(float, metadata)17declare double @llvm.experimental.constrained.floor.f64(double, metadata)18declare <4 x float> @llvm.experimental.constrained.floor.v4f32(<4 x float>, metadata)19declare <2 x double> @llvm.experimental.constrained.floor.v2f64(<2 x double>, metadata)20 21declare double @llvm.experimental.constrained.nearbyint.f64(double, metadata, metadata)22declare <4 x float> @llvm.experimental.constrained.nearbyint.v4f32(<4 x float>, metadata, metadata)23declare <2 x double> @llvm.experimental.constrained.nearbyint.v2f64(<2 x double>, metadata, metadata)24 25declare <4 x double> @llvm.experimental.constrained.fpext.v4f64.v4f32(<4 x float>, metadata)26declare <2 x double> @llvm.experimental.constrained.fpext.v2f64.v2f32(<2 x float>, metadata)27 28declare float @llvm.experimental.constrained.fptrunc.f32.f64(double, metadata, metadata)29declare <4 x float> @llvm.experimental.constrained.fptrunc.v4f32.v4f64(<4 x double>, metadata, metadata)30declare <2 x float> @llvm.experimental.constrained.fptrunc.v2f32.v2f64(<2 x double>, metadata, metadata)31 32declare float @llvm.experimental.constrained.round.f32(float, metadata)33declare double @llvm.experimental.constrained.round.f64(double, metadata)34declare <4 x float> @llvm.experimental.constrained.round.v4f32(<4 x float>, metadata)35declare <2 x double> @llvm.experimental.constrained.round.v2f64(<2 x double>, metadata)36 37declare float @llvm.experimental.constrained.trunc.f32(float, metadata)38declare double @llvm.experimental.constrained.trunc.f64(double, metadata)39declare <4 x float> @llvm.experimental.constrained.trunc.v4f32(<4 x float>, metadata)40declare <2 x double> @llvm.experimental.constrained.trunc.v2f64(<2 x double>, metadata)41 42define float @ceil_f32(float %f1) strictfp {43; P8-LABEL: ceil_f32:44; P8: # %bb.0:45; P8-NEXT: xsrdpip f1, f146; P8-NEXT: blr47;48; P9-LABEL: ceil_f32:49; P9: # %bb.0:50; P9-NEXT: xsrdpip f1, f151; P9-NEXT: blr52 %res = call float @llvm.experimental.constrained.ceil.f32(53 float %f1,54 metadata !"fpexcept.strict")55 ret float %res56}57 58define double @ceil_f64(double %f1) strictfp {59; P8-LABEL: ceil_f64:60; P8: # %bb.0:61; P8-NEXT: xsrdpip f1, f162; P8-NEXT: blr63;64; P9-LABEL: ceil_f64:65; P9: # %bb.0:66; P9-NEXT: xsrdpip f1, f167; P9-NEXT: blr68 %res = call double @llvm.experimental.constrained.ceil.f64(69 double %f1,70 metadata !"fpexcept.strict")71 ret double %res72}73 74define <4 x float> @ceil_v4f32(<4 x float> %vf1) strictfp {75; P8-LABEL: ceil_v4f32:76; P8: # %bb.0:77; P8-NEXT: xvrspip v2, v278; P8-NEXT: blr79;80; P9-LABEL: ceil_v4f32:81; P9: # %bb.0:82; P9-NEXT: xvrspip v2, v283; P9-NEXT: blr84 %res = call <4 x float> @llvm.experimental.constrained.ceil.v4f32(85 <4 x float> %vf1,86 metadata !"fpexcept.strict")87 ret <4 x float> %res88}89 90define <2 x double> @ceil_v2f64(<2 x double> %vf1) strictfp {91; P8-LABEL: ceil_v2f64:92; P8: # %bb.0:93; P8-NEXT: xvrdpip v2, v294; P8-NEXT: blr95;96; P9-LABEL: ceil_v2f64:97; P9: # %bb.0:98; P9-NEXT: xvrdpip v2, v299; P9-NEXT: blr100 %res = call <2 x double> @llvm.experimental.constrained.ceil.v2f64(101 <2 x double> %vf1,102 metadata !"fpexcept.strict")103 ret <2 x double> %res104}105 106define float @floor_f32(float %f1) strictfp {107; P8-LABEL: floor_f32:108; P8: # %bb.0:109; P8-NEXT: xsrdpim f1, f1110; P8-NEXT: blr111;112; P9-LABEL: floor_f32:113; P9: # %bb.0:114; P9-NEXT: xsrdpim f1, f1115; P9-NEXT: blr116 %res = call float @llvm.experimental.constrained.floor.f32(117 float %f1,118 metadata !"fpexcept.strict")119 ret float %res120}121 122define double @floor_f64(double %f1) strictfp {123; P8-LABEL: floor_f64:124; P8: # %bb.0:125; P8-NEXT: xsrdpim f1, f1126; P8-NEXT: blr127;128; P9-LABEL: floor_f64:129; P9: # %bb.0:130; P9-NEXT: xsrdpim f1, f1131; P9-NEXT: blr132 %res = call double @llvm.experimental.constrained.floor.f64(133 double %f1,134 metadata !"fpexcept.strict")135 ret double %res;136}137 138define <4 x float> @floor_v4f32(<4 x float> %vf1) strictfp {139; P8-LABEL: floor_v4f32:140; P8: # %bb.0:141; P8-NEXT: xvrspim v2, v2142; P8-NEXT: blr143;144; P9-LABEL: floor_v4f32:145; P9: # %bb.0:146; P9-NEXT: xvrspim v2, v2147; P9-NEXT: blr148 %res = call <4 x float> @llvm.experimental.constrained.floor.v4f32(149 <4 x float> %vf1,150 metadata !"fpexcept.strict")151 ret <4 x float> %res;152}153 154define <2 x double> @floor_v2f64(<2 x double> %vf1) strictfp {155; P8-LABEL: floor_v2f64:156; P8: # %bb.0:157; P8-NEXT: xvrdpim v2, v2158; P8-NEXT: blr159;160; P9-LABEL: floor_v2f64:161; P9: # %bb.0:162; P9-NEXT: xvrdpim v2, v2163; P9-NEXT: blr164 %res = call <2 x double> @llvm.experimental.constrained.floor.v2f64(165 <2 x double> %vf1,166 metadata !"fpexcept.strict")167 ret <2 x double> %res;168}169 170define double @nearbyint_f64(double %f1, double %f2) strictfp {171; P8-LABEL: nearbyint_f64:172; P8: # %bb.0:173; P8-NEXT: mflr r0174; P8-NEXT: stdu r1, -112(r1)175; P8-NEXT: std r0, 128(r1)176; P8-NEXT: .cfi_def_cfa_offset 112177; P8-NEXT: .cfi_offset lr, 16178; P8-NEXT: bl nearbyint179; P8-NEXT: nop180; P8-NEXT: addi r1, r1, 112181; P8-NEXT: ld r0, 16(r1)182; P8-NEXT: mtlr r0183; P8-NEXT: blr184;185; P9-LABEL: nearbyint_f64:186; P9: # %bb.0:187; P9-NEXT: mflr r0188; P9-NEXT: stdu r1, -32(r1)189; P9-NEXT: std r0, 48(r1)190; P9-NEXT: .cfi_def_cfa_offset 32191; P9-NEXT: .cfi_offset lr, 16192; P9-NEXT: bl nearbyint193; P9-NEXT: nop194; P9-NEXT: addi r1, r1, 32195; P9-NEXT: ld r0, 16(r1)196; P9-NEXT: mtlr r0197; P9-NEXT: blr198 %res = call double @llvm.experimental.constrained.nearbyint.f64(199 double %f1,200 metadata !"round.dynamic",201 metadata !"fpexcept.strict")202 ret double %res203}204 205define <4 x float> @nearbyint_v4f32(<4 x float> %vf1, <4 x float> %vf2) strictfp {206; P8-LABEL: nearbyint_v4f32:207; P8: # %bb.0:208; P8-NEXT: mflr r0209; P8-NEXT: stdu r1, -176(r1)210; P8-NEXT: std r0, 192(r1)211; P8-NEXT: .cfi_def_cfa_offset 176212; P8-NEXT: .cfi_offset lr, 16213; P8-NEXT: .cfi_offset v29, -48214; P8-NEXT: .cfi_offset v30, -32215; P8-NEXT: .cfi_offset v31, -16216; P8-NEXT: xxsldwi vs0, v2, v2, 3217; P8-NEXT: li r3, 128218; P8-NEXT: xscvspdpn f1, vs0219; P8-NEXT: stxvd2x v29, r1, r3 # 16-byte Folded Spill220; P8-NEXT: li r3, 144221; P8-NEXT: stxvd2x v30, r1, r3 # 16-byte Folded Spill222; P8-NEXT: li r3, 160223; P8-NEXT: stxvd2x v31, r1, r3 # 16-byte Folded Spill224; P8-NEXT: vmr v31, v2225; P8-NEXT: bl nearbyintf226; P8-NEXT: nop227; P8-NEXT: xxsldwi vs0, v31, v31, 1228; P8-NEXT: xxlor v30, f1, f1229; P8-NEXT: xscvspdpn f1, vs0230; P8-NEXT: bl nearbyintf231; P8-NEXT: nop232; P8-NEXT: xxmrghd vs0, vs1, v30233; P8-NEXT: xscvspdpn f1, v31234; P8-NEXT: xvcvdpsp v29, vs0235; P8-NEXT: bl nearbyintf236; P8-NEXT: nop237; P8-NEXT: xxswapd vs0, v31238; P8-NEXT: xxlor v30, f1, f1239; P8-NEXT: xscvspdpn f1, vs0240; P8-NEXT: bl nearbyintf241; P8-NEXT: nop242; P8-NEXT: xxmrghd vs0, v30, vs1243; P8-NEXT: li r3, 160244; P8-NEXT: xvcvdpsp v2, vs0245; P8-NEXT: lxvd2x v31, r1, r3 # 16-byte Folded Reload246; P8-NEXT: li r3, 144247; P8-NEXT: lxvd2x v30, r1, r3 # 16-byte Folded Reload248; P8-NEXT: li r3, 128249; P8-NEXT: vmrgew v2, v2, v29250; P8-NEXT: lxvd2x v29, r1, r3 # 16-byte Folded Reload251; P8-NEXT: addi r1, r1, 176252; P8-NEXT: ld r0, 16(r1)253; P8-NEXT: mtlr r0254; P8-NEXT: blr255;256; P9-LABEL: nearbyint_v4f32:257; P9: # %bb.0:258; P9-NEXT: mflr r0259; P9-NEXT: stdu r1, -80(r1)260; P9-NEXT: std r0, 96(r1)261; P9-NEXT: .cfi_def_cfa_offset 80262; P9-NEXT: .cfi_offset lr, 16263; P9-NEXT: .cfi_offset v29, -48264; P9-NEXT: .cfi_offset v30, -32265; P9-NEXT: .cfi_offset v31, -16266; P9-NEXT: xxsldwi vs0, v2, v2, 3267; P9-NEXT: stxv v29, 32(r1) # 16-byte Folded Spill268; P9-NEXT: xscvspdpn f1, vs0269; P9-NEXT: stxv v30, 48(r1) # 16-byte Folded Spill270; P9-NEXT: stxv v31, 64(r1) # 16-byte Folded Spill271; P9-NEXT: vmr v31, v2272; P9-NEXT: bl nearbyintf273; P9-NEXT: nop274; P9-NEXT: xxsldwi vs0, v31, v31, 1275; P9-NEXT: xscpsgndp v30, f1, f1276; P9-NEXT: xscvspdpn f1, vs0277; P9-NEXT: bl nearbyintf278; P9-NEXT: nop279; P9-NEXT: xxmrghd vs0, vs1, v30280; P9-NEXT: xscvspdpn f1, v31281; P9-NEXT: xvcvdpsp v29, vs0282; P9-NEXT: bl nearbyintf283; P9-NEXT: nop284; P9-NEXT: xxswapd vs0, v31285; P9-NEXT: xscpsgndp v30, f1, f1286; P9-NEXT: xscvspdpn f1, vs0287; P9-NEXT: bl nearbyintf288; P9-NEXT: nop289; P9-NEXT: xxmrghd vs0, v30, vs1290; P9-NEXT: lxv v31, 64(r1) # 16-byte Folded Reload291; P9-NEXT: lxv v30, 48(r1) # 16-byte Folded Reload292; P9-NEXT: xvcvdpsp v2, vs0293; P9-NEXT: vmrgew v2, v2, v29294; P9-NEXT: lxv v29, 32(r1) # 16-byte Folded Reload295; P9-NEXT: addi r1, r1, 80296; P9-NEXT: ld r0, 16(r1)297; P9-NEXT: mtlr r0298; P9-NEXT: blr299 %res = call <4 x float> @llvm.experimental.constrained.nearbyint.v4f32(300 <4 x float> %vf1,301 metadata !"round.dynamic",302 metadata !"fpexcept.strict")303 ret <4 x float> %res304}305 306define <2 x double> @nearbyint_v2f64(<2 x double> %vf1, <2 x double> %vf2) strictfp {307; P8-LABEL: nearbyint_v2f64:308; P8: # %bb.0:309; P8-NEXT: mflr r0310; P8-NEXT: stdu r1, -160(r1)311; P8-NEXT: std r0, 176(r1)312; P8-NEXT: .cfi_def_cfa_offset 160313; P8-NEXT: .cfi_offset lr, 16314; P8-NEXT: .cfi_offset v30, -32315; P8-NEXT: .cfi_offset v31, -16316; P8-NEXT: li r3, 128317; P8-NEXT: stxvd2x v30, r1, r3 # 16-byte Folded Spill318; P8-NEXT: li r3, 144319; P8-NEXT: stxvd2x v31, r1, r3 # 16-byte Folded Spill320; P8-NEXT: vmr v31, v2321; P8-NEXT: xxlor f1, v31, v31322; P8-NEXT: bl nearbyint323; P8-NEXT: nop324; P8-NEXT: xxlor v30, f1, f1325; P8-NEXT: xxswapd vs1, v31326; P8-NEXT: bl nearbyint327; P8-NEXT: nop328; P8-NEXT: li r3, 144329; P8-NEXT: xxmrghd v2, v30, vs1330; P8-NEXT: lxvd2x v31, r1, r3 # 16-byte Folded Reload331; P8-NEXT: li r3, 128332; P8-NEXT: lxvd2x v30, r1, r3 # 16-byte Folded Reload333; P8-NEXT: addi r1, r1, 160334; P8-NEXT: ld r0, 16(r1)335; P8-NEXT: mtlr r0336; P8-NEXT: blr337;338; P9-LABEL: nearbyint_v2f64:339; P9: # %bb.0:340; P9-NEXT: mflr r0341; P9-NEXT: stdu r1, -64(r1)342; P9-NEXT: std r0, 80(r1)343; P9-NEXT: .cfi_def_cfa_offset 64344; P9-NEXT: .cfi_offset lr, 16345; P9-NEXT: .cfi_offset v30, -32346; P9-NEXT: .cfi_offset v31, -16347; P9-NEXT: stxv v31, 48(r1) # 16-byte Folded Spill348; P9-NEXT: vmr v31, v2349; P9-NEXT: xscpsgndp f1, v31, v31350; P9-NEXT: stxv v30, 32(r1) # 16-byte Folded Spill351; P9-NEXT: bl nearbyint352; P9-NEXT: nop353; P9-NEXT: xscpsgndp v30, f1, f1354; P9-NEXT: xxswapd vs1, v31355; P9-NEXT: bl nearbyint356; P9-NEXT: nop357; P9-NEXT: xxmrghd v2, v30, vs1358; P9-NEXT: lxv v31, 48(r1) # 16-byte Folded Reload359; P9-NEXT: lxv v30, 32(r1) # 16-byte Folded Reload360; P9-NEXT: addi r1, r1, 64361; P9-NEXT: ld r0, 16(r1)362; P9-NEXT: mtlr r0363; P9-NEXT: blr364 %res = call <2 x double> @llvm.experimental.constrained.nearbyint.v2f64(365 <2 x double> %vf1,366 metadata !"round.dynamic",367 metadata !"fpexcept.strict")368 ret <2 x double> %res369}370 371define <4 x double> @fpext_v4f64_v4f32(<4 x float> %vf1) strictfp {372; P8-LABEL: fpext_v4f64_v4f32:373; P8: # %bb.0:374; P8-NEXT: xxsldwi vs0, v2, v2, 1375; P8-NEXT: xscvspdpn f3, v2376; P8-NEXT: xxsldwi vs1, v2, v2, 3377; P8-NEXT: xxswapd vs2, v2378; P8-NEXT: xscvspdpn f0, vs0379; P8-NEXT: xxmrghd v2, vs3, vs0380; P8-NEXT: xscvspdpn f0, vs1381; P8-NEXT: xscvspdpn f1, vs2382; P8-NEXT: xxmrghd v3, vs1, vs0383; P8-NEXT: blr384;385; P9-LABEL: fpext_v4f64_v4f32:386; P9: # %bb.0:387; P9-NEXT: xxsldwi vs0, v2, v2, 3388; P9-NEXT: xxswapd vs1, v2389; P9-NEXT: xscvspdpn f0, vs0390; P9-NEXT: xscvspdpn f1, vs1391; P9-NEXT: xxsldwi vs2, v2, v2, 1392; P9-NEXT: xscvspdpn f2, vs2393; P9-NEXT: xxmrghd vs0, vs1, vs0394; P9-NEXT: xscvspdpn f1, v2395; P9-NEXT: xxmrghd v3, vs1, vs2396; P9-NEXT: xxlor v2, vs0, vs0397; P9-NEXT: blr398 %res = call <4 x double> @llvm.experimental.constrained.fpext.v4f64.v4f32(399 <4 x float> %vf1,400 metadata !"fpexcept.strict")401 ret <4 x double> %res402}403 404define <2 x double> @fpext_v2f64_v2f32(<2 x float> %vf1) strictfp {405; P8-LABEL: fpext_v2f64_v2f32:406; P8: # %bb.0:407; P8-NEXT: xxsldwi vs0, v2, v2, 1408; P8-NEXT: xscvspdpn f1, v2409; P8-NEXT: xscvspdpn f0, vs0410; P8-NEXT: xxmrghd v2, vs1, vs0411; P8-NEXT: blr412;413; P9-LABEL: fpext_v2f64_v2f32:414; P9: # %bb.0:415; P9-NEXT: xxsldwi vs0, v2, v2, 3416; P9-NEXT: xxswapd vs1, v2417; P9-NEXT: xscvspdpn f0, vs0418; P9-NEXT: xscvspdpn f1, vs1419; P9-NEXT: xxmrghd v2, vs1, vs0420; P9-NEXT: blr421 %res = call <2 x double> @llvm.experimental.constrained.fpext.v2f64.v2f32(422 <2 x float> %vf1,423 metadata !"fpexcept.strict")424 ret <2 x double> %res425}426 427define float @fptrunc_f32_f64(double %f1) strictfp {428; P8-LABEL: fptrunc_f32_f64:429; P8: # %bb.0:430; P8-NEXT: xsrsp f1, f1431; P8-NEXT: blr432;433; P9-LABEL: fptrunc_f32_f64:434; P9: # %bb.0:435; P9-NEXT: xsrsp f1, f1436; P9-NEXT: blr437 %res = call float @llvm.experimental.constrained.fptrunc.f32.f64(438 double %f1,439 metadata !"round.dynamic",440 metadata !"fpexcept.strict")441 ret float %res;442}443 444define <4 x float> @fptrunc_v4f32_v4f64(<4 x double> %vf1) strictfp {445; P8-LABEL: fptrunc_v4f32_v4f64:446; P8: # %bb.0:447; P8-NEXT: xxmrgld vs0, v2, v3448; P8-NEXT: xxmrghd vs1, v2, v3449; P8-NEXT: xvcvdpsp v2, vs0450; P8-NEXT: xvcvdpsp v3, vs1451; P8-NEXT: vmrgew v2, v3, v2452; P8-NEXT: blr453;454; P9-LABEL: fptrunc_v4f32_v4f64:455; P9: # %bb.0:456; P9-NEXT: xxmrgld vs0, v3, v2457; P9-NEXT: xvcvdpsp v4, vs0458; P9-NEXT: xxmrghd vs0, v3, v2459; P9-NEXT: xvcvdpsp v2, vs0460; P9-NEXT: vmrgew v2, v2, v4461; P9-NEXT: blr462 %res = call <4 x float> @llvm.experimental.constrained.fptrunc.v4f32.v4f64(463 <4 x double> %vf1,464 metadata !"round.dynamic",465 metadata !"fpexcept.strict")466 ret <4 x float> %res467}468 469define <2 x float> @fptrunc_v2f32_v2f64(<2 x double> %vf1) strictfp {470; P8-LABEL: fptrunc_v2f32_v2f64:471; P8: # %bb.0:472; P8-NEXT: xxswapd vs0, v2473; P8-NEXT: xsrsp f1, v2474; P8-NEXT: xsrsp f0, f0475; P8-NEXT: xscvdpspn v2, f1476; P8-NEXT: xscvdpspn v3, f0477; P8-NEXT: vmrgow v2, v2, v3478; P8-NEXT: blr479;480; P9-LABEL: fptrunc_v2f32_v2f64:481; P9: # %bb.0:482; P9-NEXT: xxswapd vs1, v2483; P9-NEXT: xsrsp f0, v2484; P9-NEXT: xsrsp f1, f1485; P9-NEXT: xscvdpspn vs0, f0486; P9-NEXT: xscvdpspn vs1, f1487; P9-NEXT: xxmrghw v2, vs0, vs1488; P9-NEXT: blr489 %res = call <2 x float> @llvm.experimental.constrained.fptrunc.v2f32.v2f64(490 <2 x double> %vf1,491 metadata !"round.dynamic",492 metadata !"fpexcept.strict")493 ret <2 x float> %res494}495 496define float @round_f32(float %f1) strictfp {497; P8-LABEL: round_f32:498; P8: # %bb.0:499; P8-NEXT: xsrdpi f1, f1500; P8-NEXT: blr501;502; P9-LABEL: round_f32:503; P9: # %bb.0:504; P9-NEXT: xsrdpi f1, f1505; P9-NEXT: blr506 %res = call float @llvm.experimental.constrained.round.f32(507 float %f1,508 metadata !"fpexcept.strict")509 ret float %res510}511 512define double @round_f64(double %f1) strictfp {513; P8-LABEL: round_f64:514; P8: # %bb.0:515; P8-NEXT: xsrdpi f1, f1516; P8-NEXT: blr517;518; P9-LABEL: round_f64:519; P9: # %bb.0:520; P9-NEXT: xsrdpi f1, f1521; P9-NEXT: blr522 %res = call double @llvm.experimental.constrained.round.f64(523 double %f1,524 metadata !"fpexcept.strict")525 ret double %res526}527 528define <4 x float> @round_v4f32(<4 x float> %vf1) strictfp {529; P8-LABEL: round_v4f32:530; P8: # %bb.0:531; P8-NEXT: xvrspi v2, v2532; P8-NEXT: blr533;534; P9-LABEL: round_v4f32:535; P9: # %bb.0:536; P9-NEXT: xvrspi v2, v2537; P9-NEXT: blr538 %res = call <4 x float> @llvm.experimental.constrained.round.v4f32(539 <4 x float> %vf1,540 metadata !"fpexcept.strict")541 ret <4 x float> %res542}543 544define <2 x double> @round_v2f64(<2 x double> %vf1) strictfp {545; P8-LABEL: round_v2f64:546; P8: # %bb.0:547; P8-NEXT: xvrdpi v2, v2548; P8-NEXT: blr549;550; P9-LABEL: round_v2f64:551; P9: # %bb.0:552; P9-NEXT: xvrdpi v2, v2553; P9-NEXT: blr554 %res = call <2 x double> @llvm.experimental.constrained.round.v2f64(555 <2 x double> %vf1,556 metadata !"fpexcept.strict")557 ret <2 x double> %res558}559 560define float @trunc_f32(float %f1) strictfp {561; P8-LABEL: trunc_f32:562; P8: # %bb.0:563; P8-NEXT: xsrdpiz f1, f1564; P8-NEXT: blr565;566; P9-LABEL: trunc_f32:567; P9: # %bb.0:568; P9-NEXT: xsrdpiz f1, f1569; P9-NEXT: blr570 %res = call float @llvm.experimental.constrained.trunc.f32(571 float %f1,572 metadata !"fpexcept.strict")573 ret float %res574}575 576define double @trunc_f64(double %f1) strictfp {577; P8-LABEL: trunc_f64:578; P8: # %bb.0:579; P8-NEXT: xsrdpiz f1, f1580; P8-NEXT: blr581;582; P9-LABEL: trunc_f64:583; P9: # %bb.0:584; P9-NEXT: xsrdpiz f1, f1585; P9-NEXT: blr586 %res = call double @llvm.experimental.constrained.trunc.f64(587 double %f1,588 metadata !"fpexcept.strict")589 ret double %res590}591 592define <4 x float> @trunc_v4f32(<4 x float> %vf1) strictfp {593; P8-LABEL: trunc_v4f32:594; P8: # %bb.0:595; P8-NEXT: xvrspiz v2, v2596; P8-NEXT: blr597;598; P9-LABEL: trunc_v4f32:599; P9: # %bb.0:600; P9-NEXT: xvrspiz v2, v2601; P9-NEXT: blr602 %res = call <4 x float> @llvm.experimental.constrained.trunc.v4f32(603 <4 x float> %vf1,604 metadata !"fpexcept.strict")605 ret <4 x float> %res606}607 608define <2 x double> @trunc_v2f64(<2 x double> %vf1) strictfp {609; P8-LABEL: trunc_v2f64:610; P8: # %bb.0:611; P8-NEXT: xvrdpiz v2, v2612; P8-NEXT: blr613;614; P9-LABEL: trunc_v2f64:615; P9: # %bb.0:616; P9-NEXT: xvrdpiz v2, v2617; P9-NEXT: blr618 %res = call <2 x double> @llvm.experimental.constrained.trunc.v2f64(619 <2 x double> %vf1,620 metadata !"fpexcept.strict")621 ret <2 x double> %res622}623