1 ; RUN: llc -o - %s -mtriple aarch64-- -mattr +slow-misaligned-128store -stop-after=instruction-select | FileCheck %s
2 ; Checks for a bug where selection dag store merging would construct wrong
3 ; indices when extracting values from vectors, resulting in an invalid
4 ; lane duplication in this case.
5 ; The only way I could trigger stores with mismatching types getting merged was
6 ; via the aarch64 slow-misaligned-128store code splitting stores earlier.
8 ; CHECK-LABEL: name: func
10 ; CHECK-NOT: INSERT_SUBREG
13 define void @func(<2 x double>* %sptr, <2 x double>* %dptr) {
14 %load = load <2 x double>, <2 x double>* %sptr, align 8
15 ; aarch64 feature slow-misaligned-128store splits the following store.
16 ; store merging immediately merges it back together (but used to get the
17 ; merging wrong), this is the only way I was able to reproduce the bug...
18 store <2 x double> %load, <2 x double>* %dptr, align 4