mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Merging r325525:
------------------------------------------------------------------------ r325525 | steven_wu | 2018-02-19 20:22:28 +0100 (Mon, 19 Feb 2018) | 13 lines bitcode support change for fast flags compatibility Summary: The discussion and as per need, each vendor needs a way to keep the old fast flags and the new fast flags in the auto upgrade path of the IR upgrader. This revision addresses that issue. Patched by Michael Berg Reviewers: qcolombet, hans, steven_wu Reviewed By: qcolombet, steven_wu Subscribers: dexonsmith, vsk, mehdi_amini, andrewrk, MatzeB, wristow, spatel Differential Revision: https://reviews.llvm.org/D43253 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325592 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1046,19 +1046,21 @@ static Comdat::SelectionKind getDecodedComdatSelectionKind(unsigned Val) {
|
||||
|
||||
static FastMathFlags getDecodedFastMathFlags(unsigned Val) {
|
||||
FastMathFlags FMF;
|
||||
if (0 != (Val & FastMathFlags::AllowReassoc))
|
||||
if (0 != (Val & bitc::UnsafeAlgebra))
|
||||
FMF.setFast();
|
||||
if (0 != (Val & bitc::AllowReassoc))
|
||||
FMF.setAllowReassoc();
|
||||
if (0 != (Val & FastMathFlags::NoNaNs))
|
||||
if (0 != (Val & bitc::NoNaNs))
|
||||
FMF.setNoNaNs();
|
||||
if (0 != (Val & FastMathFlags::NoInfs))
|
||||
if (0 != (Val & bitc::NoInfs))
|
||||
FMF.setNoInfs();
|
||||
if (0 != (Val & FastMathFlags::NoSignedZeros))
|
||||
if (0 != (Val & bitc::NoSignedZeros))
|
||||
FMF.setNoSignedZeros();
|
||||
if (0 != (Val & FastMathFlags::AllowReciprocal))
|
||||
if (0 != (Val & bitc::AllowReciprocal))
|
||||
FMF.setAllowReciprocal();
|
||||
if (0 != (Val & FastMathFlags::AllowContract))
|
||||
if (0 != (Val & bitc::AllowContract))
|
||||
FMF.setAllowContract(true);
|
||||
if (0 != (Val & FastMathFlags::ApproxFunc))
|
||||
if (0 != (Val & bitc::ApproxFunc))
|
||||
FMF.setApproxFunc();
|
||||
return FMF;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user