[PATCH] Retain alignment requirements for load->selects modified by DAGCombine
Hal Finkel
hfinkel at anl.gov
Wed Jul 30 10:54:32 PDT 2014
----- Original Message -----
> From: "Louis Gerbarg" <lgg at apple.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Wednesday, July 30, 2014 12:40:02 PM
> Subject: [PATCH] Retain alignment requirements for load->selects modified by DAGCombine
>
>
>
> This patch fixes an issue where we can generate aligned loads for
> unaligned data. It is a latent bug that has been around for years,
> but we have started tripping it recently with the introduction of
> more aggressive vectorization, etc. On x86 this manifests as
> generating a movapd when we should have used a movupd, which then
> results in a segfault if the data does not happened to be aligned.
> The problem is in platform independent codegen, so this may manifest
> on other architectures as well. I suspect on PPC this may result in
> some subtle data corruption bugs since altivec loads will take an
> unaligned address without faulting and just ignore the low bits.
Indeed.
LGTM, thanks!
-Hal
>
> Tests included.
>
> Louis
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list