brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.5 KiB · 3139aa0 Raw
183 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc --mtriple=aarch64-linux-gnu < %s | FileCheck %s3 4define float @f(float nofpclass(nan) %a, float nofpclass(nan) %b) {5; CHECK-LABEL: f:6; CHECK:       // %bb.0: // %entry7; CHECK-NEXT:    fmaxnm s0, s0, s18; CHECK-NEXT:    ret9entry:10  %cond = tail call float @llvm.maximumnum.f32(float %a, float %b)11  ret float %cond12}13 14define <4 x float> @fv4f32(<4 x float> nofpclass(nan) %a, <4 x float> nofpclass(nan) %b) {15; CHECK-LABEL: fv4f32:16; CHECK:       // %bb.0: // %entry17; CHECK-NEXT:    fmaxnm v0.4s, v0.4s, v1.4s18; CHECK-NEXT:    ret19entry:20  %c = call <4 x float> @llvm.maximumnum.v4f32(<4 x float> %a, <4 x float> %b)21  ret <4 x float> %c22}23 24define {float, float} @m({float, float} nofpclass(nan) %a0, {float, float} nofpclass(nan) %a1) {25; CHECK-LABEL: m:26; CHECK:       // %bb.0: // %entry27; CHECK-NEXT:    fmaxnm s1, s1, s328; CHECK-NEXT:    fmaxnm s0, s0, s229; CHECK-NEXT:    ret30entry:31  %a0f0 = extractvalue {float, float} %a0, 032  %a0f1 = extractvalue {float, float} %a0, 133  %a1f0 = extractvalue {float, float} %a1, 034  %a1f1 = extractvalue {float, float} %a1, 135  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)36  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)37  %ret0 = insertvalue {float, float} poison, float %max0, 038  %ret1 = insertvalue {float, float} %ret0, float %max1, 139  ret {float, float} %ret140}41 42define [2 x float] @mA([2 x float] nofpclass(nan) %a0, [2 x float] nofpclass(nan) %a1) {43; CHECK-LABEL: mA:44; CHECK:       // %bb.0: // %entry45; CHECK-NEXT:    fmaxnm s1, s1, s346; CHECK-NEXT:    fmaxnm s0, s0, s247; CHECK-NEXT:    ret48entry:49  %a0f0 = extractvalue [2 x float] %a0, 050  %a0f1 = extractvalue [2 x float] %a0, 151  %a1f0 = extractvalue [2 x float] %a1, 052  %a1f1 = extractvalue [2 x float] %a1, 153  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)54  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)55  %ret0 = insertvalue [2 x float] poison, float %max0, 056  %ret1 = insertvalue [2 x float] %ret0, float %max1, 157  ret [2 x float] %ret158}59 60define float @fS(float nofpclass(snan) %a, float nofpclass(snan) %b) {61; CHECK-LABEL: fS:62; CHECK:       // %bb.0: // %entry63; CHECK-NEXT:    fmaxnm s0, s0, s164; CHECK-NEXT:    ret65entry:66  %cond = tail call float @llvm.maximumnum.f32(float %a, float %b)67  ret float %cond68}69 70define <4 x float> @fSv4f32(<4 x float> nofpclass(snan) %a, <4 x float> nofpclass(snan) %b) {71; CHECK-LABEL: fSv4f32:72; CHECK:       // %bb.0: // %entry73; CHECK-NEXT:    fmaxnm v0.4s, v0.4s, v1.4s74; CHECK-NEXT:    ret75entry:76  %c = call <4 x float> @llvm.maximumnum.v4f32(<4 x float> %a, <4 x float> %b)77  ret <4 x float> %c78}79 80define {float, float} @mS({float, float} nofpclass(snan) %a0, {float, float} nofpclass(snan) %a1) {81; CHECK-LABEL: mS:82; CHECK:       // %bb.0: // %entry83; CHECK-NEXT:    fmaxnm s1, s1, s384; CHECK-NEXT:    fmaxnm s0, s0, s285; CHECK-NEXT:    ret86entry:87  %a0f0 = extractvalue {float, float} %a0, 088  %a0f1 = extractvalue {float, float} %a0, 189  %a1f0 = extractvalue {float, float} %a1, 090  %a1f1 = extractvalue {float, float} %a1, 191  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)92  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)93  %ret0 = insertvalue {float, float} poison, float %max0, 094  %ret1 = insertvalue {float, float} %ret0, float %max1, 195  ret {float, float} %ret196}97 98define [2 x float] @mAS([2 x float] nofpclass(snan) %a0, [2 x float] nofpclass(snan) %a1) {99; CHECK-LABEL: mAS:100; CHECK:       // %bb.0: // %entry101; CHECK-NEXT:    fmaxnm s1, s1, s3102; CHECK-NEXT:    fmaxnm s0, s0, s2103; CHECK-NEXT:    ret104entry:105  %a0f0 = extractvalue [2 x float] %a0, 0106  %a0f1 = extractvalue [2 x float] %a0, 1107  %a1f0 = extractvalue [2 x float] %a1, 0108  %a1f1 = extractvalue [2 x float] %a1, 1109  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)110  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)111  %ret0 = insertvalue [2 x float] poison, float %max0, 0112  %ret1 = insertvalue [2 x float] %ret0, float %max1, 1113  ret [2 x float] %ret1114}115 116define float @fQ(float nofpclass(qnan) %a, float nofpclass(qnan) %b) {117; CHECK-LABEL: fQ:118; CHECK:       // %bb.0: // %entry119; CHECK-NEXT:    fminnm s1, s1, s1120; CHECK-NEXT:    fminnm s0, s0, s0121; CHECK-NEXT:    fmaxnm s0, s0, s1122; CHECK-NEXT:    ret123entry:124  %cond = tail call float @llvm.maximumnum.f32(float %a, float %b)125  ret float %cond126}127 128define <4 x float> @fQv4f32(<4 x float> nofpclass(qnan) %a, <4 x float> nofpclass(qnan) %b) {129; CHECK-LABEL: fQv4f32:130; CHECK:       // %bb.0: // %entry131; CHECK-NEXT:    fminnm v1.4s, v1.4s, v1.4s132; CHECK-NEXT:    fminnm v0.4s, v0.4s, v0.4s133; CHECK-NEXT:    fmaxnm v0.4s, v0.4s, v1.4s134; CHECK-NEXT:    ret135entry:136  %c = call <4 x float> @llvm.maximumnum.v4f32(<4 x float> %a, <4 x float> %b)137  ret <4 x float> %c138}139 140define {float, float} @mQ({float, float} nofpclass(qnan) %a0, {float, float} nofpclass(qnan) %a1) {141; CHECK-LABEL: mQ:142; CHECK:       // %bb.0: // %entry143; CHECK-NEXT:    fminnm s2, s2, s2144; CHECK-NEXT:    fminnm s0, s0, s0145; CHECK-NEXT:    fminnm s3, s3, s3146; CHECK-NEXT:    fminnm s1, s1, s1147; CHECK-NEXT:    fmaxnm s0, s0, s2148; CHECK-NEXT:    fmaxnm s1, s1, s3149; CHECK-NEXT:    ret150entry:151  %a0f0 = extractvalue {float, float} %a0, 0152  %a0f1 = extractvalue {float, float} %a0, 1153  %a1f0 = extractvalue {float, float} %a1, 0154  %a1f1 = extractvalue {float, float} %a1, 1155  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)156  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)157  %ret0 = insertvalue {float, float} poison, float %max0, 0158  %ret1 = insertvalue {float, float} %ret0, float %max1, 1159  ret {float, float} %ret1160}161 162define [2 x float] @mAQ([2 x float] nofpclass(qnan) %a0, [2 x float] nofpclass(qnan) %a1) {163; CHECK-LABEL: mAQ:164; CHECK:       // %bb.0: // %entry165; CHECK-NEXT:    fminnm s2, s2, s2166; CHECK-NEXT:    fminnm s0, s0, s0167; CHECK-NEXT:    fminnm s3, s3, s3168; CHECK-NEXT:    fminnm s1, s1, s1169; CHECK-NEXT:    fmaxnm s0, s0, s2170; CHECK-NEXT:    fmaxnm s1, s1, s3171; CHECK-NEXT:    ret172entry:173  %a0f0 = extractvalue [2 x float] %a0, 0174  %a0f1 = extractvalue [2 x float] %a0, 1175  %a1f0 = extractvalue [2 x float] %a1, 0176  %a1f1 = extractvalue [2 x float] %a1, 1177  %max0 = tail call float @llvm.maximumnum.f32(float %a0f0, float %a1f0)178  %max1 = tail call float @llvm.maximumnum.f32(float %a0f1, float %a1f1)179  %ret0 = insertvalue [2 x float] poison, float %max0, 0180  %ret1 = insertvalue [2 x float] %ret0, float %max1, 1181  ret [2 x float] %ret1182}183