1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -o - %s -mtriple aarch64-- -mattr +slow-misaligned-128store | FileCheck %s
3 ; Checks for a bug where selection dag store merging would construct wrong
4 ; indices when extracting values from vectors, resulting in an invalid
5 ; lane duplication in this case.
6 ; The only way I could trigger stores with mismatching types getting merged was
7 ; via the aarch64 slow-misaligned-128store code splitting stores earlier.
9 ; aarch64 feature slow-misaligned-128store splits the following store.
10 ; store merging immediately merges it back together (but used to get the
11 ; merging wrong), this is the only way I was able to reproduce the bug...
13 define void @func(<2 x double>* %sptr, <2 x double>* %dptr) {
16 ; CHECK-NEXT: ldr q0, [x0]
17 ; CHECK-NEXT: str q0, [x1]
19 %load = load <2 x double>, <2 x double>* %sptr, align 8
20 store <2 x double> %load, <2 x double>* %dptr, align 4