This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Vector load/store builtins overstate alignment of pointers
ClosedPublic

Authored by nemanjai on Nov 21 2018, 4:32 AM.

Details

Summary

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

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai created this revision.Nov 21 2018, 4:32 AM
wuzish accepted this revision.Nov 21 2018, 7:12 PM
This revision is now accepted and ready to land.Nov 21 2018, 7:12 PM
This revision was automatically updated to reflect the committed changes.