1 ; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -relocation-model=pic | FileCheck %s
3 ; unsigned int foo(void) {
8 ; L: __attribute__ ((unused));
9 ; static const unsigned int arr[] =
11 ; (unsigned int) &&x - (unsigned int)&&L ,
12 ; (unsigned int) &&y - (unsigned int)&&L
15 ; unsigned int ret = foo();
16 ; ptr g = (ptr) ((unsigned int)&&L + arr[ret]);
25 define i32 @foo() local_unnamed_addr {
34 L: ; preds = %L, %entry
35 indirectbr ptr inttoptr (i32 add (i32 ptrtoint (ptr blockaddress(@main, %L) to i32), i32 sub (i32 ptrtoint (ptr blockaddress(@main, %return) to i32), i32 ptrtoint (ptr blockaddress(@main, %L) to i32))) to ptr), [label %return, label %L]
42 ; CHECK: lwz 3, .LC0-.LTOC(30)
43 ; CHECK-NOT: li 3, .Ltmp1-.L1$pb@l
44 ; CHECK-NOT: addis 4, 30, .Ltmp1-.L1$pb@ha