================
@@ -4105,14 +4102,21 @@ LValue ScalarExprEmitter::EmitCompoundAssignLValue(
// the loaded integer to double, performing FP arithmetics, and truncation
// back as a single atomic operation. Integer promotion is still
// semantically safe.
- bool CanEmitAtomicRMW =
+ bool CanEmitIntegerRMW =
!AtomicValueTy->isBooleanType() && AtomicValueTy->isIntegerType() &&
ResultTy->isIntegerType() &&
!(AtomicValueTy->isUnsignedIntegerType() &&
CGF.SanOpts.has(SanitizerKind::UnsignedIntegerOverflow)) &&
CGF.getLangOpts().getSignedOverflowBehavior() !=
LangOptions::SOB_Trapping;
- if (CanEmitAtomicRMW) {
+ bool CanEmitFloatingRMW = false;
+ if (!Builder.getIsFPConstrained() && AtomicValueTy->isFloatingType() &&
----------------
paulwalker-arm wrote:
Can this use `CGF.getLangOpts().getExceptionMode()` rather than relying on the
IRBuilder? I'm assuming you don't need to limit this based on rounding mode?
https://github.com/llvm/llvm-project/pull/216033
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits