brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.0 KiB · b9737fe Raw
225 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc --mtriple=mipsisa32r6-linux-gnu < %s | FileCheck %s --check-prefix=MIPS32R63; RUN: llc --mtriple=mipsisa64r6-linux-gnu < %s | FileCheck %s --check-prefix=MIPS64R64 5define float @f(float nofpclass(nan) %a, float nofpclass(nan) %b) {6; MIPS32R6-LABEL: f:7; MIPS32R6:       # %bb.0: # %entry8; MIPS32R6-NEXT:    jr $ra9; MIPS32R6-NEXT:    max.s $f0, $f12, $f1410;11; MIPS64R6-LABEL: f:12; MIPS64R6:       # %bb.0: # %entry13; MIPS64R6-NEXT:    jr $ra14; MIPS64R6-NEXT:    max.s $f0, $f12, $f1315entry:16  %cond = tail call float @llvm.maximumnum.f32(float %a, float %b)17  ret float %cond18}19 20define {float, float} @m({float, float} nofpclass(nan) %a0, {float, float} nofpclass(nan) %a1) {21; MIPS32R6-LABEL: m:22; MIPS32R6:       # %bb.0: # %entry23; MIPS32R6-NEXT:    mtc1 $6, $f024; MIPS32R6-NEXT:    max.s $f0, $f12, $f025; MIPS32R6-NEXT:    mtc1 $7, $f126; MIPS32R6-NEXT:    jr $ra27; MIPS32R6-NEXT:    max.s $f2, $f14, $f128;29; MIPS64R6-LABEL: m:30; MIPS64R6:       # %bb.0: # %entry31; MIPS64R6-NEXT:    max.s $f0, $f12, $f1432; MIPS64R6-NEXT:    jr $ra33; MIPS64R6-NEXT:    max.s $f2, $f13, $f1534entry:35  %a0f0 = extractvalue {float, float} %a0, 036  %a0f1 = extractvalue {float, float} %a0, 137  %a1f0 = extractvalue {float, float} %a1, 038  %a1f1 = extractvalue {float, float} %a1, 139  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)40  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)41  %ret0 = insertvalue {float, float} poison, float %max0, 042  %ret1 = insertvalue {float, float} %ret0, float %max1, 143  ret {float, float} %ret144}45 46define [2 x float] @mA([2 x float] nofpclass(nan) %a0, [2 x float] nofpclass(nan) %a1) {47; MIPS32R6-LABEL: mA:48; MIPS32R6:       # %bb.0: # %entry49; MIPS32R6-NEXT:    mtc1 $6, $f050; MIPS32R6-NEXT:    max.s $f0, $f12, $f051; MIPS32R6-NEXT:    mtc1 $7, $f152; MIPS32R6-NEXT:    jr $ra53; MIPS32R6-NEXT:    max.s $f2, $f14, $f154;55; MIPS64R6-LABEL: mA:56; MIPS64R6:       # %bb.0: # %entry57; MIPS64R6-NEXT:    max.s $f0, $f12, $f1458; MIPS64R6-NEXT:    jr $ra59; MIPS64R6-NEXT:    max.s $f2, $f13, $f1560entry:61  %a0f0 = extractvalue [2 x float] %a0, 062  %a0f1 = extractvalue [2 x float] %a0, 163  %a1f0 = extractvalue [2 x float] %a1, 064  %a1f1 = extractvalue [2 x float] %a1, 165  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)66  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)67  %ret0 = insertvalue [2 x float] poison, float %max0, 068  %ret1 = insertvalue [2 x float] %ret0, float %max1, 169  ret [2 x float] %ret170}71 72define float @fS(float nofpclass(snan) %a, float nofpclass(snan) %b) {73; MIPS32R6-LABEL: fS:74; MIPS32R6:       # %bb.0: # %entry75; MIPS32R6-NEXT:    jr $ra76; MIPS32R6-NEXT:    max.s $f0, $f12, $f1477;78; MIPS64R6-LABEL: fS:79; MIPS64R6:       # %bb.0: # %entry80; MIPS64R6-NEXT:    jr $ra81; MIPS64R6-NEXT:    max.s $f0, $f12, $f1382entry:83  %cond = tail call float @llvm.maximumnum.f32(float %a, float %b)84  ret float %cond85}86 87define {float, float} @mS({float, float} nofpclass(snan) %a0, {float, float} nofpclass(snan) %a1) {88; MIPS32R6-LABEL: mS:89; MIPS32R6:       # %bb.0: # %entry90; MIPS32R6-NEXT:    mtc1 $6, $f091; MIPS32R6-NEXT:    max.s $f0, $f12, $f092; MIPS32R6-NEXT:    mtc1 $7, $f193; MIPS32R6-NEXT:    jr $ra94; MIPS32R6-NEXT:    max.s $f2, $f14, $f195;96; MIPS64R6-LABEL: mS:97; MIPS64R6:       # %bb.0: # %entry98; MIPS64R6-NEXT:    max.s $f0, $f12, $f1499; MIPS64R6-NEXT:    jr $ra100; MIPS64R6-NEXT:    max.s $f2, $f13, $f15101entry:102  %a0f0 = extractvalue {float, float} %a0, 0103  %a0f1 = extractvalue {float, float} %a0, 1104  %a1f0 = extractvalue {float, float} %a1, 0105  %a1f1 = extractvalue {float, float} %a1, 1106  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)107  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)108  %ret0 = insertvalue {float, float} poison, float %max0, 0109  %ret1 = insertvalue {float, float} %ret0, float %max1, 1110  ret {float, float} %ret1111}112 113define [2 x float] @mAS([2 x float] nofpclass(snan) %a0, [2 x float] nofpclass(snan) %a1) {114; MIPS32R6-LABEL: mAS:115; MIPS32R6:       # %bb.0: # %entry116; MIPS32R6-NEXT:    mtc1 $6, $f0117; MIPS32R6-NEXT:    max.s $f0, $f12, $f0118; MIPS32R6-NEXT:    mtc1 $7, $f1119; MIPS32R6-NEXT:    jr $ra120; MIPS32R6-NEXT:    max.s $f2, $f14, $f1121;122; MIPS64R6-LABEL: mAS:123; MIPS64R6:       # %bb.0: # %entry124; MIPS64R6-NEXT:    max.s $f0, $f12, $f14125; MIPS64R6-NEXT:    jr $ra126; MIPS64R6-NEXT:    max.s $f2, $f13, $f15127entry:128  %a0f0 = extractvalue [2 x float] %a0, 0129  %a0f1 = extractvalue [2 x float] %a0, 1130  %a1f0 = extractvalue [2 x float] %a1, 0131  %a1f1 = extractvalue [2 x float] %a1, 1132  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)133  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)134  %ret0 = insertvalue [2 x float] poison, float %max0, 0135  %ret1 = insertvalue [2 x float] %ret0, float %max1, 1136  ret [2 x float] %ret1137}138 139define float @fQ(float nofpclass(qnan) %a, float nofpclass(qnan) %b) {140; MIPS32R6-LABEL: fQ:141; MIPS32R6:       # %bb.0: # %entry142; MIPS32R6-NEXT:    min.s $f0, $f14, $f14143; MIPS32R6-NEXT:    min.s $f1, $f12, $f12144; MIPS32R6-NEXT:    jr $ra145; MIPS32R6-NEXT:    max.s $f0, $f1, $f0146;147; MIPS64R6-LABEL: fQ:148; MIPS64R6:       # %bb.0: # %entry149; MIPS64R6-NEXT:    min.s $f0, $f13, $f13150; MIPS64R6-NEXT:    min.s $f1, $f12, $f12151; MIPS64R6-NEXT:    jr $ra152; MIPS64R6-NEXT:    max.s $f0, $f1, $f0153entry:154  %cond = tail call float @llvm.maximumnum.f32(float %a, float %b)155  ret float %cond156}157 158define {float, float} @mQ({float, float} nofpclass(qnan) %a0, {float, float} nofpclass(qnan) %a1) {159; MIPS32R6-LABEL: mQ:160; MIPS32R6:       # %bb.0: # %entry161; MIPS32R6-NEXT:    min.s $f0, $f12, $f12162; MIPS32R6-NEXT:    mtc1 $6, $f1163; MIPS32R6-NEXT:    min.s $f1, $f1, $f1164; MIPS32R6-NEXT:    max.s $f0, $f0, $f1165; MIPS32R6-NEXT:    min.s $f1, $f14, $f14166; MIPS32R6-NEXT:    mtc1 $7, $f2167; MIPS32R6-NEXT:    min.s $f2, $f2, $f2168; MIPS32R6-NEXT:    jr $ra169; MIPS32R6-NEXT:    max.s $f2, $f1, $f2170;171; MIPS64R6-LABEL: mQ:172; MIPS64R6:       # %bb.0: # %entry173; MIPS64R6-NEXT:    min.s $f0, $f14, $f14174; MIPS64R6-NEXT:    min.s $f1, $f12, $f12175; MIPS64R6-NEXT:    max.s $f0, $f1, $f0176; MIPS64R6-NEXT:    min.s $f1, $f15, $f15177; MIPS64R6-NEXT:    min.s $f2, $f13, $f13178; MIPS64R6-NEXT:    jr $ra179; MIPS64R6-NEXT:    max.s $f2, $f2, $f1180entry:181  %a0f0 = extractvalue {float, float} %a0, 0182  %a0f1 = extractvalue {float, float} %a0, 1183  %a1f0 = extractvalue {float, float} %a1, 0184  %a1f1 = extractvalue {float, float} %a1, 1185  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)186  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)187  %ret0 = insertvalue {float, float} poison, float %max0, 0188  %ret1 = insertvalue {float, float} %ret0, float %max1, 1189  ret {float, float} %ret1190}191 192define [2 x float] @mAQ([2 x float] nofpclass(qnan) %a0, [2 x float] nofpclass(qnan) %a1) {193; MIPS32R6-LABEL: mAQ:194; MIPS32R6:       # %bb.0: # %entry195; MIPS32R6-NEXT:    min.s $f0, $f12, $f12196; MIPS32R6-NEXT:    mtc1 $6, $f1197; MIPS32R6-NEXT:    min.s $f1, $f1, $f1198; MIPS32R6-NEXT:    max.s $f0, $f0, $f1199; MIPS32R6-NEXT:    min.s $f1, $f14, $f14200; MIPS32R6-NEXT:    mtc1 $7, $f2201; MIPS32R6-NEXT:    min.s $f2, $f2, $f2202; MIPS32R6-NEXT:    jr $ra203; MIPS32R6-NEXT:    max.s $f2, $f1, $f2204;205; MIPS64R6-LABEL: mAQ:206; MIPS64R6:       # %bb.0: # %entry207; MIPS64R6-NEXT:    min.s $f0, $f14, $f14208; MIPS64R6-NEXT:    min.s $f1, $f12, $f12209; MIPS64R6-NEXT:    max.s $f0, $f1, $f0210; MIPS64R6-NEXT:    min.s $f1, $f15, $f15211; MIPS64R6-NEXT:    min.s $f2, $f13, $f13212; MIPS64R6-NEXT:    jr $ra213; MIPS64R6-NEXT:    max.s $f2, $f2, $f1214entry:215  %a0f0 = extractvalue [2 x float] %a0, 0216  %a0f1 = extractvalue [2 x float] %a0, 1217  %a1f0 = extractvalue [2 x float] %a1, 0218  %a1f1 = extractvalue [2 x float] %a1, 1219  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)220  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)221  %ret0 = insertvalue [2 x float] poison, float %max0, 0222  %ret1 = insertvalue [2 x float] %ret0, float %max1, 1223  ret [2 x float] %ret1224}225