1 ; RUN: opt -globalopt -S < %s | FileCheck %s
2 ; RUN: opt -passes=globalopt -S < %s | FileCheck %s
4 ; This tests the assignemnt of non-pointer to global address
5 ; (assert due to D106589).
7 @a162 = internal global i16* null, align 1
12 ; CHECK-NEXT: [[TMP0:%.*]] = load i16*, i16** @a162, align 1
13 ; CHECK-NEXT: store i16 0, i16* bitcast (i16** @a162 to i16*), align 1
14 ; CHECK-NEXT: ret void
17 %0 = load i16*, i16** @a162, align 1
18 store i16 0, i16* bitcast (i16** @a162 to i16*), align 1