[llvm-branch-commits] [llvm] [AtomicExpand] Add bitcasts when expanding store atomic vector (PR #197862)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri May 15 02:46:20 PDT 2026


================
@@ -2174,8 +2176,19 @@ bool AtomicExpandImpl::expandAtomicOpToLibcall(
   // 'val' argument ('desired' for cas), if present.
   if (ValueOperand) {
     if (UseSizedLibcall) {
-      Value *IntValue =
-          Builder.CreateBitOrPointerCast(ValueOperand, SizedIntTy);
+      // Add casts from ValueOperand's <n x ptr> vector type to Result's
+      // scalar integer type. Mirror of the load-side handling below.
+      Value *IntValue;
+      auto *VPtrTy =
----------------
arsenm wrote:

Can this be replaced with Builder.CreateBitPreservingCastChain

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


More information about the llvm-branch-commits mailing list