[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 14 00:42:58 PDT 2024


================
@@ -18197,7 +18197,7 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID,
       CallOps.push_back(Ops[i]);
     llvm::Function *F = CGM.getIntrinsic(ID);
     Value *Call = Builder.CreateCall(F, CallOps);
-    return Builder.CreateAlignedStore(Call, Ops[0], MaybeAlign(64));
+    return Builder.CreateAlignedStore(Call, Ops[0], MaybeAlign());
----------------
nikic wrote:

```suggestion
    return Builder.CreateStore(Call, Ops[0]);
```
Should work, I think? No need to use CreateAlignedStore if you want a naturally aligned store.

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


More information about the cfe-commits mailing list