Issue |
89672
|
Summary |
coalescing of redundant vector stores isn't preserving alignment correctly
|
Labels |
new issue
|
Assignees |
|
Reporter |
regehr
|
https://alive2.llvm.org/ce/z/-qQphe
optimizing this code:
```llvm
define i32 @f(ptr %0, i1 %1) {
store <2 x i64> zeroinitializer, ptr %0, align 8
br i1 %1, label %4, label %3
3: ; preds = %2
store <2 x i64> zeroinitializer, ptr %0, align 16
br label %4
4: ; preds = %3, %2
ret i32 0
}
```
is mostly doing what we expect, but the coalesced store should retain the smaller alignnment value of the two, not the larger:
```lllvm
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write)
define noundef i32 @f(ptr nocapture writeonly %0, i1 %1) local_unnamed_addr #0 {
store <2 x i64> zeroinitializer, ptr %0, align 16
ret i32 0
}
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) }
```
cc @nunoplopes @hatsunespica
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs