1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; Check that -mgpopt doesn't crash on unsized externals
3 ; RUN: llc -mtriple=mips64-unknown-freebsd -mattr=+noabicalls -target-abi n64 -mgpopt -o - %s | FileCheck %s
5 %struct.a = type opaque
7 @b = external global %struct.a, align 1
9 ; Function Attrs: norecurse nounwind readnone
10 define %struct.a* @d() {
12 ; CHECK: # %bb.0: # %entry
13 ; CHECK-NEXT: lui $1, %highest(b)
14 ; CHECK-NEXT: daddiu $1, $1, %higher(b)
15 ; CHECK-NEXT: dsll $1, $1, 16
16 ; CHECK-NEXT: daddiu $1, $1, %hi(b)
17 ; CHECK-NEXT: dsll $1, $1, 16
19 ; CHECK-NEXT: daddiu $2, $1, %lo(b)