55 lines · plain
1; REQUIRES: asserts2; RUN: opt -mtriple=systemz-unknown -mcpu=z13 -O3 -disable-output %s3 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 previously8; optimized access. With verifyClobber included in verifyMemorySSA, such a9; transformation will cause MemorySSA verification to fail.10; If the verifyClobber is re-enabled, this test will crash.11 12target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"13target triple = "s390x-ibm-linux"14 15%0 = type <{ i64, i8, i64, i16 }>16 17@g_54 = external dso_local global i16, align 218@g_101 = external dso_local global <{ i64, i8, i64, i8, i8 }>, align 219 20declare dso_local void @safe_lshift_func_int16_t_s_s()21declare dso_local i8 @safe_div_func_int8_t_s_s()22 23define dso_local void @func_47(ptr %arg) {24bb:25 %tmp = alloca i32, align 426 br label %bb127 28bb1: ; preds = %bb12, %bb29 %tmp2 = getelementptr inbounds %0, ptr %arg, i32 0, i32 330 store i16 undef, ptr %tmp2, align 131 %tmp3 = call signext i8 @safe_div_func_int8_t_s_s()32 %tmp7 = icmp ne i8 %tmp3, 033 br i1 %tmp7, label %bb8, label %bb1034 35bb8: ; preds = %bb136 %tmp9 = icmp eq i32 0, 037 br i1 %tmp9, label %bb12, label %bb1338 39bb10: ; preds = %bb10, %bb140 call void @safe_lshift_func_int16_t_s_s()41 %tmp11 = getelementptr inbounds %0, ptr %arg, i32 0, i32 342 store i16 0, ptr %tmp11, align 143 store i8 0, ptr getelementptr inbounds (%0, ptr @g_101, i32 0, i32 1), align 244 br label %bb1045 46bb12: ; preds = %bb847 store i16 0, ptr @g_54, align 248 br label %bb149 50bb13: ; preds = %bb851 ret void52}53 54 55