From 612328bae3008f665a075c1d0a7fc72318f2bb16 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Mon, 24 Feb 2025 08:40:06 -0800 Subject: [PATCH] [flang][cuda][NFC] Remove shared alloc addr space --- flang/lib/Optimizer/Builder/IntrinsicCall.cpp | 1 - flang/lib/Optimizer/CodeGen/CodeGen.cpp | 6 ------ 2 files changed, 7 deletions(-) diff --git a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp index 28fbe83defb61..a5bc762e17c06 100644 --- a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp +++ b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp @@ -2728,7 +2728,6 @@ mlir::Value IntrinsicLibrary::genAtomicOr(mlir::Type resultType, mlir::Value IntrinsicLibrary::genAtomicCas(mlir::Type resultType, llvm::ArrayRef args) { assert(args.size() == 3); - assert(args[1].getType() == args[2].getType()); auto successOrdering = mlir::LLVM::AtomicOrdering::acq_rel; auto failureOrdering = mlir::LLVM::AtomicOrdering::monotonic; auto llvmPtrTy = mlir::LLVM::LLVMPointerType::get(resultType.getContext()); diff --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp index bd87215eeb179..d5dadac00a47a 100644 --- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp +++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp @@ -292,12 +292,6 @@ struct AllocaOpConversion : public fir::FIROpConversion { rewriter.setInsertionPointAfter(size.getDefiningOp()); } - if (auto dataAttr = alloc->getAttrOfType( - cuf::getDataAttrName())) { - if (dataAttr.getValue() == cuf::DataAttribute::Shared) - allocaAs = 3; - } - // NOTE: we used to pass alloc->getAttrs() in the builder for non opaque // pointers! Only propagate pinned and bindc_name to help debugging, but // this should have no functional purpose (and passing the operand segment