================ @@ -2060,9 +2060,28 @@ bool AtomicExpandImpl::expandAtomicOpToLibcall( I->replaceAllUsesWith(V); } else if (HasResult) { Value *V; - if (UseSizedLibcall) - V = Builder.CreateBitOrPointerCast(Result, I->getType()); - else { + if (UseSizedLibcall) { + // Add bitcasts from Result's T scalar type to I's <2 x T/2> vector type + if (I->getType()->getScalarType()->isIntOrPtrTy() && + I->getType()->isVectorTy() && !Result->getType()->isVectorTy()) { + TypeSize Size = Result->getType()->getPrimitiveSizeInBits(); + assert((unsigned)Size % 2 == 0); ---------------- arsenm wrote:
Why does this only need to half the size? https://github.com/llvm/llvm-project/pull/120716 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits