Files
clang-p2996/llvm/test/CodeGen/PowerPC/tocdata-firm-alignment.ll
Kai Luo 117921e071 [PowerPC] Alignment of toc-data symbol should not be increased during optimizations (#94593)
Currently, the alignment of toc-data symbol might be changed during
instcombine
```
IC: Visiting:   %global = alloca %struct.widget, align 8                                                                                         
Found alloca equal to global:   %global = alloca %struct.widget, align 8                                                                         
  memcpy =   call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %global, ptr align 1 @global, i64 3, i1 false)
```
The `alloca` is created with `PrefAlign` which is 8 and after IC, the
alignment of `@global` is enforced into `8`, same as the `alloca`. This
is not expected, since toc-data symbol has the same alignment as toc
entry and should not be increased during optimizations.

---------

Co-authored-by: Sean Fertile <sd.fertile@gmail.com>
Co-authored-by: Eli Friedman <efriedma@quicinc.com>
2024-06-18 09:58:37 +08:00

920 B