@default = global i32 55
define dso_local i32* @get_default_global() {
; CHECK-LABEL: get_default_global:
-; CHECK: addis 3, 2, default@toc@ha
-; CHECK-NEXT: addi 3, 3, default@toc@l
+; CHECK: addis 3, 2, .LC{{.*}}@toc@ha
+; CHECK-NEXT: ld 3, .LC{{.*}}@toc@l(3)
; CHECK-NEXT: blr
ret i32* @default
}
@preemptable_global = dso_preemptable global i32 42
define dso_local i32* @get_preemptable_global() {
; CHECK-LABEL: get_preemptable_global:
-; CHECK: addis 3, 2, preemptable_global@toc@ha
-; CHECK-NEXT: addi 3, 3, preemptable_global@toc@l
+; CHECK: addis 3, 2, .LC{{.*}}@toc@ha
+; CHECK-NEXT: ld 3, .LC{{.*}}@toc@l(3)
; CHECK-NEXT: blr
ret i32* @preemptable_global
}
define dso_local signext i32 @default_function_caller(i32 %i) {
; CHECK-LABEL: default_function_caller:
; CHECK: bl default_function
-; CHECK-NOT: nop
-; CHECK: blr
+; CHECK-NEXT: nop
%call = notail call signext i32 @default_function(i32 signext %i)
ret i32 %call
}
define dso_local signext i32 @preemptable_function_caller(i32 %i) {
; CHECK-LABEL: preemptable_function_caller:
; CHECK: bl preemptable_function
-; CHECK-NOT: nop
-; CHECK: blr
+; CHECK-NEXT: nop
%call = notail call signext i32 @preemptable_function(i32 signext %i)
ret i32 %call
}
ret i32* @strong_default_global
}
; CHECK: movq strong_default_global@GOTPCREL(%rip), %rax
-; STATIC: movl $strong_default_global, %eax
+; STATIC: movq strong_default_global@GOTPCREL(%rip), %rax
; CHECK32: movl strong_default_global@GOT(%eax), %eax
@strong_hidden_global = hidden global i32 42
ret i32* @weak_default_global
}
; CHECK: movq weak_default_global@GOTPCREL(%rip), %rax
-; STATIC: movl $weak_default_global, %eax
+; STATIC: movq weak_default_global@GOTPCREL(%rip), %rax
; CHECK32: movl weak_default_global@GOT(%eax), %eax
@external_default_global = external global i32
ret i32* @strong_preemptable_global
}
; CHECK: movq strong_preemptable_global@GOTPCREL(%rip), %rax
-; STATIC: movl $strong_preemptable_global, %eax
+; STATIC: movq strong_preemptable_global@GOTPCREL(%rip), %rax
; CHECK32: movl strong_preemptable_global@GOT(%eax), %eax
@weak_preemptable_global = weak dso_preemptable global i32 42
ret i32* @weak_preemptable_global
}
; CHECK: movq weak_preemptable_global@GOTPCREL(%rip), %rax
-; STATIC: movl $weak_preemptable_global, %eax
+; STATIC: movq weak_preemptable_global@GOTPCREL(%rip), %rax
; CHECK32: movl weak_preemptable_global@GOT(%eax), %eax
@external_preemptable_global = external dso_preemptable global i32
ret i32* @strong_default_alias
}
; CHECK: movq strong_default_alias@GOTPCREL(%rip), %rax
-; STATIC: movl $strong_default_alias, %eax
+; STATIC: movq strong_default_alias@GOTPCREL(%rip), %rax
; CHECK32: movl strong_default_alias@GOT(%eax), %eax
@strong_hidden_alias = hidden alias i32, i32* @aliasee
ret i32* @weak_default_alias
}
; CHECK: movq weak_default_alias@GOTPCREL(%rip), %rax
-; STATIC: movl $weak_default_alias, %eax
+; STATIC: movq weak_default_alias@GOTPCREL(%rip), %rax
; CHECK32: movl weak_default_alias@GOT(%eax), %eax
@strong_local_alias = dso_local alias i32, i32* @aliasee
ret i32* @strong_preemptable_alias
}
; CHECK: movq strong_preemptable_alias@GOTPCREL(%rip), %rax
-; STATIC: movl $strong_preemptable_alias, %eax
+; STATIC: movq strong_preemptable_alias@GOTPCREL(%rip), %rax
; CHECK32: movl strong_preemptable_alias@GOT(%eax), %eax
@weak_preemptable_alias = weak dso_preemptable alias i32, i32* @aliasee
ret i32* @weak_preemptable_alias
}
; CHECK: movq weak_preemptable_alias@GOTPCREL(%rip), %rax
-; STATIC: movl $weak_preemptable_alias, %eax
+; STATIC: movq weak_preemptable_alias@GOTPCREL(%rip), %rax
; CHECK32: movl weak_preemptable_alias@GOT(%eax), %eax
; functions
ret void()* @strong_default_function
}
; CHECK: movq strong_default_function@GOTPCREL(%rip), %rax
-; STATIC: movl $strong_default_function, %eax
+; STATIC: movq strong_default_function@GOTPCREL(%rip), %rax
; CHECK32: movl strong_default_function@GOT(%eax), %eax
define hidden void @strong_hidden_function() {
ret void()* @weak_default_function
}
; CHECK: movq weak_default_function@GOTPCREL(%rip), %rax
-; STATIC: movl $weak_default_function, %eax
+; STATIC: movq weak_default_function@GOTPCREL(%rip), %rax
; CHECK32: movl weak_default_function@GOT(%eax), %eax
declare void @external_default_function()
ret void()* @strong_preemptable_function
}
; CHECK: movq strong_preemptable_function@GOTPCREL(%rip), %rax
-; STATIC: movl $strong_preemptable_function, %eax
+; STATIC: movq strong_preemptable_function@GOTPCREL(%rip), %rax
; CHECK32: movl strong_preemptable_function@GOT(%eax), %eax
define weak dso_preemptable void @weak_preemptable_function() {
ret void()* @weak_preemptable_function
}
; CHECK: movq weak_preemptable_function@GOTPCREL(%rip), %rax
-; STATIC: movl $weak_preemptable_function, %eax
+; STATIC: movq weak_preemptable_function@GOTPCREL(%rip), %rax
; CHECK32: movl weak_preemptable_function@GOT(%eax), %eax
declare dso_preemptable void @external_preemptable_function()