Enable folding patterns which load the value from non-zero offset:
i8 *a = ... i32 val = a[4] | (a[5] << 8) | (a[6] << 16) | (a[7] << 24)
>
i32 val = *((i32*)(a+4))
Differential D29394
[DAGCombiner] Support non-zero offset in load combine apilipenko on Feb 1 2017, 6:36 AM. Authored by
Details Enable folding patterns which load the value from non-zero offset: i8 *a = ... i32 val = a[4] | (a[5] << 8) | (a[6] << 16) | (a[7] << 24) >i32 val = *((i32*)(a+4))
Diff Detail
Event Timeline
Comment Actions Please can you commit the new tests to trunk now with their current codegen and then update this patch to show the delta in codegen - I think this will answer @boris.ulasevich 's concerns. Comment Actions One minor
|