144 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mcpu=pwr9 -ppc-asm-full-reg-names -verify-machineinstrs \3; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \4; RUN: --check-prefix=P95; RUN: llc -mcpu=pwr8 -ppc-asm-full-reg-names -verify-machineinstrs \6; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \7; RUN: --check-prefix=P88define dso_local float @testfmax(float %a, float %b) local_unnamed_addr {9; P9-LABEL: testfmax:10; P9: # %bb.0: # %entry11; P9-NEXT: xsmaxcdp f1, f1, f212; P9-NEXT: blr13;14; P8-LABEL: testfmax:15; P8: # %bb.0: # %entry16; P8-NEXT: fcmpu cr0, f1, f217; P8-NEXT: bgtlr cr018; P8-NEXT: # %bb.1: # %entry19; P8-NEXT: fmr f1, f220; P8-NEXT: blr21entry:22 %cmp = fcmp ogt float %a, %b23 %cond = select i1 %cmp, float %a, float %b24 ret float %cond25}26 27define dso_local double @testdmax(double %a, double %b) local_unnamed_addr {28; P9-LABEL: testdmax:29; P9: # %bb.0: # %entry30; P9-NEXT: xsmaxcdp f1, f1, f231; P9-NEXT: blr32;33; P8-LABEL: testdmax:34; P8: # %bb.0: # %entry35; P8-NEXT: xscmpudp cr0, f1, f236; P8-NEXT: bgtlr cr037; P8-NEXT: # %bb.1: # %entry38; P8-NEXT: fmr f1, f239; P8-NEXT: blr40entry:41 %cmp = fcmp ogt double %a, %b42 %cond = select i1 %cmp, double %a, double %b43 ret double %cond44}45 46define dso_local float @testfmin(float %a, float %b) local_unnamed_addr {47; P9-LABEL: testfmin:48; P9: # %bb.0: # %entry49; P9-NEXT: xsmincdp f1, f1, f250; P9-NEXT: blr51;52; P8-LABEL: testfmin:53; P8: # %bb.0: # %entry54; P8-NEXT: fcmpu cr0, f1, f255; P8-NEXT: bltlr cr056; P8-NEXT: # %bb.1: # %entry57; P8-NEXT: fmr f1, f258; P8-NEXT: blr59entry:60 %cmp = fcmp olt float %a, %b61 %cond = select i1 %cmp, float %a, float %b62 ret float %cond63}64 65define dso_local double @testdmin(double %a, double %b) local_unnamed_addr {66; P9-LABEL: testdmin:67; P9: # %bb.0: # %entry68; P9-NEXT: xsmincdp f1, f1, f269; P9-NEXT: blr70;71; P8-LABEL: testdmin:72; P8: # %bb.0: # %entry73; P8-NEXT: xscmpudp cr0, f1, f274; P8-NEXT: bltlr cr075; P8-NEXT: # %bb.1: # %entry76; P8-NEXT: fmr f1, f277; P8-NEXT: blr78entry:79 %cmp = fcmp olt double %a, %b80 %cond = select i1 %cmp, double %a, double %b81 ret double %cond82}83 84define dso_local float @testfmax_fast(float %a, float %b) local_unnamed_addr {85; P9-LABEL: testfmax_fast:86; P9: # %bb.0: # %entry87; P9-NEXT: xsmaxdp f1, f1, f288; P9-NEXT: blr89;90; P8-LABEL: testfmax_fast:91; P8: # %bb.0: # %entry92; P8-NEXT: xsmaxdp f1, f1, f293; P8-NEXT: blr94entry:95 %cmp = fcmp nnan ninf ogt float %a, %b96 %cond = select nnan nsz i1 %cmp, float %a, float %b97 ret float %cond98}99define dso_local double @testdmax_fast(double %a, double %b) local_unnamed_addr {100; P9-LABEL: testdmax_fast:101; P9: # %bb.0: # %entry102; P9-NEXT: xsmaxdp f1, f1, f2103; P9-NEXT: blr104;105; P8-LABEL: testdmax_fast:106; P8: # %bb.0: # %entry107; P8-NEXT: xsmaxdp f1, f1, f2108; P8-NEXT: blr109entry:110 %cmp = fcmp nnan ninf ogt double %a, %b111 %cond = select nnan nsz i1 %cmp, double %a, double %b112 ret double %cond113}114define dso_local float @testfmin_fast(float %a, float %b) local_unnamed_addr {115; P9-LABEL: testfmin_fast:116; P9: # %bb.0: # %entry117; P9-NEXT: xsmindp f1, f1, f2118; P9-NEXT: blr119;120; P8-LABEL: testfmin_fast:121; P8: # %bb.0: # %entry122; P8-NEXT: xsmindp f1, f1, f2123; P8-NEXT: blr124entry:125 %cmp = fcmp nnan ninf olt float %a, %b126 %cond = select nnan nsz i1 %cmp, float %a, float %b127 ret float %cond128}129define dso_local double @testdmin_fast(double %a, double %b) local_unnamed_addr {130; P9-LABEL: testdmin_fast:131; P9: # %bb.0: # %entry132; P9-NEXT: xsmindp f1, f1, f2133; P9-NEXT: blr134;135; P8-LABEL: testdmin_fast:136; P8: # %bb.0: # %entry137; P8-NEXT: xsmindp f1, f1, f2138; P8-NEXT: blr139entry:140 %cmp = fcmp nnan ninf olt double %a, %b141 %cond = select nnan nsz i1 %cmp, double %a, double %b142 ret double %cond143}144