xref: /llvm-project/llvm/test/CodeGen/X86/x86-64-gv-offset.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
3
4	%struct.x = type { float, double }
5@X = global %struct.x { float 1.000000e+00, double 2.000000e+00 }, align 16		; <ptr> [#uses=2]
6
7define i32 @main() nounwind  {
8; CHECK-LABEL: main:
9; CHECK:       ## %bb.0: ## %entry
10; CHECK-NEXT:    pushq %rax
11; CHECK-NEXT:    movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
12; CHECK-NEXT:    movsd {{.*#+}} xmm1 = mem[0],zero
13; CHECK-NEXT:    callq _t
14; CHECK-NEXT:    xorl %eax, %eax
15; CHECK-NEXT:    popq %rcx
16; CHECK-NEXT:    retq
17entry:
18	%tmp2 = load float, ptr @X, align 16		; <float> [#uses=1]
19	%tmp4 = load double, ptr getelementptr (%struct.x, ptr @X, i32 0, i32 1), align 8		; <double> [#uses=1]
20	tail call void @t( float %tmp2, double %tmp4 ) nounwind
21	ret i32 0
22}
23
24declare void @t(float, double)
25