diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp b/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp index 44027ccd92ca..e0d0301c1ef6 100644 --- a/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp +++ b/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp @@ -82,6 +82,7 @@ static bool optimizeSQRT(CallInst *Call, Function *CalledFunc, // Add attribute "readnone" so that backend can use a native sqrt instruction // for this call. + Call->removeFnAttr(Attribute::WriteOnly); Call->addFnAttr(Attribute::ReadNone); // Insert a FP compare instruction and use it as the CurrBB branch condition. |