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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 16:18:25 PST 2024


================
@@ -30976,6 +30976,14 @@ bool X86TargetLowering::needsCmpXchgNb(Type *MemType) const {
   return false;
 }
 
+TargetLoweringBase::AtomicExpansionKind
+X86TargetLowering::shouldCastAtomicLoadInIR(LoadInst *LI) const {
+  if (LI->getType()->isVectorTy())
+    if (cast<VectorType>(LI->getType())->getElementType()->isFloatingPointTy())
----------------
arsenm wrote:

isVectorTy is redundant with the cast. Use dyn_cast 

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


More information about the llvm-commits mailing list