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