Home
last modified time | relevance | path

Searched refs:RoundingMode (Results 1 – 25 of 59) sorted by relevance

123

/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DFPEnv.cpp24 std::optional<RoundingMode> convertStrToRoundingMode(StringRef RoundingArg) { in convertStrToRoundingMode()
27 return StringSwitch<std::optional<RoundingMode>>(RoundingArg) in convertStrToRoundingMode()
28 .Case("round.dynamic", RoundingMode::Dynamic) in convertStrToRoundingMode()
29 .Case("round.tonearest", RoundingMode::NearestTiesToEven) in convertStrToRoundingMode()
30 .Case("round.tonearestaway", RoundingMode::NearestTiesToAway) in convertStrToRoundingMode()
31 .Case("round.downward", RoundingMode::TowardNegative) in convertStrToRoundingMode()
32 .Case("round.upward", RoundingMode::TowardPositive) in convertStrToRoundingMode()
33 .Case("round.towardzero", RoundingMode::TowardZero) in convertStrToRoundingMode()
37 std::optional<StringRef> convertRoundingModeToStr(RoundingMode UseRounding) { in convertRoundingModeToStr()
40 case RoundingMode::Dynamic: in convertRoundingModeToStr()
[all …]
H A DIntrinsicInst.cpp303 std::optional<RoundingMode> ConstrainedFPIntrinsic::getRoundingMode() const { in getRoundingMode()
333 std::optional<RoundingMode> Rounding = getRoundingMode(); in isDefaultFPEnvironment()
335 if (*Rounding != RoundingMode::NearestTiesToEven) in isDefaultFPEnvironment()
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DFPEnv.h49 std::optional<RoundingMode> convertStrToRoundingMode(StringRef);
53 std::optional<StringRef> convertRoundingModeToStr(RoundingMode);
65 inline bool isDefaultFPEnvironment(fp::ExceptionBehavior EB, RoundingMode RM) { in isDefaultFPEnvironment()
66 return EB == fp::ebIgnore && RM == RoundingMode::NearestTiesToEven; in isDefaultFPEnvironment()
77 inline bool canRoundingModeBe(RoundingMode RM, RoundingMode QRM) { in canRoundingModeBe()
78 return RM == QRM || RM == RoundingMode::Dynamic; in canRoundingModeBe()
H A DIRBuilder.h127 RoundingMode DefaultConstrainedRounding = RoundingMode::Dynamic;
330 void setDefaultConstrainedRounding(RoundingMode NewRounding) { in setDefaultConstrainedRounding()
345 RoundingMode getDefaultConstrainedRounding() { in getDefaultConstrainedRounding()
400 RoundingMode DefaultConstrainedRounding;
1296 Value *getConstrainedFPRounding(std::optional<RoundingMode> Rounding) { in getConstrainedFPRounding()
1297 RoundingMode UseRounding = DefaultConstrainedRounding; in getConstrainedFPRounding()
1718 std::optional<RoundingMode> Rounding = std::nullopt,
2234 std::optional<RoundingMode> Rounding = std::nullopt,
2455 std::optional<RoundingMode> Rounding = std::nullopt,
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DSIModeRegisterDefaults.h98 TowardZero = static_cast<int8_t>(RoundingMode::TowardZero),
99 NearestTiesToEven = static_cast<int8_t>(RoundingMode::NearestTiesToEven),
100 TowardPositive = static_cast<int8_t>(RoundingMode::TowardPositive),
101 TowardNegative = static_cast<int8_t>(RoundingMode::TowardNegative),
103 static_cast<int8_t>(RoundingMode::NearestTiesToAway),
105 Dynamic = static_cast<int8_t>(RoundingMode::Dynamic),
130 Invalid = static_cast<int8_t>(RoundingMode::Invalid)
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DInstructionSimplify.h95 RoundingMode Rounding = RoundingMode::NearestTiesToEven);
102 RoundingMode Rounding = RoundingMode::NearestTiesToEven);
109 RoundingMode Rounding = RoundingMode::NearestTiesToEven);
118 RoundingMode Rounding = RoundingMode::NearestTiesToEven);
125 RoundingMode Rounding = RoundingMode::NearestTiesToEven);
132 RoundingMode Rounding = RoundingMode::NearestTiesToEven);
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A DFloatingPointMode.h37 enum class RoundingMode : int8_t { enum
51 inline StringRef spell(RoundingMode RM) { in spell()
53 case RoundingMode::TowardZero: return "towardzero"; in spell()
54 case RoundingMode::NearestTiesToEven: return "tonearest"; in spell()
55 case RoundingMode::TowardPositive: return "upward"; in spell()
56 case RoundingMode::TowardNegative: return "downward"; in spell()
57 case RoundingMode::NearestTiesToAway: return "tonearestaway"; in spell()
58 case RoundingMode::Dynamic: return "dynamic"; in spell()
63 inline raw_ostream &operator << (raw_ostream &OS, RoundingMode RM) {
H A DAPFloat.h248 using roundingMode = llvm::RoundingMode;
251 RoundingMode::NearestTiesToEven;
252 static constexpr roundingMode rmTowardPositive = RoundingMode::TowardPositive;
253 static constexpr roundingMode rmTowardNegative = RoundingMode::TowardNegative;
254 static constexpr roundingMode rmTowardZero = RoundingMode::TowardZero;
256 RoundingMode::NearestTiesToAway;
/freebsd/contrib/llvm-project/clang/include/clang/Basic/
H A DLangOptions.h75 using RoundingMode = llvm::RoundingMode; variable
752 RoundingMode getDefaultRoundingMode() const { in getDefaultRoundingMode()
753 return RoundingMath ? RoundingMode::Dynamic in getDefaultRoundingMode()
754 : RoundingMode::NearestTiesToEven; in getDefaultRoundingMode()
772 using RoundingMode = llvm::RoundingMode; variable
801 setConstRoundingMode(RoundingMode::Dynamic); in FPOptions()
814 setConstRoundingMode(LangOptions::RoundingMode::Dynamic); in FPOptions()
823 getRoundingMode() == llvm::RoundingMode::Dynamic && in FPOptions()
848 return getRoundingMode() != llvm::RoundingMode::NearestTiesToEven || in isFPConstrained()
853 RoundingMode getRoundingMode() const { in getRoundingMode()
[all …]
/freebsd/contrib/llvm-project/clang/lib/AST/Interp/
H A DFloating.h56 llvm::RoundingMode RM) const { in toSemantics()
65 Floating toSemantics(const Floating &Other, llvm::RoundingMode RM) const { in toSemantics()
121 llvm::RoundingMode RM, in fromIntegral()
169 llvm::RoundingMode RM, Floating *R) { in add()
174 static APFloat::opStatus increment(const Floating &A, llvm::RoundingMode RM, in increment()
182 llvm::RoundingMode RM, Floating *R) { in sub()
187 static APFloat::opStatus decrement(const Floating &A, llvm::RoundingMode RM, in decrement()
195 llvm::RoundingMode RM, Floating *R) { in mul()
201 llvm::RoundingMode RM, Floating *R) { in div()
H A DCompiler.h327 llvm::RoundingMode getRoundingMode(const Expr *E) const { in getRoundingMode()
330 if (FPO.getRoundingMode() == llvm::RoundingMode::Dynamic) in getRoundingMode()
331 return llvm::RoundingMode::NearestTiesToEven; in getRoundingMode()
H A DInterp.h378 inline bool Addf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) { in Addf()
396 inline bool Subf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) { in Subf()
414 inline bool Mulf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) { in Mulf()
642 inline bool Divf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) { in Divf()
823 llvm::RoundingMode RM) { in IncDecFloatHelper()
841 inline bool Incf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) { in Incf()
849 inline bool IncfPop(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) { in IncfPop()
857 inline bool Decf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) { in Decf()
865 inline bool DecfPop(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) { in DecfPop()
2023 llvm::RoundingMode RM) { in CastFP()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/VE/
H A DVE.h74 enum RoundingMode { enum
264 inline static const char *VERDToString(VERD::RoundingMode R) { in VERDToString()
283 inline static VERD::RoundingMode stringToVERD(StringRef S) { in stringToVERD()
284 return StringSwitch<VERD::RoundingMode>(S) in stringToVERD()
294 inline static unsigned VERDToVal(VERD::RoundingMode R) { in VERDToVal()
309 inline static VERD::RoundingMode VEValToRD(unsigned Val) { in VEValToRD()
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DZ3Solver.cpp531 SMTExprRef RoundingMode = getFloatRoundingMode(); in mkFPMul() local
534 Z3_mk_fpa_mul(Context.Context, toZ3Expr(*RoundingMode).AST, in mkFPMul()
539 SMTExprRef RoundingMode = getFloatRoundingMode(); in mkFPDiv() local
542 Z3_mk_fpa_div(Context.Context, toZ3Expr(*RoundingMode).AST, in mkFPDiv()
553 SMTExprRef RoundingMode = getFloatRoundingMode(); in mkFPAdd() local
556 Z3_mk_fpa_add(Context.Context, toZ3Expr(*RoundingMode).AST, in mkFPAdd()
561 SMTExprRef RoundingMode = getFloatRoundingMode(); in mkFPSub() local
564 Z3_mk_fpa_sub(Context.Context, toZ3Expr(*RoundingMode).AST, in mkFPSub()
698 SMTExprRef RoundingMode = getFloatRoundingMode(); in mkFPtoFP() local
701 Z3_mk_fpa_to_fp_float(Context.Context, toZ3Expr(*RoundingMode).AST, in mkFPtoFP()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/
H A DRISCVBaseInfo.h325 enum RoundingMode { enum
335 inline static StringRef roundingModeToString(RoundingMode RndMode) { in roundingModeToString()
354 inline static RoundingMode stringToRoundingMode(StringRef Str) { in stringToRoundingMode()
355 return StringSwitch<RoundingMode>(Str) in stringToRoundingMode()
381 enum RoundingMode { enum
H A DRISCVInstPrinter.cpp155 static_cast<RISCVFPRndMode::RoundingMode>(MI->getOperand(OpNo).getImm()); in printFRMArg()
156 if (PrintAliases && !NoAliases && FRMArg == RISCVFPRndMode::RoundingMode::DYN) in printFRMArg()
165 static_cast<RISCVFPRndMode::RoundingMode>(MI->getOperand(OpNo).getImm()); in printFRMArgLegacy()
169 if (FRMArg == RISCVFPRndMode::RoundingMode::RNE) in printFRMArgLegacy()
/freebsd/contrib/llvm-project/lldb/source/Plugins/Instruction/RISCV/
H A DEmulateInstructionRISCV.h97 llvm::RoundingMode GetRoundingMode();
H A DEmulateInstructionRISCV.cpp1667 RoundingMode EmulateInstructionRISCV::GetRoundingMode() { in GetRoundingMode()
1672 return RoundingMode::Invalid; in GetRoundingMode()
1676 return RoundingMode::NearestTiesToEven; in GetRoundingMode()
1678 return RoundingMode::TowardZero; in GetRoundingMode()
1680 return RoundingMode::TowardNegative; in GetRoundingMode()
1682 return RoundingMode::TowardPositive; in GetRoundingMode()
1684 return RoundingMode::Dynamic; in GetRoundingMode()
1687 return RoundingMode::Invalid; in GetRoundingMode()
/freebsd/contrib/llvm-project/llvm/lib/Target/VE/MCTargetDesc/
H A DVEMCCodeEmitter.cpp144 return VERDToVal(static_cast<VERD::RoundingMode>( in getRDOpValue()
H A DVEInstPrinter.cpp215 O << VERDToString((VERD::RoundingMode)RD); in printRDOperand()
/freebsd/contrib/llvm-project/clang/include/clang/Lex/
H A DLiteralSupport.h124 llvm::RoundingMode RM);
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DInstructionSimplify.cpp5612 RoundingMode Rounding) { in simplifyFPOp()
5654 RoundingMode Rounding = RoundingMode::NearestTiesToEven) { in simplifyFAddInst()
5668 (!canRoundingModeBe(Rounding, RoundingMode::TowardNegative) || in simplifyFAddInst()
5720 RoundingMode Rounding = RoundingMode::NearestTiesToEven) { in simplifyFSubInst()
5730 (!canRoundingModeBe(Rounding, RoundingMode::TowardNegative) || in simplifyFSubInst()
5786 RoundingMode Rounding) { in simplifyFMAFMul()
5835 RoundingMode Rounding = RoundingMode::NearestTiesToEven) { in simplifyFMulInst()
5847 RoundingMode Rounding) { in simplifyFAddInst()
5855 RoundingMode Rounding) { in simplifyFSubInst()
5863 RoundingMode Rounding) { in simplifyFMulInst()
[all …]
H A DConstantFolding.cpp1931 std::optional<RoundingMode> ORM = CI->getRoundingMode(); in mayFoldConstrained()
1941 if (ORM && *ORM == RoundingMode::Dynamic) in mayFoldConstrained()
1955 static RoundingMode
1957 std::optional<RoundingMode> ORM = CI->getRoundingMode(); in getEvaluationRoundingMode()
1958 if (!ORM || *ORM == RoundingMode::Dynamic) in getEvaluationRoundingMode()
1963 return RoundingMode::NearestTiesToEven; in getEvaluationRoundingMode()
2197 if (!RM || *RM == RoundingMode::Dynamic) in ConstantFoldScalarCall1()
2673 RoundingMode RM = getEvaluationRoundingMode(ConstrIntr); in ConstantFoldIntrinsicCall2()
3111 RoundingMode RM = getEvaluationRoundingMode(ConstrIntr); in ConstantFoldScalarCall3()
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DStmtPrinter.cpp219 LangOptions::RoundingMode RM = FPO.getConstRoundingModeOverride(); in PrintFPPragmas()
222 case llvm::RoundingMode::TowardZero: in PrintFPPragmas()
225 case llvm::RoundingMode::NearestTiesToEven: in PrintFPPragmas()
228 case llvm::RoundingMode::TowardPositive: in PrintFPPragmas()
231 case llvm::RoundingMode::TowardNegative: in PrintFPPragmas()
234 case llvm::RoundingMode::NearestTiesToAway: in PrintFPPragmas()
237 case llvm::RoundingMode::Dynamic: in PrintFPPragmas()
/freebsd/contrib/llvm-project/clang/lib/Parse/
H A DParsePragma.cpp905 auto RM = static_cast<llvm::RoundingMode>( in HandlePragmaFEnvRound()
3449 llvm::StringSwitch<llvm::RoundingMode>(II->getName()) in HandlePragma()
3450 .Case("FE_TOWARDZERO", llvm::RoundingMode::TowardZero) in HandlePragma()
3451 .Case("FE_TONEAREST", llvm::RoundingMode::NearestTiesToEven) in HandlePragma()
3452 .Case("FE_UPWARD", llvm::RoundingMode::TowardPositive) in HandlePragma()
3453 .Case("FE_DOWNWARD", llvm::RoundingMode::TowardNegative) in HandlePragma()
3454 .Case("FE_TONEARESTFROMZERO", llvm::RoundingMode::NearestTiesToAway) in HandlePragma()
3455 .Case("FE_DYNAMIC", llvm::RoundingMode::Dynamic) in HandlePragma()
3456 .Default(llvm::RoundingMode::Invalid); in HandlePragma()
3457 if (RM == llvm::RoundingMode::Invalid) { in HandlePragma()

123