summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMichael Ilseman <milseman@apple.com>2012-12-09 20:23:16 +0000
committerMichael Ilseman <milseman@apple.com>2012-12-09 20:23:16 +0000
commit6d2ffa18588181b5ed4be5f20e4b3d04e29da81b (patch)
tree5cefb5bb7512ff71c4b0027b60366db19d9bce4f /llvm/lib
parentf7cd6b391a7ad85f2aa60d11e35b054ec91d15fc (diff)
downloadbcm5719-llvm-6d2ffa18588181b5ed4be5f20e4b3d04e29da81b.tar.gz
bcm5719-llvm-6d2ffa18588181b5ed4be5f20e4b3d04e29da81b.zip
Have the bitcode reader/writer just use FPMathOperator's fast math enum directly
llvm-svn: 169710
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp10
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index cb1a8351858..131151f5354 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -2048,15 +2048,15 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
} else if (isa<FPMathOperator>(I)) {
FastMathFlags FMF;
FMF.UnsafeAlgebra =
- 0 != (Record[OpNum] & (1 << bitc::FMF_UNSAFE_ALGEBRA));
+ 0 != (Record[OpNum] & FPMathOperator::UnsafeAlgebra);
FMF.NoNaNs =
- 0 != (Record[OpNum] & (1 << bitc::FMF_NO_NANS));
+ 0 != (Record[OpNum] & FPMathOperator::NoNaNs);
FMF.NoInfs =
- 0 != (Record[OpNum] & (1 << bitc::FMF_NO_INFS));
+ 0 != (Record[OpNum] & FPMathOperator::NoInfs);
FMF.NoSignedZeros =
- 0 != (Record[OpNum] & (1 << bitc::FMF_NO_SIGNED_ZEROS));
+ 0 != (Record[OpNum] & FPMathOperator::NoSignedZeros);
FMF.AllowReciprocal =
- 0 != (Record[OpNum] & (1 << bitc::FMF_ALLOW_RECIPROCAL));
+ 0 != (Record[OpNum] & FPMathOperator::AllowReciprocal);
if (FMF.any())
I->setFastMathFlags(FMF);
}
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index d616eda9b99..f2fe0aef68f 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -552,15 +552,15 @@ static uint64_t GetOptimizationFlags(const Value *V) {
} else if (const FPMathOperator *FPMO =
dyn_cast<const FPMathOperator>(V)) {
if (FPMO->hasUnsafeAlgebra())
- Flags |= 1 << bitc::FMF_UNSAFE_ALGEBRA;
+ Flags |= FPMathOperator::UnsafeAlgebra;
if (FPMO->hasNoNaNs())
- Flags |= 1 << bitc::FMF_NO_NANS;
+ Flags |= FPMathOperator::NoNaNs;
if (FPMO->hasNoInfs())
- Flags |= 1 << bitc::FMF_NO_INFS;
+ Flags |= FPMathOperator::NoInfs;
if (FPMO->hasNoSignedZeros())
- Flags |= 1 << bitc::FMF_NO_SIGNED_ZEROS;
+ Flags |= FPMathOperator::NoSignedZeros;
if (FPMO->hasAllowReciprocal())
- Flags |= 1 << bitc::FMF_ALLOW_RECIPROCAL;
+ Flags |= FPMathOperator::AllowReciprocal;
}
return Flags;
OpenPOWER on IntegriCloud