1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=dse -S | FileCheck %s
4 ; Both stores should be emitted because we can't tell if the gather aliases.
6 define <4 x i32> @bar(<4 x i32> %arg, ptr %arg1) {
9 ; CHECK-NEXT: store i32 5, ptr [[ARG1:%.*]]
10 ; CHECK-NEXT: [[TMP:%.*]] = tail call <4 x i32> @llvm.x86.avx2.gather.d.d(<4 x i32> zeroinitializer, ptr null, <4 x i32> [[ARG:%.*]], <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>, i8 1)
11 ; CHECK-NEXT: store i32 10, ptr [[ARG1]]
12 ; CHECK-NEXT: ret <4 x i32> [[TMP]]
15 store i32 5, ptr %arg1
16 %tmp = tail call <4 x i32> @llvm.x86.avx2.gather.d.d(<4 x i32> zeroinitializer, ptr null, <4 x i32> %arg, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>, i8 1)
17 store i32 10, ptr %arg1
21 declare <4 x i32> @llvm.x86.avx2.gather.d.d(<4 x i32>, ptr, <4 x i32>, <4 x i32>, i8)