2 ; RUN: opt -mtriple=systemz-unknown -march=z13 -O3 -enable-mssa-loop-dependency -disable-output %s
4 ; During transform to LCSSA, an access becomes obfuscated to:
5 ; (2 = phi (phi(val), val)), which BasicAA fails to analyze.
6 ; It's currently hard coded in BasicAA to return MayAlias for nested phis.
7 ; This leads MemorySSA to finding a new (false) clobber for a previously
8 ; optimized access. With verifyClobber included in verifyMemorySSA, such a
9 ; transformation will cause MemorySSA verification to fail.
10 ; If the verifyClobber is re-enabled, this test will crash.
12 target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
13 target triple = "s390x-ibm-linux"
15 %0 = type <{ i64, i8, i64, i16 }>
17 @g_54 = external dso_local global i16, align 2
18 @g_101 = external dso_local global <{ i64, i8, i64, i8, i8 }>, align 2
20 declare dso_local void @safe_lshift_func_int16_t_s_s()
21 declare dso_local i8 @safe_div_func_int8_t_s_s()
23 define dso_local void @func_47(%0* %arg) {
25 %tmp = alloca i32, align 4
28 bb1: ; preds = %bb12, %bb
29 %tmp2 = getelementptr inbounds %0, %0* %arg, i32 0, i32 3
30 store i16 undef, i16* %tmp2, align 1
31 %tmp3 = call signext i8 @safe_div_func_int8_t_s_s()
32 %tmp7 = icmp ne i8 %tmp3, 0
33 br i1 %tmp7, label %bb8, label %bb10
36 %tmp9 = icmp eq i32 0, 0
37 br i1 %tmp9, label %bb12, label %bb13
39 bb10: ; preds = %bb10, %bb1
40 call void @safe_lshift_func_int16_t_s_s()
41 %tmp11 = getelementptr inbounds %0, %0* %arg, i32 0, i32 3
42 store i16 0, i16* %tmp11, align 1
43 store i8 0, i8* getelementptr inbounds (%0, %0* bitcast (<{ i64, i8, i64, i8, i8 }>* @g_101 to %0*), i32 0, i32 1), align 2
47 store i16 0, i16* @g_54, align 2