[llvm] [X86] Lowering of load atomic vector of float via cast (PR #117189)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 09:30:01 PST 2024


================
@@ -31158,6 +31158,14 @@ bool X86TargetLowering::needsCmpXchgNb(Type *MemType) const {
   return false;
 }
 
+TargetLoweringBase::AtomicExpansionKind
+X86TargetLowering::shouldCastAtomicLoadInIR(LoadInst *LI) const {
+  if (const auto VT = dyn_cast<VectorType>(LI->getType()))
+    if (VT->getElementType()->isFloatingPointTy())
+      return AtomicExpansionKind::CastToInteger;
+  return TargetLowering::shouldCastAtomicLoadInIR(LI);
+}
----------------
jofrn wrote:

That one didn't handle atomic vectors.

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


More information about the llvm-commits mailing list