1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/unittests/IR
Serge Pavlov 4088931555 [FPEnv] Use single enum to represent rounding mode
Now compiler defines 5 sets of constants to represent rounding mode.
These are:

1. `llvm::APFloatBase::roundingMode`. It specifies all 5 rounding modes
defined by IEEE-754 and is used in `APFloat` implementation.

2. `clang::LangOptions::FPRoundingModeKind`. It specifies 4 of 5 IEEE-754
rounding modes and a special value for dynamic rounding mode. It is used
in clang frontend.

3. `llvm::fp::RoundingMode`. Defines the same values as
`clang::LangOptions::FPRoundingModeKind` but in different order. It is
used to specify rounding mode in in IR and functions that operate IR.

4. Rounding mode representation used by `FLT_ROUNDS` (C11, 5.2.4.2.2p7).
Besides constants for rounding mode it also uses a special value to
indicate error. It is convenient to use in intrinsic functions, as it
represents platform-independent representation for rounding mode. In this
role it is used in some pending patches.

5. Values like `FE_DOWNWARD` and other, which specify rounding mode in
library calls `fesetround` and `fegetround`. Often they represent bits
of some control register, so they are target-dependent. The same names
(not values) and a special name `FE_DYNAMIC` are used in
`#pragma STDC FENV_ROUND`.

The first 4 sets of constants are target independent and could have the
same numerical representation. It would simplify conversion between the
representations. Also now `clang::LangOptions::FPRoundingModeKind` and
`llvm::fp::RoundingMode` do not contain the value for IEEE-754 rounding
direction `roundTiesToAway`, although it is supported natively on
some targets.

This change defines all the rounding mode type via one `llvm::RoundingMode`,
which also contains rounding mode for IEEE rounding direction `roundTiesToAway`.

Differential Revision: https://reviews.llvm.org/D77379
2020-04-09 13:26:47 +07:00
..
AsmWriterTest.cpp
AttributesTest.cpp
BasicBlockTest.cpp
CFGBuilder.cpp [CFG/BasicBlock] Rename succ_const to const_succ. [NFC] 2020-03-25 12:40:55 -07:00
CFGBuilder.h
CMakeLists.txt [NFC] Split Knowledge retention and place it more appropriatly 2020-04-02 15:01:41 +02:00
ConstantRangeTest.cpp
ConstantsTest.cpp
DataLayoutTest.cpp
DebugInfoTest.cpp
DebugTypeODRUniquingTest.cpp
DominatorTreeBatchUpdatesTest.cpp
DominatorTreeTest.cpp
FunctionTest.cpp
InstructionsTest.cpp [llvm][IR][CastInst] Update castIsValid for scalable vectors. 2020-03-30 21:13:40 +00:00
IntrinsicsTest.cpp
IRBuilderTest.cpp [FPEnv] Use single enum to represent rounding mode 2020-04-09 13:26:47 +07:00
LegacyPassManagerTest.cpp
ManglerTest.cpp
MDBuilderTest.cpp
MetadataTest.cpp
ModuleTest.cpp
PassBuilderCallbacksTest.cpp
PassManagerTest.cpp
PatternMatch.cpp Remove "mask" operand from shufflevector. 2020-03-31 13:08:59 -07:00
TimePassesTest.cpp
TypesTest.cpp
UserTest.cpp
UseTest.cpp
ValueHandleTest.cpp
ValueMapTest.cpp
ValueTest.cpp
VectorTypesTest.cpp
VerifierTest.cpp
VPIntrinsicTest.cpp
WaymarkTest.cpp