| /llvm-project-15.0.7/flang/lib/Evaluate/ |
| H A D | complex.cpp | 16 const Complex &that, Rounding rounding) const { in Add() 25 const Complex &that, Rounding rounding) const { in Subtract() 34 const Complex &that, Rounding rounding) const { in Multiply() 42 Part adbc{ad.Add(bc, rounding).AccumulateFlags(flags)}; in Multiply() 48 const Complex &that, Rounding rounding) const { in Divide() 64 den = dS.Add(that.re_, rounding).AccumulateFlags(flags); in Divide() 67 den = cS.Add(that.im_, rounding).AccumulateFlags(flags); in Divide() 73 re1 = re_.Add(bS, rounding).AccumulateFlags(flags); in Divide() 74 im1 = im_.Subtract(aS, rounding).AccumulateFlags(flags); in Divide() 76 re1 = aS.Add(im_, rounding).AccumulateFlags(flags); in Divide() [all …]
|
| H A D | real.cpp | 58 const Real &y, Rounding rounding) const { in Add() 90 return y.Add(*this, rounding); in Add() 96 return y.Add(*this, rounding); in Add() 138 const Real &y, Rounding rounding) const { in Multiply() 295 result = scaled.SQRT(rounding); in SQRT() 409 auto quotient{Divide(y, rounding)}; in MOD() 432 auto quotient{Divide(y, rounding)}; in MODULO() 458 result = Subtract(y, rounding); in DIM() 602 common::RoundingMode rounding) { in MapRoundingMode() argument 603 switch (rounding) { in MapRoundingMode() [all …]
|
| H A D | int-power.h | 21 Rounding rounding = TargetCharacteristics::defaultRounding) { 38 result.value = result.value.Divide(squares, rounding) 41 result.value = result.value.Multiply(squares, rounding) 46 squares.Multiply(squares, rounding).AccumulateFlags(result.flags); 54 Rounding rounding = TargetCharacteristics::defaultRounding) { 56 return TimesIntPowerOf(one, base, power, rounding);
|
| /llvm-project-15.0.7/libc/utils/MPFRWrapper/ |
| H A D | MPFRUtils.h | 159 RoundingMode rounding, testutils::StreamWrapper &OS); 176 RoundingMode rounding; 180 : input(testInput), ulp_tolerance(ulp_tolerance), rounding(rounding) {} 196 rounding); 201 rounding); 206 rounding); 212 rounding); 217 rounding); 230 rounding, OS); 237 rounding, OS); [all …]
|
| H A D | MPFRUtils.cpp | 475 RoundingMode rounding) { in unary_operation() argument 476 MPFRNumber mpfrInput(input, precision, rounding); in unary_operation() 525 MPFRNumber mpfrInput(input, precision, rounding); in unary_operation_two_outputs() 538 MPFRNumber inputX(x, precision, rounding); in binary_operation_one_output() 539 MPFRNumber inputY(y, precision, rounding); in binary_operation_one_output() 554 RoundingMode rounding) { in binary_operation_two_outputs() argument 555 MPFRNumber inputX(x, precision, rounding); in binary_operation_two_outputs() 556 MPFRNumber inputY(y, precision, rounding); in binary_operation_two_outputs() 573 MPFRNumber inputX(x, precision, rounding); in ternary_operation_one_output() 574 MPFRNumber inputY(y, precision, rounding); in ternary_operation_one_output() [all …]
|
| /llvm-project-15.0.7/flang/include/flang/Evaluate/ |
| H A D | complex.h | 64 Rounding rounding = TargetCharacteristics::defaultRounding) { 67 Part::FromInteger(n, rounding).AccumulateFlags(result.flags); 72 Rounding rounding = TargetCharacteristics::defaultRounding) const; 74 Rounding rounding = TargetCharacteristics::defaultRounding) const; 76 Rounding rounding = TargetCharacteristics::defaultRounding) const; 78 Rounding rounding = TargetCharacteristics::defaultRounding) const; 82 Rounding rounding = TargetCharacteristics::defaultRounding) const { 83 return re_.HYPOT(im_, rounding);
|
| H A D | real.h | 111 Rounding rounding = TargetCharacteristics::defaultRounding) const; 114 return Add(y.Negate(), rounding); 117 Rounding rounding = TargetCharacteristics::defaultRounding) const; 119 Rounding rounding = TargetCharacteristics::defaultRounding) const; 122 Rounding rounding = TargetCharacteristics::defaultRounding) const; 191 ValueWithRealFlags<Real> result{Multiply(twoPow, rounding)}; 226 Rounding rounding = TargetCharacteristics::defaultRounding) { 248 result.flags |= result.value.Round(rounding, roundingBits); 328 result.flags |= result.value.Round(rounding, roundingBits); 368 Rounding rounding = TargetCharacteristics::defaultRounding); [all …]
|
| /llvm-project-15.0.7/llvm/test/Feature/ |
| H A D | fp-intrinsics.ll | 3 ; Test to verify that constants aren't folded when the rounding mode is unknown. 16 ; Verify that 'a - 0' isn't simplified to 'a' when the rounding mode is unknown. 19 ; // Because the result of '0 - 0' is negative zero if rounding mode is 35 ; Verify that '-((-a)*b)' isn't simplified to 'a*b' when the rounding mode is 40 ; // rounding, this shouldn't be simplified. 220 ; Verify that nearbyint(42.1) isn't simplified when the rounding mode is 233 ; Verify that fma(42.1) isn't simplified when the rounding mode is 245 ; Verify that fptoui(42.1) isn't simplified when the rounding mode is 257 ; Verify that fptosi(42.1) isn't simplified when the rounding mode is 268 ; Verify that fptrunc(42.1) isn't simplified when the rounding mode is [all …]
|
| /llvm-project-15.0.7/flang/lib/Decimal/ |
| H A D | binary-to-decimal.cpp | 19 BinaryFloatingPointNumber<PREC> x, enum FortranRounding rounding) in BigRadixFloatingPointNumber() argument 20 : rounding_{rounding} { in BigRadixFloatingPointNumber() 296 Big number{x, rounding}; in ConvertToDecimal() 313 number.Minimize(Big{less, rounding}, Big{more, rounding}); in ConvertToDecimal() 341 enum FortranRounding rounding, float x) { in ConvertFloatToDecimal() argument 343 rounding, Fortran::decimal::BinaryFloatingPointNumber<24>(x)); in ConvertFloatToDecimal() 348 enum FortranRounding rounding, double x) { in ConvertDoubleToDecimal() argument 350 rounding, Fortran::decimal::BinaryFloatingPointNumber<53>(x)); in ConvertDoubleToDecimal() 356 enum FortranRounding rounding, long double x) { in ConvertLongDoubleToDecimal() argument 358 rounding, Fortran::decimal::BinaryFloatingPointNumber<64>(x)); in ConvertLongDoubleToDecimal() [all …]
|
| H A D | decimal-to-binary.cpp | 242 bool isNegative, FortranRounding rounding) const { in ToBinary() 270 switch (rounding) { in ToBinary() 460 const char *&p, enum FortranRounding rounding, const char *end) { in ConvertToBinary() argument 461 return BigRadixFloatingPointNumber<PREC>{rounding}.ConvertToBinary(p, end); in ConvertToBinary() 479 const char **p, float *f, enum FortranRounding rounding) { in ConvertDecimalToFloat() argument 480 auto result{Fortran::decimal::ConvertToBinary<24>(*p, rounding)}; in ConvertDecimalToFloat() 486 const char **p, double *d, enum FortranRounding rounding) { in ConvertDecimalToDouble() argument 487 auto result{Fortran::decimal::ConvertToBinary<53>(*p, rounding)}; in ConvertDecimalToDouble() 493 const char **p, long double *ld, enum FortranRounding rounding) { in ConvertDecimalToLongDouble() argument 494 auto result{Fortran::decimal::ConvertToBinary<64>(*p, rounding)}; in ConvertDecimalToLongDouble()
|
| /llvm-project-15.0.7/flang/unittests/Evaluate/ |
| H A D | real.cpp | 136 vr = R::FromInteger(ix, rounding); in basicTests() 159 auto check{R::Read(p, rounding)}; in basicTests() 298 real = real.value.FromInteger(ix, rounding); in inttest() 355 inttest<UINT, FLT, REAL>(0, pass, rounding); in subsetTests() 440 auto readBack{REAL::Read(p, rounding)}; in subsetTests() 530 basicTests<Real2>(rm, rounding); in roundTest() 531 basicTests<Real3>(rm, rounding); in roundTest() 532 basicTests<Real4>(rm, rounding); in roundTest() 533 basicTests<Real8>(rm, rounding); in roundTest() 534 basicTests<Real10>(rm, rounding); in roundTest() [all …]
|
| /llvm-project-15.0.7/llvm/test/CodeGen/AArch64/ |
| H A D | fpenv.ll | 4 call void @llvm.set.rounding(i32 %rm) 20 call void @llvm.set.rounding(i32 0) 32 call void @llvm.set.rounding(i32 1) 44 call void @llvm.set.rounding(i32 2) 58 call void @llvm.set.rounding(i32 3) 70 declare void @llvm.set.rounding(i32)
|
| /llvm-project-15.0.7/llvm/test/CodeGen/ARM/ |
| H A D | fpenv.ll | 4 call void @llvm.set.rounding(i32 %rm) 19 call void @llvm.set.rounding(i32 0) 31 call void @llvm.set.rounding(i32 1) 43 call void @llvm.set.rounding(i32 2) 57 call void @llvm.set.rounding(i32 3) 69 declare void @llvm.set.rounding(i32)
|
| /llvm-project-15.0.7/llvm/test/CodeGen/RISCV/ |
| H A D | fpenv.ll | 50 call void @llvm.set.rounding(i32 %rm) 64 call void @llvm.set.rounding(i32 0) 78 call void @llvm.set.rounding(i32 1) 92 call void @llvm.set.rounding(i32 2) 106 call void @llvm.set.rounding(i32 3) 120 call void @llvm.set.rounding(i32 4) 124 declare void @llvm.set.rounding(i32)
|
| /llvm-project-15.0.7/libc/test/src/math/exhaustive/ |
| H A D | log2f_test.cpp | 21 mpfr::RoundingMode rounding) override { in check() 22 mpfr::ForceRoundingMode r(rounding); in check() 29 __llvm_libc::log2f(x), 0.5, rounding); in check()
|
| H A D | logf_test.cpp | 21 mpfr::RoundingMode rounding) override { in check() 22 mpfr::ForceRoundingMode r(rounding); in check() 29 0.5, rounding); in check()
|
| H A D | log10f_test.cpp | 21 mpfr::RoundingMode rounding) override { in check() 22 mpfr::ForceRoundingMode r(rounding); in check() 29 __llvm_libc::log10f(x), 0.5, rounding); in check()
|
| H A D | log1pf_test.cpp | 21 mpfr::RoundingMode rounding) override { in check() 22 mpfr::ForceRoundingMode r(rounding); in check() 29 __llvm_libc::log1pf(x), 0.5, rounding); in check()
|
| /llvm-project-15.0.7/llvm/test/MC/RISCV/ |
| H A D | rv32zhinx-invalid.s | 18 # Invalid rounding modes 19 …3, ree # CHECK: :[[@LINE]]:29: error: operand must be a valid floating point rounding mode mnemonic 20 …x17, 0 # CHECK: :[[@LINE]]:29: error: operand must be a valid floating point rounding mode mnemonic 21 … 0b111 # CHECK: :[[@LINE]]:30: error: operand must be a valid floating point rounding mode mnemonic
|
| H A D | rv32zfinx-invalid.s | 19 # Invalid rounding modes 20 …3, ree # CHECK: :[[@LINE]]:29: error: operand must be a valid floating point rounding mode mnemonic 21 …x17, 0 # CHECK: :[[@LINE]]:29: error: operand must be a valid floating point rounding mode mnemonic 22 … 0b111 # CHECK: :[[@LINE]]:30: error: operand must be a valid floating point rounding mode mnemonic
|
| H A D | rv32zdinx-invalid.s | 21 # Invalid rounding modes 22 …6, ree # CHECK: :[[@LINE]]:29: error: operand must be a valid floating point rounding mode mnemonic 23 …x16, 0 # CHECK: :[[@LINE]]:29: error: operand must be a valid floating point rounding mode mnemonic 24 … 0b111 # CHECK: :[[@LINE]]:30: error: operand must be a valid floating point rounding mode mnemonic
|
| H A D | rv32f-invalid.s | 26 # Invalid rounding modes 27 …3, ree # CHECK: :[[@LINE]]:29: error: operand must be a valid floating point rounding mode mnemonic 28 …f17, 0 # CHECK: :[[@LINE]]:29: error: operand must be a valid floating point rounding mode mnemonic 29 … 0b111 # CHECK: :[[@LINE]]:30: error: operand must be a valid floating point rounding mode mnemonic
|
| /llvm-project-15.0.7/libc/src/math/generic/ |
| H A D | expf.cpp | 59 int rounding = fputil::get_round(); variable 60 if (rounding == FE_DOWNWARD || rounding == FE_TOWARDZERO)
|
| H A D | exp2f.cpp | 97 int rounding = fputil::get_round(); variable 98 if (rounding == FE_DOWNWARD || rounding == FE_TOWARDZERO)
|
| H A D | expm1f.cpp | 66 int rounding = fputil::get_round(); variable 67 if (rounding == FE_DOWNWARD || rounding == FE_TOWARDZERO)
|