[clang] Don't do casting of atomic FP loads/stores in FE. (PR #83446)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 5 08:53:43 PST 2024


================
@@ -1453,9 +1457,11 @@ void AtomicInfo::EmitAtomicLoadLibcall(llvm::Value *AddForLoaded,
 }
 
 llvm::Value *AtomicInfo::EmitAtomicLoadOp(llvm::AtomicOrdering AO,
-                                          bool IsVolatile) {
+                                          bool IsVolatile, bool CastFP) {
   // Okay, we're doing this natively.
-  Address Addr = getAtomicAddressAsAtomicIntPointer();
+  Address Addr = getAtomicAddress();
+  if (!(Addr.getElementType()->isIEEELikeFPTy() && !CastFP))
----------------
arsenm wrote:

```suggestion
  if (CastFP || !Addr.getElementType()->isIEEELikeFPTy())
```

https://github.com/llvm/llvm-project/pull/83446


More information about the cfe-commits mailing list