1 ; RUN: opt < %s -basicaa -dse -S | FileCheck %s
2 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
4 ; Ensure that the dead store is deleted in this case. It is wholely
5 ; overwritten by the second store.
6 define void @test1(i32 *%V) {
7 %V2 = bitcast i32* %V to i8* ; <i8*> [#uses=1]
9 store i32 1234567, i32* %V
12 ; CHECK-NEXT: store i32 1234567
15 ; Note that we could do better by merging the two stores into one.
16 define void @test2(i32* %P) {
20 %Q = bitcast i32* %P to i16*
27 define i32 @test3(double %__x) {
30 %__u = alloca { [3 x i32] }
31 %tmp.1 = bitcast { [3 x i32] }* %__u to double*
32 store double %__x, double* %tmp.1
33 %tmp.4 = getelementptr { [3 x i32] }* %__u, i32 0, i32 0, i32 1
34 %tmp.5 = load i32* %tmp.4
35 %tmp.6 = icmp slt i32 %tmp.5, 0
36 %tmp.7 = zext i1 %tmp.6 to i32