[llvm] [mlir] [llvm][OpenMP] Add implicit cast to omp.atomic.read (PR #114659)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 05:49:16 PST 2024


================
@@ -8076,6 +8102,8 @@ OpenMPIRBuilder::createAtomicRead(const LocationDescription &Loc,
     }
   }
   checkAndEmitFlushAfterAtomic(Loc, AO, AtomicKind::Read);
+  if (XRead->getType() != V.Var->getType())
+    XRead = emitImplicitCast(Builder, XRead, V.Var);
----------------
Meinersbur wrote:

The code above seems to already handle casting?

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


More information about the llvm-commits mailing list