[PATCH v2] Respect alignment when loading up a coerced function argument

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Tue Jun 23 05:26:52 PDT 2015


Hal Finkel <hfinkel at anl.gov> wrote on 23.06.2015 02:30:53:

> -    CGF.Builder.CreateStore(Src, DstPtr, DstIsVolatile);
> +    llvm::StoreInst *SI = CGF.Builder.CreateStore(Src, DstPtr,
> DstIsVolatile);
> +    SI->setAlignment(DstAlign.getQuantity());
>      return;
>
> You can use CreateAlignedStore instead of CreateStore here (and in
> several other places).

Hi Hal,

here's an updated version of the patch that uses CreateAlignedStore
(and CreateAlignedLoad) throughout:

(See attached file: clang-align-coerced)

Bye,
Ulrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-align-coerced
Type: application/octet-stream
Size: 37494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150623/650ef288/attachment.obj>


More information about the cfe-commits mailing list