1; RUN: llc --combiner-alias-analysis=false < %s | FileCheck %s 2; RUN: llc --combiner-alias-analysis=true < %s | FileCheck %s 3 4; This test checks that we do not merge stores together which have 5; dependencies through their non-chain operands (e.g. one store is the 6; chain ancestor of a load whose value is used in as the data for the 7; other store). Merging in such cases creates a loop in the DAG. 8 9target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128" 10target triple = "aarch64--linux-android" 11 12%"class.std::__1::complex.0.20.56.60.64.72.76.88.92.112.140.248" = type { float, float } 13 14; Function Attrs: noinline norecurse nounwind ssp uwtable 15define void @fn(<2 x i64>* %argA, <2 x i64>* %argB, i64* %a) #0 align 2 { 16 %_p_vec_full = load <2 x i64>, <2 x i64>* %argA, align 4, !alias.scope !1, !noalias !3 17 %x = extractelement <2 x i64> %_p_vec_full, i32 1 18 store i64 %x, i64* %a, align 8, !alias.scope !4, !noalias !9 19 %_p_vec_full155 = load <2 x i64>, <2 x i64>* %argB, align 4, !alias.scope !1, !noalias !3 20 %y = extractelement <2 x i64> %_p_vec_full155, i32 0 21 %scevgep41 = getelementptr i64, i64* %a, i64 -1 22 store i64 %y, i64* %scevgep41, align 8, !alias.scope !4, !noalias !9 23 ret void 24} 25 26; CHECK: ret 27 28attributes #0 = { noinline norecurse nounwind ssp uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "polly-optimized" "stack-protector-buffer-size"="8" "target-features"="+crc,+crypto,+neon" "unsafe-fp-math"="false" "use-soft-float"="false" } 29 30!llvm.ident = !{!0} 31 32!0 = !{!"Snapdragon LLVM ARM Compiler 3.8.0 (based on LLVM 3.8.0)"} 33!1 = distinct !{!1, !2, !"polly.alias.scope.rhs"} 34!2 = distinct !{!2, !"polly.alias.scope.domain"} 35!3 = !{!4, !5, !6, !7, !8} 36!4 = distinct !{!4, !2, !"polly.alias.scope.blockB"} 37!5 = distinct !{!5, !2, !"polly.alias.scope.add28.lcssa.reg2mem"} 38!6 = distinct !{!6, !2, !"polly.alias.scope.count.0.lcssa.reg2mem"} 39!7 = distinct !{!7, !2, !"polly.alias.scope.mul"} 40!8 = distinct !{!8, !2, !"polly.alias.scope.add28.us.lcssa.reg2mem"} 41!9 = !{!1, !5, !6, !7, !8} 42