From ddadc78689898ac52d1e5959487e986dac67f549 Mon Sep 17 00:00:00 2001 From: Karl Schimpf Date: Thu, 13 Jun 2013 13:14:11 -0700 Subject: Insulate PNaCl bitcode from LLVM encodings of floating point optimization flags. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3405 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/16836017 --- lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp') diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp index 4add89f6ab..58ff9de3aa 100644 --- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp +++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp @@ -2099,15 +2099,15 @@ bool NaClBitcodeReader::ParseFunctionBody(Function *F) { cast(I)->setIsExact(true); } else if (isa(I)) { FastMathFlags FMF; - if (0 != (Record[OpNum] & FastMathFlags::UnsafeAlgebra)) + if (0 != (Record[OpNum] & (1 << naclbitc::FPO_UNSAFE_ALGEBRA))) FMF.setUnsafeAlgebra(); - if (0 != (Record[OpNum] & FastMathFlags::NoNaNs)) + if (0 != (Record[OpNum] & (1 << naclbitc::FPO_NO_NANS))) FMF.setNoNaNs(); - if (0 != (Record[OpNum] & FastMathFlags::NoInfs)) + if (0 != (Record[OpNum] & (1 << naclbitc::FPO_NO_INFS))) FMF.setNoInfs(); - if (0 != (Record[OpNum] & FastMathFlags::NoSignedZeros)) + if (0 != (Record[OpNum] & (1 << naclbitc::FPO_NO_SIGNED_ZEROS))) FMF.setNoSignedZeros(); - if (0 != (Record[OpNum] & FastMathFlags::AllowReciprocal)) + if (0 != (Record[OpNum] & (1 << naclbitc::FPO_ALLOW_RECIPROCAL))) FMF.setAllowReciprocal(); if (FMF.any()) I->setFastMathFlags(FMF); -- cgit v1.2.3-70-g09d2