• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
4
5%struct.a = type opaque
6
7@b = external global %struct.a, align 1
8
9; Function Attrs: norecurse nounwind readnone
10define %struct.a* @d() {
11; CHECK-LABEL: 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
18; CHECK-NEXT:    jr $ra
19; CHECK-NEXT:    daddiu $2, $1, %lo(b)
20entry:
21  ret %struct.a* @b
22}
23