diff options
| author | Adam Nemet <anemet@apple.com> | 2017-03-28 20:11:52 +0000 |
|---|---|---|
| committer | Adam Nemet <anemet@apple.com> | 2017-03-28 20:11:52 +0000 |
| commit | cd847a8f3059d87cc6c5343d2dae7b25aacac322 (patch) | |
| tree | f36fad6a6759edb3ee14c09c9defdf0e05be25c4 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
| parent | 16af53a3955e8e8b93ccc1d4674e0e5613835961 (diff) | |
| download | bcm5719-llvm-cd847a8f3059d87cc6c5343d2dae7b25aacac322.tar.gz bcm5719-llvm-cd847a8f3059d87cc6c5343d2dae7b25aacac322.zip | |
[IR] Add AllowContract to FastMathFlags
-ffp-contract=fast does not currently work with LTO because it's passed as a
TargetOption to the backend rather than in the IR. This adds it to
FastMathFlags.
This is toward fixing PR25721
Differential Revision: https://reviews.llvm.org/D31164
llvm-svn: 298939
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index b1200587e62..1bdb439086a 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1336,6 +1336,8 @@ static uint64_t getOptimizationFlags(const Value *V) { Flags |= FastMathFlags::NoSignedZeros; if (FPMO->hasAllowReciprocal()) Flags |= FastMathFlags::AllowReciprocal; + if (FPMO->hasAllowContract()) + Flags |= FastMathFlags::AllowContract; } return Flags; |

