[PATCH] [AArch64] Improve and enable the SeparateConstOffsetFromGEP for AArch64 backend.

Hao Liu Hao.Liu at arm.com
Sun Nov 2 17:20:11 PST 2014


>>! In D5864#35, @jingyue wrote:
> I mean the issue we spotted previously with the following example:
> ```
> struct S {
>   int a[4]; // sizeof(int) = 4
>   double b[8]; // sizeof(double) = 8
> };
> 
> %s = alloca struct %S
> %p = getelementptr %s, 0, 1, i ; &s.b[i] = s + 4*sizeof(int) + i*sizeof(double)
> ```
> 
> I thought we agreed that your diff had a correctness issue with this example, and I didn't see any change to fix that issue in your latest diff. Am I missing something? 

Sorry, my words misled you. I said "we can transform it to either of two simpler forms", I meant this patch had already done like that.
There is no correctness issue. The issue about extracting structure indices has already been solved in the first patch. See more details in transformToSimplerGEPs(), which does the same as my explanation.

Thanks,
-Hao

http://reviews.llvm.org/D5864






More information about the llvm-commits mailing list