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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 17 14:32:59 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());
----------------
efriedma-quic wrote:

Oh, right, I forgot we were trying to get rid of those at one point... that's probably never happening for LLVM in general, but maybe for clang it'll get finished at some point.

Looking at the code again, it's calling EmitPointerWithAlignment, so you can just take the alignment from that.  Well, actually, it looks like there's a bug where we emit the first argument twice, but with that fixed, you should be able to do that.

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


More information about the cfe-commits mailing list