Index: llvm/include/llvm/Analysis/ValueTracking.h =================================================================== --- llvm/include/llvm/Analysis/ValueTracking.h +++ llvm/include/llvm/Analysis/ValueTracking.h @@ -391,6 +391,18 @@ KnownFPClasses &= (fcPositive | fcNan); } + // Propagate knowledge that a non-NaN source implies the result can also not + // be a NaN. For unconstrained operations, signaling nans are not guaranteed + // to be quieted but cannot be introduced. + void propagateNaN(const KnownFPClass &Src, bool PreserveSign = false) { + if (Src.isKnownNever(fcNan)) { + knownNot(fcNan); + if (PreserveSign) + SignBit = Src.SignBit; + } else if (Src.isKnownNever(fcSNan)) + knownNot(fcSNan); + } + void resetAll() { *this = KnownFPClass(); } }; Index: llvm/lib/Analysis/ValueTracking.cpp =================================================================== --- llvm/lib/Analysis/ValueTracking.cpp +++ llvm/lib/Analysis/ValueTracking.cpp @@ -4860,12 +4860,18 @@ break; } - case Intrinsic::trunc: { + case Intrinsic::trunc: + case Intrinsic::floor: + case Intrinsic::ceil: + case Intrinsic::rint: + case Intrinsic::nearbyint: + case Intrinsic::round: + case Intrinsic::roundeven: { KnownFPClass KnownSrc; FPClassTest InterestedSrcs = InterestedClasses; if (InterestedClasses & fcZero) - InterestedClasses |= fcNormal | fcSubnormal; + InterestedSrcs |= fcNormal | fcSubnormal; computeKnownFPClass(II->getArgOperand(0), DemandedElts, InterestedSrcs, KnownSrc, Depth + 1, Q, TLI); @@ -4873,30 +4879,23 @@ // Integer results cannot be subnormal. Known.knownNot(fcSubnormal); - // trunc passes through infinities. - if (KnownSrc.isKnownNeverPosInfinity()) - Known.knownNot(fcPosInf); - if (KnownSrc.isKnownNeverNegInfinity()) - Known.knownNot(fcNegInf); - - // Non-constrained intrinsics do not guarantee signaling nan quieting. - if (KnownSrc.isKnownNeverNaN()) - Known.knownNot(fcNan); - - if (KnownSrc.isKnownNever(fcPosNormal)) - Known.knownNot(fcPosNormal); + Known.propagateNaN(KnownSrc, true); - if (KnownSrc.isKnownNever(fcNegNormal)) - Known.knownNot(fcNegNormal); - - if (KnownSrc.isKnownNever(fcPosZero | fcPosSubnormal | fcPosNormal)) - Known.knownNot(fcPosZero); + // Pass through infinities, except PPC_FP128 is a special case for + // intrinsics other than trunc. + if (IID == Intrinsic::trunc || !V->getType()->isMultiUnitFPType()) { + if (KnownSrc.isKnownNeverPosInfinity()) + Known.knownNot(fcPosInf); + if (KnownSrc.isKnownNeverNegInfinity()) + Known.knownNot(fcNegInf); + } - if (KnownSrc.isKnownNever(fcNegZero | fcNegSubnormal | fcNegNormal)) - Known.knownNot(fcNegZero); + // Negative round ups to 0 produce -0 + if (KnownSrc.isKnownNever(fcPosFinite)) + Known.knownNot(fcPosFinite); + if (KnownSrc.isKnownNever(fcNegFinite)) + Known.knownNot(fcNegFinite); - // Sign should be preserved - Known.SignBit = KnownSrc.SignBit; break; } case Intrinsic::exp: Index: llvm/test/Transforms/Attributor/nofpclass-ceil.ll =================================================================== --- llvm/test/Transforms/Attributor/nofpclass-ceil.ll +++ llvm/test/Transforms/Attributor/nofpclass-ceil.ll @@ -5,9 +5,9 @@ declare ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128) define float @ret_ceil(float %arg0) { -; CHECK-LABEL: define float @ret_ceil +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -15,9 +15,9 @@ } define float @ret_ceil_noinf(float nofpclass(inf) %arg0) { -; CHECK-LABEL: define float @ret_ceil_noinf +; CHECK-LABEL: define nofpclass(inf sub) float @ret_ceil_noinf ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -25,9 +25,9 @@ } define float @ret_ceil_nopinf(float nofpclass(pinf) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopinf +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_ceil_nopinf ; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -35,9 +35,9 @@ } define float @ret_ceil_noninf(float nofpclass(ninf) %arg0) { -; CHECK-LABEL: define float @ret_ceil_noninf +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_ceil_noninf ; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -45,9 +45,9 @@ } define float @ret_ceil_nonan(float nofpclass(nan) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nonan +; CHECK-LABEL: define nofpclass(nan sub) float @ret_ceil_nonan ; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -55,9 +55,9 @@ } define float @ret_ceil_noqnan(float nofpclass(qnan) %arg0) { -; CHECK-LABEL: define float @ret_ceil_noqnan +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_noqnan ; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -65,9 +65,9 @@ } define float @ret_ceil_nosnan(float nofpclass(snan) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nosnan +; CHECK-LABEL: define nofpclass(snan sub) float @ret_ceil_nosnan ; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -75,9 +75,9 @@ } define float @ret_ceil_nozero(float nofpclass(zero) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nozero +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nozero ; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -85,9 +85,9 @@ } define float @ret_ceil_nopzero(float nofpclass(pzero) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopzero +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nopzero ; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -95,9 +95,9 @@ } define float @ret_ceil_nonzero(float nofpclass(nzero) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nonzero +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nonzero ; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -105,9 +105,9 @@ } define float @ret_ceil_nonorm(float nofpclass(norm) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nonorm +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nonorm ; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -115,9 +115,9 @@ } define float @ret_ceil_nonnorm(float nofpclass(nnorm) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nonnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nonnorm ; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -125,9 +125,9 @@ } define float @ret_ceil_nopnorm(float nofpclass(pnorm) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nopnorm ; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -135,9 +135,9 @@ } define float @ret_ceil_nonsub(float nofpclass(nsub) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nonsub ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -145,9 +145,9 @@ } define float @ret_ceil_nopsub(float nofpclass(psub) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nopsub ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -155,9 +155,9 @@ } define float @ret_ceil_nonorm_nosub(float nofpclass(norm sub) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nonorm_nosub +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nonorm_nosub ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -165,9 +165,9 @@ } define float @ret_ceil_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopnorm_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nopnorm_nopsub ; CHECK-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -175,9 +175,9 @@ } define float @ret_ceil_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nonnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nonnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -185,9 +185,9 @@ } define float @ret_ceil_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_ceil_nopnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -195,9 +195,9 @@ } define ppc_fp128 @ret_ceil_ppcf128(ppc_fp128 %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_ceil_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_ceil_ppcf128 ; CHECK-SAME: (ppc_fp128 [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 %arg0) @@ -205,9 +205,9 @@ } define ppc_fp128 @ret_ceil_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_ceil_noinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_ceil_noinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 %arg0) @@ -215,9 +215,9 @@ } define ppc_fp128 @ret_ceil_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_ceil_nopinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_ceil_nopinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 %arg0) @@ -225,9 +225,9 @@ } define ppc_fp128 @ret_ceil_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_ceil_noninf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_ceil_noninf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 %arg0) @@ -235,9 +235,9 @@ } define ppc_fp128 @ret_ceil_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_ceil_nonan_ppcf128 +; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_ceil_nonan_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 %arg0) @@ -245,9 +245,9 @@ } define float @ret_ceil_noneg(float nofpclass(ninf nsub nnorm) %arg0) { -; CHECK-LABEL: define float @ret_ceil_noneg +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_ceil_noneg ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -255,9 +255,9 @@ } define float @ret_ceil_noneg_nonegzero(float nofpclass(ninf nsub nnorm nzero) %arg0) { -; CHECK-LABEL: define float @ret_ceil_noneg_nonegzero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_ceil_noneg_nonegzero ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -265,9 +265,9 @@ } define float @ret_ceil_noneg_nonegzero_nonan(float nofpclass(ninf nsub nnorm nzero nan) %arg0) { -; CHECK-LABEL: define float @ret_ceil_noneg_nonegzero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_ceil_noneg_nonegzero_nonan ; CHECK-SAME: (float nofpclass(nan ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -275,9 +275,9 @@ } define float @ret_ceil_noneg_nozero(float nofpclass(ninf nsub nnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_ceil_noneg_nozero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_ceil_noneg_nozero ; CHECK-SAME: (float nofpclass(ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -285,9 +285,9 @@ } define float @ret_ceil_noneg_nozero_nonan(float nofpclass(ninf nsub nnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_ceil_noneg_nozero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_ceil_noneg_nozero_nonan ; CHECK-SAME: (float nofpclass(nan ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -295,9 +295,9 @@ } define float @ret_ceil_nopos(float nofpclass(pinf psub pnorm) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopos +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_ceil_nopos ; CHECK-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -305,9 +305,9 @@ } define float @ret_ceil_nopos_nopzero(float nofpclass(pinf psub pnorm pzero) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopos_nopzero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_ceil_nopos_nopzero ; CHECK-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -315,9 +315,9 @@ } define float @ret_ceil_nopos_nopzero_nonan(float nofpclass(pinf psub pnorm pzero nan) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopos_nopzero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_ceil_nopos_nopzero_nonan ; CHECK-SAME: (float nofpclass(nan pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -325,9 +325,9 @@ } define float @ret_ceil_nopos_nozero(float nofpclass(pinf psub pnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopos_nozero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_ceil_nopos_nozero ; CHECK-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) @@ -335,9 +335,9 @@ } define float @ret_ceil_nopos_nozero_nonan(float nofpclass(pinf psub pnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_ceil_nopos_nozero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_ceil_nopos_nozero_nonan ; CHECK-SAME: (float nofpclass(nan pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.ceil.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.ceil.f32(float %arg0) Index: llvm/test/Transforms/Attributor/nofpclass-floor.ll =================================================================== --- llvm/test/Transforms/Attributor/nofpclass-floor.ll +++ llvm/test/Transforms/Attributor/nofpclass-floor.ll @@ -5,9 +5,9 @@ declare ppc_fp128 @llvm.floor.ppcf128(ppc_fp128) define float @ret_floor(float %arg0) { -; CHECK-LABEL: define float @ret_floor +; CHECK-LABEL: define nofpclass(sub) float @ret_floor ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -15,9 +15,9 @@ } define float @ret_floor_noinf(float nofpclass(inf) %arg0) { -; CHECK-LABEL: define float @ret_floor_noinf +; CHECK-LABEL: define nofpclass(inf sub) float @ret_floor_noinf ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -25,9 +25,9 @@ } define float @ret_floor_nopinf(float nofpclass(pinf) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopinf +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_floor_nopinf ; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -35,9 +35,9 @@ } define float @ret_floor_noninf(float nofpclass(ninf) %arg0) { -; CHECK-LABEL: define float @ret_floor_noninf +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_floor_noninf ; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -45,9 +45,9 @@ } define float @ret_floor_nonan(float nofpclass(nan) %arg0) { -; CHECK-LABEL: define float @ret_floor_nonan +; CHECK-LABEL: define nofpclass(nan sub) float @ret_floor_nonan ; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -55,9 +55,9 @@ } define float @ret_floor_noqnan(float nofpclass(qnan) %arg0) { -; CHECK-LABEL: define float @ret_floor_noqnan +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_noqnan ; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -65,9 +65,9 @@ } define float @ret_floor_nosnan(float nofpclass(snan) %arg0) { -; CHECK-LABEL: define float @ret_floor_nosnan +; CHECK-LABEL: define nofpclass(snan sub) float @ret_floor_nosnan ; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -75,9 +75,9 @@ } define float @ret_floor_nozero(float nofpclass(zero) %arg0) { -; CHECK-LABEL: define float @ret_floor_nozero +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nozero ; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -85,9 +85,9 @@ } define float @ret_floor_nopzero(float nofpclass(pzero) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopzero +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nopzero ; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -95,9 +95,9 @@ } define float @ret_floor_nonzero(float nofpclass(nzero) %arg0) { -; CHECK-LABEL: define float @ret_floor_nonzero +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nonzero ; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -105,9 +105,9 @@ } define float @ret_floor_nonorm(float nofpclass(norm) %arg0) { -; CHECK-LABEL: define float @ret_floor_nonorm +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nonorm ; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -115,9 +115,9 @@ } define float @ret_floor_nonnorm(float nofpclass(nnorm) %arg0) { -; CHECK-LABEL: define float @ret_floor_nonnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nonnorm ; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -125,9 +125,9 @@ } define float @ret_floor_nopnorm(float nofpclass(pnorm) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nopnorm ; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -135,9 +135,9 @@ } define float @ret_floor_nonsub(float nofpclass(nsub) %arg0) { -; CHECK-LABEL: define float @ret_floor_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nonsub ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -145,9 +145,9 @@ } define float @ret_floor_nopsub(float nofpclass(psub) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nopsub ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -155,9 +155,9 @@ } define float @ret_floor_nonorm_nosub(float nofpclass(norm sub) %arg0) { -; CHECK-LABEL: define float @ret_floor_nonorm_nosub +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nonorm_nosub ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -165,9 +165,9 @@ } define float @ret_floor_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopnorm_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nopnorm_nopsub ; CHECK-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -175,9 +175,9 @@ } define float @ret_floor_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_floor_nonnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nonnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -185,9 +185,9 @@ } define float @ret_floor_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nopnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -195,9 +195,9 @@ } define ppc_fp128 @ret_floor_ppcf128(ppc_fp128 %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_floor_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_floor_ppcf128 ; CHECK-SAME: (ppc_fp128 [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 %arg0) @@ -205,9 +205,9 @@ } define ppc_fp128 @ret_floor_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_floor_noinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_floor_noinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 %arg0) @@ -215,9 +215,9 @@ } define ppc_fp128 @ret_floor_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_floor_nopinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_floor_nopinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 %arg0) @@ -225,9 +225,9 @@ } define ppc_fp128 @ret_floor_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_floor_noninf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_floor_noninf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 %arg0) @@ -235,9 +235,9 @@ } define ppc_fp128 @ret_floor_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_floor_nonan_ppcf128 +; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_floor_nonan_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 %arg0) @@ -245,9 +245,9 @@ } define float @ret_floor_noneg(float nofpclass(ninf nsub nnorm) %arg0) { -; CHECK-LABEL: define float @ret_floor_noneg +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_floor_noneg ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -255,9 +255,9 @@ } define float @ret_floor_noneg_nonegzero(float nofpclass(ninf nsub nnorm nzero) %arg0) { -; CHECK-LABEL: define float @ret_floor_noneg_nonegzero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_floor_noneg_nonegzero ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -265,9 +265,9 @@ } define float @ret_floor_noneg_nonegzero_nonan(float nofpclass(ninf nsub nnorm nzero nan) %arg0) { -; CHECK-LABEL: define float @ret_floor_noneg_nonegzero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_floor_noneg_nonegzero_nonan ; CHECK-SAME: (float nofpclass(nan ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -275,9 +275,9 @@ } define float @ret_floor_noneg_nozero(float nofpclass(ninf nsub nnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_floor_noneg_nozero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_floor_noneg_nozero ; CHECK-SAME: (float nofpclass(ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -285,9 +285,9 @@ } define float @ret_floor_noneg_nozero_nonan(float nofpclass(ninf nsub nnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_floor_noneg_nozero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_floor_noneg_nozero_nonan ; CHECK-SAME: (float nofpclass(nan ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -295,9 +295,9 @@ } define float @ret_floor_nopos(float nofpclass(pinf psub pnorm) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopos +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_floor_nopos ; CHECK-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -305,9 +305,9 @@ } define float @ret_floor_nopos_nopzero(float nofpclass(pinf psub pnorm pzero) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopos_nopzero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_floor_nopos_nopzero ; CHECK-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -315,9 +315,9 @@ } define float @ret_floor_nopos_nopzero_nonan(float nofpclass(pinf psub pnorm pzero nan) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopos_nopzero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_floor_nopos_nopzero_nonan ; CHECK-SAME: (float nofpclass(nan pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -325,9 +325,9 @@ } define float @ret_floor_nopos_nozero(float nofpclass(pinf psub pnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopos_nozero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_floor_nopos_nozero ; CHECK-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) @@ -335,15 +335,44 @@ } define float @ret_floor_nopos_nozero_nonan(float nofpclass(pinf psub pnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_floor_nopos_nozero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_floor_nopos_nozero_nonan ; CHECK-SAME: (float nofpclass(nan pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.floor.f32(float %arg0) ret float %call } +define float @ret_floor_nopzero_nopnorm(float nofpclass(pzero pnorm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nopzero_nopnorm +; CHECK-SAME: (float nofpclass(pzero pnorm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.floor.f32(float %arg0) + ret float %call +} + +define float @ret_floor_nonzero_nonnorm(float nofpclass(nzero nnorm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nonzero_nonnorm +; CHECK-SAME: (float nofpclass(nzero nnorm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.floor.f32(float %arg0) + ret float %call +} + +define float @ret_floor_nozero_nonorm(float nofpclass(zero norm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_floor_nozero_nonorm +; CHECK-SAME: (float nofpclass(zero norm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.floor.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.floor.f32(float %arg0) + ret float %call +} Index: llvm/test/Transforms/Attributor/nofpclass-nearbyint.ll =================================================================== --- llvm/test/Transforms/Attributor/nofpclass-nearbyint.ll +++ llvm/test/Transforms/Attributor/nofpclass-nearbyint.ll @@ -5,9 +5,9 @@ declare ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128) define float @ret_nearbyint(float %arg0) { -; CHECK-LABEL: define float @ret_nearbyint +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -15,9 +15,9 @@ } define float @ret_nearbyint_noinf(float nofpclass(inf) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_noinf +; CHECK-LABEL: define nofpclass(inf sub) float @ret_nearbyint_noinf ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -25,9 +25,9 @@ } define float @ret_nearbyint_nopinf(float nofpclass(pinf) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopinf +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_nearbyint_nopinf ; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -35,9 +35,9 @@ } define float @ret_nearbyint_noninf(float nofpclass(ninf) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_noninf +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_nearbyint_noninf ; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -45,9 +45,9 @@ } define float @ret_nearbyint_nonan(float nofpclass(nan) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nonan +; CHECK-LABEL: define nofpclass(nan sub) float @ret_nearbyint_nonan ; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -55,9 +55,9 @@ } define float @ret_nearbyint_noqnan(float nofpclass(qnan) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_noqnan +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_noqnan ; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -65,9 +65,9 @@ } define float @ret_nearbyint_nosnan(float nofpclass(snan) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nosnan +; CHECK-LABEL: define nofpclass(snan sub) float @ret_nearbyint_nosnan ; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -75,9 +75,9 @@ } define float @ret_nearbyint_nozero(float nofpclass(zero) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nozero +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nozero ; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -85,9 +85,9 @@ } define float @ret_nearbyint_nopzero(float nofpclass(pzero) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopzero +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nopzero ; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -95,9 +95,9 @@ } define float @ret_nearbyint_nonzero(float nofpclass(nzero) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nonzero +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nonzero ; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -105,9 +105,9 @@ } define float @ret_nearbyint_nonorm(float nofpclass(norm) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nonorm +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nonorm ; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -115,9 +115,9 @@ } define float @ret_nearbyint_nonnorm(float nofpclass(nnorm) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nonnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nonnorm ; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -125,9 +125,9 @@ } define float @ret_nearbyint_nopnorm(float nofpclass(pnorm) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nopnorm ; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -135,9 +135,9 @@ } define float @ret_nearbyint_nonsub(float nofpclass(nsub) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nonsub ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -145,9 +145,9 @@ } define float @ret_nearbyint_nopsub(float nofpclass(psub) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nopsub ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -155,9 +155,9 @@ } define float @ret_nearbyint_nonorm_nosub(float nofpclass(norm sub) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nonorm_nosub +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nonorm_nosub ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -165,9 +165,9 @@ } define float @ret_nearbyint_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopnorm_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nopnorm_nopsub ; CHECK-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -175,9 +175,9 @@ } define float @ret_nearbyint_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nonnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nonnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -185,9 +185,9 @@ } define float @ret_nearbyint_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_nearbyint_nopnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -195,9 +195,9 @@ } define ppc_fp128 @ret_nearbyint_ppcf128(ppc_fp128 %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_nearbyint_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_nearbyint_ppcf128 ; CHECK-SAME: (ppc_fp128 [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 %arg0) @@ -205,9 +205,9 @@ } define ppc_fp128 @ret_nearbyint_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_nearbyint_noinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_nearbyint_noinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 %arg0) @@ -215,9 +215,9 @@ } define ppc_fp128 @ret_nearbyint_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_nearbyint_nopinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_nearbyint_nopinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 %arg0) @@ -225,9 +225,9 @@ } define ppc_fp128 @ret_nearbyint_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_nearbyint_noninf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_nearbyint_noninf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 %arg0) @@ -235,9 +235,9 @@ } define ppc_fp128 @ret_nearbyint_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_nearbyint_nonan_ppcf128 +; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_nearbyint_nonan_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 %arg0) @@ -245,9 +245,9 @@ } define float @ret_nearbyint_noneg(float nofpclass(ninf nsub nnorm) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_noneg +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_nearbyint_noneg ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -255,9 +255,9 @@ } define float @ret_nearbyint_noneg_nonegzero(float nofpclass(ninf nsub nnorm nzero) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_noneg_nonegzero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_nearbyint_noneg_nonegzero ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -265,9 +265,9 @@ } define float @ret_nearbyint_noneg_nonegzero_nonan(float nofpclass(ninf nsub nnorm nzero nan) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_noneg_nonegzero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_nearbyint_noneg_nonegzero_nonan ; CHECK-SAME: (float nofpclass(nan ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -275,9 +275,9 @@ } define float @ret_nearbyint_noneg_nozero(float nofpclass(ninf nsub nnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_noneg_nozero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_nearbyint_noneg_nozero ; CHECK-SAME: (float nofpclass(ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -285,9 +285,9 @@ } define float @ret_nearbyint_noneg_nozero_nonan(float nofpclass(ninf nsub nnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_noneg_nozero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_nearbyint_noneg_nozero_nonan ; CHECK-SAME: (float nofpclass(nan ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -295,9 +295,9 @@ } define float @ret_nearbyint_nopos(float nofpclass(pinf psub pnorm) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopos +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_nearbyint_nopos ; CHECK-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -305,9 +305,9 @@ } define float @ret_nearbyint_nopos_nopzero(float nofpclass(pinf psub pnorm pzero) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopos_nopzero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_nearbyint_nopos_nopzero ; CHECK-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -315,9 +315,9 @@ } define float @ret_nearbyint_nopos_nopzero_nonan(float nofpclass(pinf psub pnorm pzero nan) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopos_nopzero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_nearbyint_nopos_nopzero_nonan ; CHECK-SAME: (float nofpclass(nan pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -325,9 +325,9 @@ } define float @ret_nearbyint_nopos_nozero(float nofpclass(pinf psub pnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopos_nozero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_nearbyint_nopos_nozero ; CHECK-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) @@ -335,9 +335,9 @@ } define float @ret_nearbyint_nopos_nozero_nonan(float nofpclass(pinf psub pnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_nearbyint_nopos_nozero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_nearbyint_nopos_nozero_nonan ; CHECK-SAME: (float nofpclass(nan pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.nearbyint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.nearbyint.f32(float %arg0) Index: llvm/test/Transforms/Attributor/nofpclass-rint.ll =================================================================== --- llvm/test/Transforms/Attributor/nofpclass-rint.ll +++ llvm/test/Transforms/Attributor/nofpclass-rint.ll @@ -5,9 +5,9 @@ declare ppc_fp128 @llvm.rint.ppcf128(ppc_fp128) define float @ret_rint(float %arg0) { -; CHECK-LABEL: define float @ret_rint +; CHECK-LABEL: define nofpclass(sub) float @ret_rint ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -15,9 +15,9 @@ } define float @ret_rint_noinf(float nofpclass(inf) %arg0) { -; CHECK-LABEL: define float @ret_rint_noinf +; CHECK-LABEL: define nofpclass(inf sub) float @ret_rint_noinf ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -25,9 +25,9 @@ } define float @ret_rint_nopinf(float nofpclass(pinf) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopinf +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_rint_nopinf ; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -35,9 +35,9 @@ } define float @ret_rint_noninf(float nofpclass(ninf) %arg0) { -; CHECK-LABEL: define float @ret_rint_noninf +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_rint_noninf ; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -45,9 +45,9 @@ } define float @ret_rint_nonan(float nofpclass(nan) %arg0) { -; CHECK-LABEL: define float @ret_rint_nonan +; CHECK-LABEL: define nofpclass(nan sub) float @ret_rint_nonan ; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -55,9 +55,9 @@ } define float @ret_rint_noqnan(float nofpclass(qnan) %arg0) { -; CHECK-LABEL: define float @ret_rint_noqnan +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_noqnan ; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -65,9 +65,9 @@ } define float @ret_rint_nosnan(float nofpclass(snan) %arg0) { -; CHECK-LABEL: define float @ret_rint_nosnan +; CHECK-LABEL: define nofpclass(snan sub) float @ret_rint_nosnan ; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -75,9 +75,9 @@ } define float @ret_rint_nozero(float nofpclass(zero) %arg0) { -; CHECK-LABEL: define float @ret_rint_nozero +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nozero ; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -85,9 +85,9 @@ } define float @ret_rint_nopzero(float nofpclass(pzero) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopzero +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopzero ; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -95,9 +95,9 @@ } define float @ret_rint_nonzero(float nofpclass(nzero) %arg0) { -; CHECK-LABEL: define float @ret_rint_nonzero +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonzero ; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -105,9 +105,9 @@ } define float @ret_rint_nonorm(float nofpclass(norm) %arg0) { -; CHECK-LABEL: define float @ret_rint_nonorm +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonorm ; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -115,9 +115,9 @@ } define float @ret_rint_nonnorm(float nofpclass(nnorm) %arg0) { -; CHECK-LABEL: define float @ret_rint_nonnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonnorm ; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -125,9 +125,9 @@ } define float @ret_rint_nopnorm(float nofpclass(pnorm) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopnorm ; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -135,9 +135,9 @@ } define float @ret_rint_nonsub(float nofpclass(nsub) %arg0) { -; CHECK-LABEL: define float @ret_rint_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonsub ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -145,9 +145,9 @@ } define float @ret_rint_nopsub(float nofpclass(psub) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopsub ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -155,9 +155,9 @@ } define float @ret_rint_nonorm_nosub(float nofpclass(norm sub) %arg0) { -; CHECK-LABEL: define float @ret_rint_nonorm_nosub +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonorm_nosub ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -165,9 +165,9 @@ } define float @ret_rint_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopnorm_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopnorm_nopsub ; CHECK-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -175,9 +175,9 @@ } define float @ret_rint_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_rint_nonnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nonnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -185,9 +185,9 @@ } define float @ret_rint_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_rint_nopnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -195,9 +195,9 @@ } define ppc_fp128 @ret_rint_ppcf128(ppc_fp128 %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_rint_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_rint_ppcf128 ; CHECK-SAME: (ppc_fp128 [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0) @@ -205,9 +205,9 @@ } define ppc_fp128 @ret_rint_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_rint_noinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_rint_noinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0) @@ -215,9 +215,9 @@ } define ppc_fp128 @ret_rint_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_rint_nopinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_rint_nopinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0) @@ -225,9 +225,9 @@ } define ppc_fp128 @ret_rint_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_rint_noninf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_rint_noninf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0) @@ -235,9 +235,9 @@ } define ppc_fp128 @ret_rint_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_rint_nonan_ppcf128 +; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_rint_nonan_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %arg0) @@ -245,9 +245,9 @@ } define float @ret_rint_noneg(float nofpclass(ninf nsub nnorm) %arg0) { -; CHECK-LABEL: define float @ret_rint_noneg +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_rint_noneg ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -255,9 +255,9 @@ } define float @ret_rint_noneg_nonegzero(float nofpclass(ninf nsub nnorm nzero) %arg0) { -; CHECK-LABEL: define float @ret_rint_noneg_nonegzero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_rint_noneg_nonegzero ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -265,9 +265,9 @@ } define float @ret_rint_noneg_nonegzero_nonan(float nofpclass(ninf nsub nnorm nzero nan) %arg0) { -; CHECK-LABEL: define float @ret_rint_noneg_nonegzero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_rint_noneg_nonegzero_nonan ; CHECK-SAME: (float nofpclass(nan ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -275,9 +275,9 @@ } define float @ret_rint_noneg_nozero(float nofpclass(ninf nsub nnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_rint_noneg_nozero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_rint_noneg_nozero ; CHECK-SAME: (float nofpclass(ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -285,9 +285,9 @@ } define float @ret_rint_noneg_nozero_nonan(float nofpclass(ninf nsub nnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_rint_noneg_nozero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_rint_noneg_nozero_nonan ; CHECK-SAME: (float nofpclass(nan ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -295,9 +295,9 @@ } define float @ret_rint_nopos(float nofpclass(pinf psub pnorm) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopos +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_rint_nopos ; CHECK-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -305,9 +305,9 @@ } define float @ret_rint_nopos_nopzero(float nofpclass(pinf psub pnorm pzero) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopos_nopzero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_rint_nopos_nopzero ; CHECK-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -315,9 +315,9 @@ } define float @ret_rint_nopos_nopzero_nonan(float nofpclass(pinf psub pnorm pzero nan) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopos_nopzero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_rint_nopos_nopzero_nonan ; CHECK-SAME: (float nofpclass(nan pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -325,9 +325,9 @@ } define float @ret_rint_nopos_nozero(float nofpclass(pinf psub pnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopos_nozero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_rint_nopos_nozero ; CHECK-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) @@ -335,9 +335,9 @@ } define float @ret_rint_nopos_nozero_nonan(float nofpclass(pinf psub pnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_rint_nopos_nozero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_rint_nopos_nozero_nonan ; CHECK-SAME: (float nofpclass(nan pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.rint.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.rint.f32(float %arg0) Index: llvm/test/Transforms/Attributor/nofpclass-round.ll =================================================================== --- llvm/test/Transforms/Attributor/nofpclass-round.ll +++ llvm/test/Transforms/Attributor/nofpclass-round.ll @@ -5,9 +5,9 @@ declare ppc_fp128 @llvm.round.ppcf128(ppc_fp128) define float @ret_round(float %arg0) { -; CHECK-LABEL: define float @ret_round +; CHECK-LABEL: define nofpclass(sub) float @ret_round ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -15,9 +15,9 @@ } define float @ret_round_noinf(float nofpclass(inf) %arg0) { -; CHECK-LABEL: define float @ret_round_noinf +; CHECK-LABEL: define nofpclass(inf sub) float @ret_round_noinf ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -25,9 +25,9 @@ } define float @ret_round_nopinf(float nofpclass(pinf) %arg0) { -; CHECK-LABEL: define float @ret_round_nopinf +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_round_nopinf ; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -35,9 +35,9 @@ } define float @ret_round_noninf(float nofpclass(ninf) %arg0) { -; CHECK-LABEL: define float @ret_round_noninf +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_round_noninf ; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -45,9 +45,9 @@ } define float @ret_round_nonan(float nofpclass(nan) %arg0) { -; CHECK-LABEL: define float @ret_round_nonan +; CHECK-LABEL: define nofpclass(nan sub) float @ret_round_nonan ; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -55,9 +55,9 @@ } define float @ret_round_noqnan(float nofpclass(qnan) %arg0) { -; CHECK-LABEL: define float @ret_round_noqnan +; CHECK-LABEL: define nofpclass(sub) float @ret_round_noqnan ; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -65,9 +65,9 @@ } define float @ret_round_nosnan(float nofpclass(snan) %arg0) { -; CHECK-LABEL: define float @ret_round_nosnan +; CHECK-LABEL: define nofpclass(snan sub) float @ret_round_nosnan ; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -75,9 +75,9 @@ } define float @ret_round_nozero(float nofpclass(zero) %arg0) { -; CHECK-LABEL: define float @ret_round_nozero +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nozero ; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -85,9 +85,9 @@ } define float @ret_round_nopzero(float nofpclass(pzero) %arg0) { -; CHECK-LABEL: define float @ret_round_nopzero +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopzero ; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -95,9 +95,9 @@ } define float @ret_round_nonzero(float nofpclass(nzero) %arg0) { -; CHECK-LABEL: define float @ret_round_nonzero +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonzero ; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -105,9 +105,9 @@ } define float @ret_round_nonorm(float nofpclass(norm) %arg0) { -; CHECK-LABEL: define float @ret_round_nonorm +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonorm ; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -115,9 +115,9 @@ } define float @ret_round_nonnorm(float nofpclass(nnorm) %arg0) { -; CHECK-LABEL: define float @ret_round_nonnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonnorm ; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -125,9 +125,9 @@ } define float @ret_round_nopnorm(float nofpclass(pnorm) %arg0) { -; CHECK-LABEL: define float @ret_round_nopnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopnorm ; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -135,9 +135,9 @@ } define float @ret_round_nonsub(float nofpclass(nsub) %arg0) { -; CHECK-LABEL: define float @ret_round_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonsub ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -145,9 +145,9 @@ } define float @ret_round_nopsub(float nofpclass(psub) %arg0) { -; CHECK-LABEL: define float @ret_round_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopsub ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -155,9 +155,9 @@ } define float @ret_round_nonorm_nosub(float nofpclass(norm sub) %arg0) { -; CHECK-LABEL: define float @ret_round_nonorm_nosub +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonorm_nosub ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -165,9 +165,9 @@ } define float @ret_round_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) { -; CHECK-LABEL: define float @ret_round_nopnorm_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopnorm_nopsub ; CHECK-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -175,9 +175,9 @@ } define float @ret_round_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_round_nonnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -185,9 +185,9 @@ } define float @ret_round_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_round_nopnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -195,9 +195,9 @@ } define ppc_fp128 @ret_round_ppcf128(ppc_fp128 %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_round_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_round_ppcf128 ; CHECK-SAME: (ppc_fp128 [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0) @@ -205,9 +205,9 @@ } define ppc_fp128 @ret_round_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_round_noinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_round_noinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0) @@ -215,9 +215,9 @@ } define ppc_fp128 @ret_round_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_round_nopinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_round_nopinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0) @@ -225,9 +225,9 @@ } define ppc_fp128 @ret_round_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_round_noninf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_round_noninf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0) @@ -235,9 +235,9 @@ } define ppc_fp128 @ret_round_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_round_nonan_ppcf128 +; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_round_nonan_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.round.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %arg0) @@ -245,9 +245,9 @@ } define float @ret_round_noneg(float nofpclass(ninf nsub nnorm) %arg0) { -; CHECK-LABEL: define float @ret_round_noneg +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_round_noneg ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -255,9 +255,9 @@ } define float @ret_round_noneg_nonegzero(float nofpclass(ninf nsub nnorm nzero) %arg0) { -; CHECK-LABEL: define float @ret_round_noneg_nonegzero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_round_noneg_nonegzero ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -265,9 +265,9 @@ } define float @ret_round_noneg_nonegzero_nonan(float nofpclass(ninf nsub nnorm nzero nan) %arg0) { -; CHECK-LABEL: define float @ret_round_noneg_nonegzero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_round_noneg_nonegzero_nonan ; CHECK-SAME: (float nofpclass(nan ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -275,9 +275,9 @@ } define float @ret_round_noneg_nozero(float nofpclass(ninf nsub nnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_round_noneg_nozero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_round_noneg_nozero ; CHECK-SAME: (float nofpclass(ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -285,9 +285,9 @@ } define float @ret_round_noneg_nozero_nonan(float nofpclass(ninf nsub nnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_round_noneg_nozero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_round_noneg_nozero_nonan ; CHECK-SAME: (float nofpclass(nan ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -295,9 +295,9 @@ } define float @ret_round_nopos(float nofpclass(pinf psub pnorm) %arg0) { -; CHECK-LABEL: define float @ret_round_nopos +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_round_nopos ; CHECK-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -305,9 +305,9 @@ } define float @ret_round_nopos_nopzero(float nofpclass(pinf psub pnorm pzero) %arg0) { -; CHECK-LABEL: define float @ret_round_nopos_nopzero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_round_nopos_nopzero ; CHECK-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -315,9 +315,9 @@ } define float @ret_round_nopos_nopzero_nonan(float nofpclass(pinf psub pnorm pzero nan) %arg0) { -; CHECK-LABEL: define float @ret_round_nopos_nopzero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_round_nopos_nopzero_nonan ; CHECK-SAME: (float nofpclass(nan pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -325,9 +325,9 @@ } define float @ret_round_nopos_nozero(float nofpclass(pinf psub pnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_round_nopos_nozero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_round_nopos_nozero ; CHECK-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) @@ -335,9 +335,39 @@ } define float @ret_round_nopos_nozero_nonan(float nofpclass(pinf psub pnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_round_nopos_nozero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_round_nopos_nozero_nonan ; CHECK-SAME: (float nofpclass(nan pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.round.f32(float %arg0) + ret float %call +} + +define float @ret_round_nopzero_nopnorm(float nofpclass(pzero pnorm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nopzero_nopnorm +; CHECK-SAME: (float nofpclass(pzero pnorm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.round.f32(float %arg0) + ret float %call +} + +define float @ret_round_nonzero_nonnorm(float nofpclass(nzero nnorm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nonzero_nonnorm +; CHECK-SAME: (float nofpclass(nzero nnorm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.round.f32(float %arg0) + ret float %call +} + +define float @ret_round_nozero_nonorm(float nofpclass(zero norm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_round_nozero_nonorm +; CHECK-SAME: (float nofpclass(zero norm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.round.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.round.f32(float %arg0) Index: llvm/test/Transforms/Attributor/nofpclass-roundeven.ll =================================================================== --- llvm/test/Transforms/Attributor/nofpclass-roundeven.ll +++ llvm/test/Transforms/Attributor/nofpclass-roundeven.ll @@ -5,9 +5,9 @@ declare ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128) define float @ret_roundeven(float %arg0) { -; CHECK-LABEL: define float @ret_roundeven +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven ; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -15,9 +15,9 @@ } define float @ret_roundeven_noinf(float nofpclass(inf) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_noinf +; CHECK-LABEL: define nofpclass(inf sub) float @ret_roundeven_noinf ; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -25,9 +25,9 @@ } define float @ret_roundeven_nopinf(float nofpclass(pinf) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopinf +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_roundeven_nopinf ; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -35,9 +35,9 @@ } define float @ret_roundeven_noninf(float nofpclass(ninf) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_noninf +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_roundeven_noninf ; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -45,9 +45,9 @@ } define float @ret_roundeven_nonan(float nofpclass(nan) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nonan +; CHECK-LABEL: define nofpclass(nan sub) float @ret_roundeven_nonan ; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -55,9 +55,9 @@ } define float @ret_roundeven_noqnan(float nofpclass(qnan) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_noqnan +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_noqnan ; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -65,9 +65,9 @@ } define float @ret_roundeven_nosnan(float nofpclass(snan) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nosnan +; CHECK-LABEL: define nofpclass(snan sub) float @ret_roundeven_nosnan ; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -75,9 +75,9 @@ } define float @ret_roundeven_nozero(float nofpclass(zero) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nozero +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nozero ; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -85,9 +85,9 @@ } define float @ret_roundeven_nopzero(float nofpclass(pzero) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopzero +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nopzero ; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -95,9 +95,9 @@ } define float @ret_roundeven_nonzero(float nofpclass(nzero) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nonzero +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nonzero ; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -105,9 +105,9 @@ } define float @ret_roundeven_nonorm(float nofpclass(norm) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nonorm +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nonorm ; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -115,9 +115,9 @@ } define float @ret_roundeven_nonnorm(float nofpclass(nnorm) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nonnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nonnorm ; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -125,9 +125,9 @@ } define float @ret_roundeven_nopnorm(float nofpclass(pnorm) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nopnorm ; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -135,9 +135,9 @@ } define float @ret_roundeven_nonsub(float nofpclass(nsub) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nonsub ; CHECK-SAME: (float nofpclass(nsub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -145,9 +145,9 @@ } define float @ret_roundeven_nopsub(float nofpclass(psub) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nopsub ; CHECK-SAME: (float nofpclass(psub) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -155,9 +155,9 @@ } define float @ret_roundeven_nonorm_nosub(float nofpclass(norm sub) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nonorm_nosub +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nonorm_nosub ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -165,9 +165,9 @@ } define float @ret_roundeven_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopnorm_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nopnorm_nopsub ; CHECK-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -175,9 +175,9 @@ } define float @ret_roundeven_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nonnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nonnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -185,9 +185,9 @@ } define float @ret_roundeven_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nopnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -195,9 +195,9 @@ } define ppc_fp128 @ret_roundeven_ppcf128(ppc_fp128 %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_roundeven_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_roundeven_ppcf128 ; CHECK-SAME: (ppc_fp128 [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 %arg0) @@ -205,9 +205,9 @@ } define ppc_fp128 @ret_roundeven_noinf_ppcf128(ppc_fp128 nofpclass(inf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_roundeven_noinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_roundeven_noinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 %arg0) @@ -215,9 +215,9 @@ } define ppc_fp128 @ret_roundeven_nopinf_ppcf128(ppc_fp128 nofpclass(pinf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_roundeven_nopinf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_roundeven_nopinf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 %arg0) @@ -225,9 +225,9 @@ } define ppc_fp128 @ret_roundeven_noninf_ppcf128(ppc_fp128 nofpclass(ninf) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_roundeven_noninf_ppcf128 +; CHECK-LABEL: define nofpclass(sub) ppc_fp128 @ret_roundeven_noninf_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 %arg0) @@ -235,9 +235,9 @@ } define ppc_fp128 @ret_roundeven_nonan_ppcf128(ppc_fp128 nofpclass(nan) %arg0) { -; CHECK-LABEL: define ppc_fp128 @ret_roundeven_nonan_ppcf128 +; CHECK-LABEL: define nofpclass(nan sub) ppc_fp128 @ret_roundeven_nonan_ppcf128 ; CHECK-SAME: (ppc_fp128 nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan sub) ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret ppc_fp128 [[CALL]] ; %call = call ppc_fp128 @llvm.roundeven.ppcf128(ppc_fp128 %arg0) @@ -245,9 +245,9 @@ } define float @ret_roundeven_noneg(float nofpclass(ninf nsub nnorm) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_noneg +; CHECK-LABEL: define nofpclass(ninf sub) float @ret_roundeven_noneg ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -255,9 +255,9 @@ } define float @ret_roundeven_noneg_nonegzero(float nofpclass(ninf nsub nnorm nzero) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_noneg_nonegzero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_roundeven_noneg_nonegzero ; CHECK-SAME: (float nofpclass(ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -265,9 +265,9 @@ } define float @ret_roundeven_noneg_nonegzero_nonan(float nofpclass(ninf nsub nnorm nzero nan) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_noneg_nonegzero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_roundeven_noneg_nonegzero_nonan ; CHECK-SAME: (float nofpclass(nan ninf nzero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -275,9 +275,9 @@ } define float @ret_roundeven_noneg_nozero(float nofpclass(ninf nsub nnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_noneg_nozero +; CHECK-LABEL: define nofpclass(ninf nzero sub nnorm) float @ret_roundeven_noneg_nozero ; CHECK-SAME: (float nofpclass(ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nzero sub nnorm) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -285,9 +285,9 @@ } define float @ret_roundeven_noneg_nozero_nonan(float nofpclass(ninf nsub nnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_noneg_nozero_nonan +; CHECK-LABEL: define nofpclass(nan ninf nzero sub nnorm) float @ret_roundeven_noneg_nozero_nonan ; CHECK-SAME: (float nofpclass(nan ninf zero nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan ninf nzero sub nnorm) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -295,9 +295,9 @@ } define float @ret_roundeven_nopos(float nofpclass(pinf psub pnorm) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopos +; CHECK-LABEL: define nofpclass(pinf sub) float @ret_roundeven_nopos ; CHECK-SAME: (float nofpclass(pinf psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -305,9 +305,9 @@ } define float @ret_roundeven_nopos_nopzero(float nofpclass(pinf psub pnorm pzero) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopos_nopzero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_roundeven_nopos_nopzero ; CHECK-SAME: (float nofpclass(pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -315,9 +315,9 @@ } define float @ret_roundeven_nopos_nopzero_nonan(float nofpclass(pinf psub pnorm pzero nan) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopos_nopzero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_roundeven_nopos_nopzero_nonan ; CHECK-SAME: (float nofpclass(nan pinf pzero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -325,9 +325,9 @@ } define float @ret_roundeven_nopos_nozero(float nofpclass(pinf psub pnorm zero) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopos_nozero +; CHECK-LABEL: define nofpclass(pinf pzero sub pnorm) float @ret_roundeven_nopos_nozero ; CHECK-SAME: (float nofpclass(pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(pinf pzero sub pnorm) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) @@ -335,9 +335,39 @@ } define float @ret_roundeven_nopos_nozero_nonan(float nofpclass(pinf psub pnorm zero nan) %arg0) { -; CHECK-LABEL: define float @ret_roundeven_nopos_nozero_nonan +; CHECK-LABEL: define nofpclass(nan pinf pzero sub pnorm) float @ret_roundeven_nopos_nozero_nonan ; CHECK-SAME: (float nofpclass(nan pinf zero psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(nan pinf pzero sub pnorm) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.roundeven.f32(float %arg0) + ret float %call +} + +define float @ret_roundeven_nopzero_nopnorm(float nofpclass(pzero pnorm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nopzero_nopnorm +; CHECK-SAME: (float nofpclass(pzero pnorm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.roundeven.f32(float %arg0) + ret float %call +} + +define float @ret_roundeven_nonzero_nonnorm(float nofpclass(nzero nnorm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nonzero_nonnorm +; CHECK-SAME: (float nofpclass(nzero nnorm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.roundeven.f32(float %arg0) + ret float %call +} + +define float @ret_roundeven_nozero_nonorm(float nofpclass(zero norm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_roundeven_nozero_nonorm +; CHECK-SAME: (float nofpclass(zero norm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.roundeven.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.roundeven.f32(float %arg0) Index: llvm/test/Transforms/Attributor/nofpclass-trunc.ll =================================================================== --- llvm/test/Transforms/Attributor/nofpclass-trunc.ll +++ llvm/test/Transforms/Attributor/nofpclass-trunc.ll @@ -65,9 +65,9 @@ } define float @ret_trunc_nosnan(float nofpclass(snan) %arg0) { -; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nosnan +; CHECK-LABEL: define nofpclass(snan sub) float @ret_trunc_nosnan ; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(snan sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.trunc.f32(float %arg0) @@ -105,9 +105,9 @@ } define float @ret_trunc_nonorm(float nofpclass(norm) %arg0) { -; CHECK-LABEL: define nofpclass(sub norm) float @ret_trunc_nonorm +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonorm ; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub norm) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.trunc.f32(float %arg0) @@ -115,9 +115,9 @@ } define float @ret_trunc_nonnorm(float nofpclass(nnorm) %arg0) { -; CHECK-LABEL: define nofpclass(sub nnorm) float @ret_trunc_nonnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonnorm ; CHECK-SAME: (float nofpclass(nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub nnorm) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.trunc.f32(float %arg0) @@ -125,9 +125,9 @@ } define float @ret_trunc_nopnorm(float nofpclass(pnorm) %arg0) { -; CHECK-LABEL: define nofpclass(sub pnorm) float @ret_trunc_nopnorm +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopnorm ; CHECK-SAME: (float nofpclass(pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub pnorm) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.trunc.f32(float %arg0) @@ -155,9 +155,9 @@ } define float @ret_trunc_nonorm_nosub(float nofpclass(norm sub) %arg0) { -; CHECK-LABEL: define nofpclass(sub norm) float @ret_trunc_nonorm_nosub +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonorm_nosub ; CHECK-SAME: (float nofpclass(sub norm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub norm) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.trunc.f32(float %arg0) @@ -165,9 +165,9 @@ } define float @ret_trunc_nopnorm_nopsub(float nofpclass(pnorm psub) %arg0) { -; CHECK-LABEL: define nofpclass(sub pnorm) float @ret_trunc_nopnorm_nopsub +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopnorm_nopsub ; CHECK-SAME: (float nofpclass(psub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub pnorm) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.trunc.f32(float %arg0) @@ -175,9 +175,9 @@ } define float @ret_trunc_nonnorm_nonsub(float nofpclass(nnorm nsub) %arg0) { -; CHECK-LABEL: define nofpclass(sub nnorm) float @ret_trunc_nonnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub nnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub nnorm) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.trunc.f32(float %arg0) @@ -185,9 +185,9 @@ } define float @ret_trunc_nopnorm_nonsub(float nofpclass(pnorm nsub) %arg0) { -; CHECK-LABEL: define nofpclass(sub pnorm) float @ret_trunc_nopnorm_nonsub +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopnorm_nonsub ; CHECK-SAME: (float nofpclass(nsub pnorm) [[ARG0:%.*]]) #[[ATTR1]] { -; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub pnorm) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] ; CHECK-NEXT: ret float [[CALL]] ; %call = call float @llvm.trunc.f32(float %arg0) @@ -243,5 +243,36 @@ %call = call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %arg0) ret ppc_fp128 %call } + +define float @ret_trunc_nopzero_nopnorm(float nofpclass(pzero pnorm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nopzero_nopnorm +; CHECK-SAME: (float nofpclass(pzero pnorm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.trunc.f32(float %arg0) + ret float %call +} + +define float @ret_trunc_nonzero_nonnorm(float nofpclass(nzero nnorm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nonzero_nonnorm +; CHECK-SAME: (float nofpclass(nzero nnorm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.trunc.f32(float %arg0) + ret float %call +} + +define float @ret_trunc_nozero_nonorm(float nofpclass(zero norm) %arg0) { +; CHECK-LABEL: define nofpclass(sub) float @ret_trunc_nozero_nonorm +; CHECK-SAME: (float nofpclass(zero norm) [[ARG0:%.*]]) #[[ATTR1]] { +; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(sub) float @llvm.trunc.f32(float [[ARG0]]) #[[ATTR2]] +; CHECK-NEXT: ret float [[CALL]] +; + %call = call float @llvm.trunc.f32(float %arg0) + ret float %call +} + ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: ; TUNIT: {{.*}} Index: llvm/test/Transforms/Attributor/nofree.ll =================================================================== --- llvm/test/Transforms/Attributor/nofree.ll +++ llvm/test/Transforms/Attributor/nofree.ll @@ -258,7 +258,7 @@ ; CHECK: Function Attrs: nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable ; CHECK-LABEL: define {{[^@]+}}@call_floor2 ; CHECK-SAME: (float [[A:%.*]]) #[[ATTR3]] { -; CHECK-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR11:[0-9]+]] +; CHECK-NEXT: [[C:%.*]] = tail call nofpclass(sub) float @llvm.floor.f32(float [[A]]) #[[ATTR11:[0-9]+]] ; CHECK-NEXT: ret float [[C]] ; %c = tail call float @llvm.floor.f32(float %a) Index: llvm/test/Transforms/Attributor/willreturn.ll =================================================================== --- llvm/test/Transforms/Attributor/willreturn.ll +++ llvm/test/Transforms/Attributor/willreturn.ll @@ -312,13 +312,13 @@ ; TUNIT: Function Attrs: nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable ; TUNIT-LABEL: define {{[^@]+}}@call_floor2 ; TUNIT-SAME: (float [[A:%.*]]) #[[ATTR0]] { -; TUNIT-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR27:[0-9]+]] +; TUNIT-NEXT: [[C:%.*]] = tail call nofpclass(sub) float @llvm.floor.f32(float [[A]]) #[[ATTR27:[0-9]+]] ; TUNIT-NEXT: ret float [[C]] ; ; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable ; CGSCC-LABEL: define {{[^@]+}}@call_floor2 ; CGSCC-SAME: (float [[A:%.*]]) #[[ATTR0]] { -; CGSCC-NEXT: [[C:%.*]] = tail call float @llvm.floor.f32(float [[A]]) #[[ATTR28:[0-9]+]] +; CGSCC-NEXT: [[C:%.*]] = tail call nofpclass(sub) float @llvm.floor.f32(float [[A]]) #[[ATTR28:[0-9]+]] ; CGSCC-NEXT: ret float [[C]] ; %c = tail call float @llvm.floor.f32(float %a)