[llvm] [FPEnv][AtomicExpand] Correct strictfp attribute handling in AtomicExpandPass (PR #87082)
Kevin P. Neal via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 29 11:45:44 PDT 2024
================
@@ -135,10 +135,14 @@ class AtomicExpandLegacy : public FunctionPass {
// IRBuilder to be used for replacement atomic instructions.
struct ReplacementIRBuilder : IRBuilder<InstSimplifyFolder> {
// Preserves the DebugLoc from I, and preserves still valid metadata.
+ // Enable StrictFP builder mode when appropriate.
explicit ReplacementIRBuilder(Instruction *I, const DataLayout &DL)
: IRBuilder(I->getContext(), DL) {
SetInsertPoint(I);
this->CollectMetadataToCopy(I, {LLVMContext::MD_pcsections});
+ if (I->getParent()->getParent()->getAttributes().hasFnAttr(
----------------
kpneal wrote:
The test case changed by this PR doesn't run thorough the function fixed in 3701ebe.
https://github.com/llvm/llvm-project/pull/87082
More information about the llvm-commits
mailing list