[PATCH] D54787: [PowerPC] Vector load/store builtins overstate alignment of pointers

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 21 04:32:17 PST 2018


nemanjai created this revision.
nemanjai added reviewers: hfinkel, jsji, wuzish.
Herald added subscribers: kristina, kbarton.

A number of builtins in altivec.h load/store vectors from pointers to scalar types. Currently they just cast the pointer to a vector pointer, but expressions like that have the alignment of the target type. Of course, the input pointer did not have that alignment so this triggers UBSan (and rightly so).

This resolves https://bugs.llvm.org/show_bug.cgi?id=39704


Repository:
  rC Clang

https://reviews.llvm.org/D54787

Files:
  lib/Headers/altivec.h
  test/CodeGen/builtins-ppc-altivec.c
  test/CodeGen/builtins-ppc-vsx.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54787.174899.patch
Type: text/x-patch
Size: 22178 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181121/f9451a11/attachment-0001.bin>


More information about the cfe-commits mailing list