1; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
2
3; Function Attrs: nounwind readnone
4declare i8* @llvm.thread.pointer() #1
5
6define i8* @thread_pointer() {
7; CHECK: thread_pointer:
8; CHECK: ear [[REG1:%r[0-5]]], %a0
9; CHECK: sllg %r2, [[REG1]], 32
10; CHECK: ear %r2, %a1
11; CHECK: br %r14
12  %1 = tail call i8* @llvm.thread.pointer()
13  ret i8* %1
14}
15