[clang] [Clang] Add support for fp when using min_fetch/max_fetch atomics (PR #160330)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 24 00:14:02 PDT 2025


================
@@ -507,20 +507,35 @@ static llvm::Value *EmitPostAtomicMinMax(CGBuilderTy &Builder,
                                          bool IsSigned,
                                          llvm::Value *OldVal,
                                          llvm::Value *RHS) {
+  llvm::Type *ValTy = OldVal->getType();
+
   llvm::CmpInst::Predicate Pred;
+  bool IsFP = ValTy->isFloatingPointTy();
----------------
CarolineConcatto wrote:

Can we do something like:
bool IsFP = OldVal->getValueType()->isFloatingPointTy();
As we and not using ValTy it would be nice to not need to declare it too.

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


More information about the cfe-commits mailing list