================
@@ -483,7 +483,12 @@ LoadInst
*AtomicExpandImpl::convertAtomicLoadToIntegerType(LoadInst *LI) {
NewLI->setAtomic(LI->getOrdering(), LI->getSyncScopeID());
LLVM_DEBUG(dbgs() << "Replaced " << *LI << " with " << *NewLI << "\n");
- Value *NewVal = Builder.CreateBitCast(NewLI, LI->getType());
+ Value *NewVal =
+ LI->getType()->isPointerTy() ||
+ (LI->getType()->isVectorTy() &&
+
cast<VectorType>(LI->getType())->getElementType()->isPointerTy())
----------------
arsenm wrote:
```suggestion
LI->getType()->isPtrOrPtrVectorTy()
```
https://github.com/llvm/llvm-project/pull/148900
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits