[PATCH] Retain alignment requirements for load->selects modified by DAGCombine

Quentin Colombet qcolombet at apple.com
Wed Jul 30 11:00:32 PDT 2014


Hi Louis,

The patch itself LGTM, I was just wondering since you are modifying this part, if you could fix the use of isNonTemporal and isInvariant.
Indeed, I believe we have a similar problem with those flags.

Follow-up patches are fine :).

Thanks,
-Quentin
On Jul 30, 2014, at 10:40 AM, Louis Gerbarg <lgg at apple.com> wrote:

> 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.
> 
> Tests included.
> 
> Louis
> 
> <0001-Retain-alignment-requirements-for-load-selects-modif.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list