blob: 658ccaa71dc036d02496daef3bad1f16e016a9cf [file] [log] [blame]
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-STATIC
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-PIC
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-64-STATIC
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=LINUX-64-PIC
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=i686-apple-darwin -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-32-STATIC
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=i686-apple-darwin -march=x86 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-DYNAMIC
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=i686-apple-darwin -march=x86 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-PIC
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-64-STATIC
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-DYNAMIC
; RUN: llc < %s -asm-verbose=0 -mcpu=generic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-PIC
@src = external global [131072 x i32]
@dst = external global [131072 x i32]
@xsrc = external global [32 x i32]
@xdst = external global [32 x i32]
@ptr = external global i32*
@dsrc = global [131072 x i32] zeroinitializer, align 32
@ddst = global [131072 x i32] zeroinitializer, align 32
@dptr = global i32* null
@lsrc = internal global [131072 x i32] zeroinitializer
@ldst = internal global [131072 x i32] zeroinitializer
@lptr = internal global i32* null
@ifunc = external global void ()*
@difunc = global void ()* null
@lifunc = internal global void ()* null
@lxsrc = internal global [32 x i32] zeroinitializer, align 32
@lxdst = internal global [32 x i32] zeroinitializer, align 32
@dxsrc = global [32 x i32] zeroinitializer, align 32
@dxdst = global [32 x i32] zeroinitializer, align 32
define void @foo00() nounwind {
entry:
%0 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 0), align 4
store i32 %0, i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 0), align 4
ret void
; LINUX-64-STATIC: foo00:
; LINUX-64-STATIC: movl src(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], dst
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo00:
; LINUX-32-STATIC: movl src, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], dst
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo00:
; LINUX-32-PIC: movl src, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], dst
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo00:
; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r..]]
; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e..]]
; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r..]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo00:
; DARWIN-32-STATIC: movl _src, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dst
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo00:
; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e..]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e..]]
; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e..]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo00:
; DARWIN-32-PIC: calll L0$pb
; DARWIN-32-PIC-NEXT: L0$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e..]]
; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L0$pb([[EAX]]), [[ECX:%e..]]
; DARWIN-32-PIC-NEXT: movl ([[ECX]]), [[ECX:%e..]]
; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L0$pb([[EAX]]), [[EAX:%e..]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo00:
; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r..]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e..]]
; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r..]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo00:
; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r..]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e..]]
; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r..]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo00:
; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r..]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e..]]
; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r..]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @fxo00() nounwind {
entry:
%0 = load i32* getelementptr ([32 x i32]* @xsrc, i32 0, i64 0), align 4
store i32 %0, i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 0), align 4
ret void
; LINUX-64-STATIC: fxo00:
; LINUX-64-STATIC: movl xsrc(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], xdst
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: fxo00:
; LINUX-32-STATIC: movl xsrc, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], xdst
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: fxo00:
; LINUX-32-PIC: movl xsrc, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], xdst
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: fxo00:
; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _fxo00:
; DARWIN-32-STATIC: movl _xsrc, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _xdst
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _fxo00:
; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _fxo00:
; DARWIN-32-PIC: calll L1$pb
; DARWIN-32-PIC-NEXT: L1$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L1$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L1$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _fxo00:
; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _fxo00:
; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _fxo00:
; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @foo01() nounwind {
entry:
store i32* getelementptr ([131072 x i32]* @dst, i32 0, i32 0), i32** @ptr, align 8
ret void
; LINUX-64-STATIC: foo01:
; LINUX-64-STATIC: movq $dst, ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo01:
; LINUX-32-STATIC: movl $dst, ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo01:
; LINUX-32-PIC: movl $dst, ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo01:
; LINUX-64-PIC: movq dst@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo01:
; DARWIN-32-STATIC: movl $_dst, _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo01:
; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo01:
; DARWIN-32-PIC: calll L2$pb
; DARWIN-32-PIC-NEXT: L2$pb:
; DARWIN-32-PIC-NEXT: popl
; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L2$pb(
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L2$pb(
; DARWIN-32-PIC-NEXT: movl
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo01:
; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo01:
; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo01:
; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @fxo01() nounwind {
entry:
store i32* getelementptr ([32 x i32]* @xdst, i32 0, i32 0), i32** @ptr, align 8
ret void
; LINUX-64-STATIC: fxo01:
; LINUX-64-STATIC: movq $xdst, ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: fxo01:
; LINUX-32-STATIC: movl $xdst, ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: fxo01:
; LINUX-32-PIC: movl $xdst, ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: fxo01:
; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _fxo01:
; DARWIN-32-STATIC: movl $_xdst, _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _fxo01:
; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _fxo01:
; DARWIN-32-PIC: calll L3$pb
; DARWIN-32-PIC-NEXT: L3$pb:
; DARWIN-32-PIC-NEXT: popl [[R0:%e..]]
; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L3$pb([[R0]]), [[R1:%e..]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L3$pb([[R0]]), [[R2:%e..]]
; DARWIN-32-PIC-NEXT: movl [[R1:%e..]], ([[R2]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _fxo01:
; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _fxo01:
; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _fxo01:
; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @foo02() nounwind {
entry:
%0 = load i32** @ptr, align 8
%1 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 0), align 4
store i32 %1, i32* %0, align 4
ret void
; LINUX-64-STATIC: foo02:
; LINUX-64-STATIC: movl src(%rip), %
; LINUX-64-STATIC: movq ptr(%rip), %
; LINUX-64-STATIC: movl
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo02:
; LINUX-32-STATIC: movl src, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo02:
; LINUX-32-PIC: movl src, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo02:
; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo02:
; DARWIN-32-STATIC: movl _src, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo02:
; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo02:
; DARWIN-32-PIC: calll L4$pb
; DARWIN-32-PIC-NEXT: L4$pb:
; DARWIN-32-PIC-NEXT: popl [[R0:%e..]]
; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L4$pb([[R0]]), [[R1:%e..]]
; DARWIN-32-PIC-NEXT: movl ([[R1]]), [[R2:%e..]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L4$pb([[R0]]), [[R3:%e..]]
; DARWIN-32-PIC-NEXT: movl ([[R3]]), [[R4:%e..]]
; DARWIN-32-PIC-NEXT: movl [[R2]], ([[R4]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo02:
; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo02:
; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo02:
; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @fxo02() nounwind {
entry:
%0 = load i32** @ptr, align 8
%1 = load i32* getelementptr ([32 x i32]* @xsrc, i32 0, i64 0), align 4
store i32 %1, i32* %0, align 4
; LINUX-64-STATIC: fxo02:
; LINUX-64-STATIC: movl xsrc(%rip), %
; LINUX-64-STATIC: movq ptr(%rip), %
; LINUX-64-STATIC: movl
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: fxo02:
; LINUX-32-STATIC: movl xsrc, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: fxo02:
; LINUX-32-PIC: movl xsrc, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: fxo02:
; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _fxo02:
; DARWIN-32-STATIC: movl _xsrc, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _fxo02:
; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _fxo02:
; DARWIN-32-PIC: calll L5$pb
; DARWIN-32-PIC-NEXT: L5$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L5$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L5$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _fxo02:
; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _fxo02:
; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _fxo02:
; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @foo03() nounwind {
entry:
%0 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 0), align 32
store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 0), align 32
ret void
; LINUX-64-STATIC: foo03:
; LINUX-64-STATIC: movl dsrc(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], ddst
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo03:
; LINUX-32-STATIC: movl dsrc, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ddst
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo03:
; LINUX-32-PIC: movl dsrc, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ddst
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo03:
; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo03:
; DARWIN-32-STATIC: movl _dsrc, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ddst
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo03:
; DARWIN-32-DYNAMIC: movl _dsrc, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ddst
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo03:
; DARWIN-32-PIC: calll L6$pb
; DARWIN-32-PIC-NEXT: L6$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _dsrc-L6$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], _ddst-L6$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo03:
; DARWIN-64-STATIC: movl _dsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ddst(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo03:
; DARWIN-64-DYNAMIC: movl _dsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ddst(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo03:
; DARWIN-64-PIC: movl _dsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], _ddst(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @foo04() nounwind {
entry:
store i32* getelementptr ([131072 x i32]* @ddst, i32 0, i32 0), i32** @dptr, align 8
ret void
; LINUX-64-STATIC: foo04:
; LINUX-64-STATIC: movq $ddst, dptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo04:
; LINUX-32-STATIC: movl $ddst, dptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo04:
; LINUX-32-PIC: movl $ddst, dptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo04:
; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo04:
; DARWIN-32-STATIC: movl $_ddst, _dptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo04:
; DARWIN-32-DYNAMIC: movl $_ddst, _dptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo04:
; DARWIN-32-PIC: calll L7$pb
; DARWIN-32-PIC-NEXT: L7$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: leal _ddst-L7$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L7$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo04:
; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo04:
; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo04:
; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @foo05() nounwind {
entry:
%0 = load i32** @dptr, align 8
%1 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 0), align 32
store i32 %1, i32* %0, align 4
ret void
; LINUX-64-STATIC: foo05:
; LINUX-64-STATIC: movl dsrc(%rip), %
; LINUX-64-STATIC: movq dptr(%rip), %
; LINUX-64-STATIC: movl
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo05:
; LINUX-32-STATIC: movl dsrc, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo05:
; LINUX-32-PIC: movl dsrc, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo05:
; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo05:
; DARWIN-32-STATIC: movl _dsrc, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo05:
; DARWIN-32-DYNAMIC: movl _dsrc, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo05:
; DARWIN-32-PIC: calll L8$pb
; DARWIN-32-PIC-NEXT: L8$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _dsrc-L8$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _dptr-L8$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo05:
; DARWIN-64-STATIC: movl _dsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo05:
; DARWIN-64-DYNAMIC: movl _dsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo05:
; DARWIN-64-PIC: movl _dsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @foo06() nounwind {
entry:
%0 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 0), align 4
store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 0), align 4
ret void
; LINUX-64-STATIC: foo06:
; LINUX-64-STATIC: movl lsrc(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], ldst(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo06:
; LINUX-32-STATIC: movl lsrc, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ldst
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo06:
; LINUX-32-PIC: movl lsrc, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ldst
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo06:
; LINUX-64-PIC: movl lsrc(%rip), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ldst(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo06:
; DARWIN-32-STATIC: movl _lsrc, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ldst
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo06:
; DARWIN-32-DYNAMIC: movl _lsrc, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ldst
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo06:
; DARWIN-32-PIC: calll L9$pb
; DARWIN-32-PIC-NEXT: L9$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _lsrc-L9$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], _ldst-L9$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo06:
; DARWIN-64-STATIC: movl _lsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ldst(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo06:
; DARWIN-64-DYNAMIC: movl _lsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ldst(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo06:
; DARWIN-64-PIC: movl _lsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], _ldst(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @foo07() nounwind {
entry:
store i32* getelementptr ([131072 x i32]* @ldst, i32 0, i32 0), i32** @lptr, align 8
ret void
; LINUX-64-STATIC: foo07:
; LINUX-64-STATIC: movq $ldst, lptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo07:
; LINUX-32-STATIC: movl $ldst, lptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo07:
; LINUX-32-PIC: movl $ldst, lptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo07:
; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo07:
; DARWIN-32-STATIC: movl $_ldst, _lptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo07:
; DARWIN-32-DYNAMIC: movl $_ldst, _lptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo07:
; DARWIN-32-PIC: calll L10$pb
; DARWIN-32-PIC-NEXT: L10$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: leal _ldst-L10$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L10$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo07:
; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo07:
; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo07:
; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @foo08() nounwind {
entry:
%0 = load i32** @lptr, align 8
%1 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 0), align 4
store i32 %1, i32* %0, align 4
ret void
; LINUX-64-STATIC: foo08:
; LINUX-64-STATIC: movl lsrc(%rip), %
; LINUX-64-STATIC: movq lptr(%rip), %
; LINUX-64-STATIC: movl
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: foo08:
; LINUX-32-STATIC: movl lsrc, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: foo08:
; LINUX-32-PIC: movl lsrc, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: foo08:
; LINUX-64-PIC: movl lsrc(%rip), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _foo08:
; DARWIN-32-STATIC: movl _lsrc, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _foo08:
; DARWIN-32-DYNAMIC: movl _lsrc, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _foo08:
; DARWIN-32-PIC: calll L11$pb
; DARWIN-32-PIC-NEXT: L11$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _lsrc-L11$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _lptr-L11$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _foo08:
; DARWIN-64-STATIC: movl _lsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _foo08:
; DARWIN-64-DYNAMIC: movl _lsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _foo08:
; DARWIN-64-PIC: movl _lsrc(%rip), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @qux00() nounwind {
entry:
%0 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 16), align 4
store i32 %0, i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 16), align 4
ret void
; LINUX-64-STATIC: qux00:
; LINUX-64-STATIC: movl src+64(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], dst+64(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux00:
; LINUX-32-STATIC: movl src+64, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], dst+64
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qux00:
; LINUX-32-PIC: movl src+64, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], dst+64
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux00:
; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux00:
; DARWIN-32-STATIC: movl _src+64, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dst+64
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux00:
; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux00:
; DARWIN-32-PIC: calll L12$pb
; DARWIN-32-PIC-NEXT: L12$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L12$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L12$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux00:
; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux00:
; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux00:
; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @qxx00() nounwind {
entry:
%0 = load i32* getelementptr ([32 x i32]* @xsrc, i32 0, i64 16), align 4
store i32 %0, i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 16), align 4
ret void
; LINUX-64-STATIC: qxx00:
; LINUX-64-STATIC: movl xsrc+64(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], xdst+64(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qxx00:
; LINUX-32-STATIC: movl xsrc+64, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], xdst+64
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qxx00:
; LINUX-32-PIC: movl xsrc+64, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], xdst+64
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qxx00:
; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qxx00:
; DARWIN-32-STATIC: movl _xsrc+64, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _xdst+64
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qxx00:
; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qxx00:
; DARWIN-32-PIC: calll L13$pb
; DARWIN-32-PIC-NEXT: L13$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L13$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L13$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qxx00:
; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qxx00:
; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qxx00:
; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @qux01() nounwind {
entry:
store i32* getelementptr ([131072 x i32]* @dst, i32 0, i64 16), i32** @ptr, align 8
ret void
; LINUX-64-STATIC: qux01:
; LINUX-64-STATIC: movq $dst+64, ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux01:
; LINUX-32-STATIC: movl $dst+64, ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qux01:
; LINUX-32-PIC: movl $dst+64, ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux01:
; LINUX-64-PIC: movq dst@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux01:
; DARWIN-32-STATIC: movl $_dst+64, _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux01:
; DARWIN-32-DYNAMIC: movl L_dst$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: addl $64, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux01:
; DARWIN-32-PIC: calll L14$pb
; DARWIN-32-PIC-NEXT: L14$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L14$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: addl $64, [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L14$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux01:
; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: addq $64, [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux01:
; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: addq $64, [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux01:
; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @qxx01() nounwind {
entry:
store i32* getelementptr ([32 x i32]* @xdst, i32 0, i64 16), i32** @ptr, align 8
ret void
; LINUX-64-STATIC: qxx01:
; LINUX-64-STATIC: movq $xdst+64, ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qxx01:
; LINUX-32-STATIC: movl $xdst+64, ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qxx01:
; LINUX-32-PIC: movl $xdst+64, ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qxx01:
; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qxx01:
; DARWIN-32-STATIC: movl $_xdst+64, _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qxx01:
; DARWIN-32-DYNAMIC: movl L_xdst$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: addl $64, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qxx01:
; DARWIN-32-PIC: calll L15$pb
; DARWIN-32-PIC-NEXT: L15$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L15$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: addl $64, [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L15$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qxx01:
; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: addq $64, [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qxx01:
; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: addq $64, [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qxx01:
; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @qux02() nounwind {
entry:
%0 = load i32** @ptr, align 8
%1 = load i32* getelementptr ([131072 x i32]* @src, i32 0, i64 16), align 4
%2 = getelementptr i32* %0, i64 16
store i32 %1, i32* %2, align 4
; LINUX-64-STATIC: qux02:
; LINUX-64-STATIC: movl src+64(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux02:
; LINUX-32-STATIC: movl src+64, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: qux02:
; LINUX-32-PIC: movl src+64, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux02:
; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux02:
; DARWIN-32-STATIC: movl _src+64, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux02:
; DARWIN-32-DYNAMIC: movl L_src$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux02:
; DARWIN-32-PIC: calll L16$pb
; DARWIN-32-PIC-NEXT: L16$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L16$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L16$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux02:
; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux02:
; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux02:
; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @qxx02() nounwind {
entry:
%0 = load i32** @ptr, align 8
%1 = load i32* getelementptr ([32 x i32]* @xsrc, i32 0, i64 16), align 4
%2 = getelementptr i32* %0, i64 16
store i32 %1, i32* %2, align 4
; LINUX-64-STATIC: qxx02:
; LINUX-64-STATIC: movl xsrc+64(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qxx02:
; LINUX-32-STATIC: movl xsrc+64, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl ptr, [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: qxx02:
; LINUX-32-PIC: movl xsrc+64, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl ptr, [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qxx02:
; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qxx02:
; DARWIN-32-STATIC: movl _xsrc+64, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _ptr, [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qxx02:
; DARWIN-32-DYNAMIC: movl L_xsrc$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl 64([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qxx02:
; DARWIN-32-PIC: calll L17$pb
; DARWIN-32-PIC-NEXT: L17$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L17$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 64([[ECX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L17$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qxx02:
; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qxx02:
; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qxx02:
; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @qux03() nounwind {
entry:
%0 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 16), align 32
store i32 %0, i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 16), align 32
ret void
; LINUX-64-STATIC: qux03:
; LINUX-64-STATIC: movl dsrc+64(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], ddst+64(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux03:
; LINUX-32-STATIC: movl dsrc+64, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ddst+64
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qux03:
; LINUX-32-PIC: movl dsrc+64, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ddst+64
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux03:
; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux03:
; DARWIN-32-STATIC: movl _dsrc+64, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ddst+64
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux03:
; DARWIN-32-DYNAMIC: movl _dsrc+64, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ddst+64
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux03:
; DARWIN-32-PIC: calll L18$pb
; DARWIN-32-PIC-NEXT: L18$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl (_dsrc-L18$pb)+64([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ddst-L18$pb)+64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux03:
; DARWIN-64-STATIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ddst+64(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux03:
; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ddst+64(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux03:
; DARWIN-64-PIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], _ddst+64(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @qux04() nounwind {
entry:
store i32* getelementptr ([131072 x i32]* @ddst, i32 0, i64 16), i32** @dptr, align 8
ret void
; LINUX-64-STATIC: qux04:
; LINUX-64-STATIC: movq $ddst+64, dptr(%rip)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux04:
; LINUX-32-STATIC: movl $ddst+64, dptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qux04:
; LINUX-32-PIC: movl $ddst+64, dptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux04:
; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: addq $64, [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux04:
; DARWIN-32-STATIC: movl $_ddst+64, _dptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux04:
; DARWIN-32-DYNAMIC: movl $_ddst+64, _dptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux04:
; DARWIN-32-PIC: calll L19$pb
; DARWIN-32-PIC-NEXT: L19$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: leal (_ddst-L19$pb)+64([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L19$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux04:
; DARWIN-64-STATIC: leaq _ddst+64(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux04:
; DARWIN-64-DYNAMIC: leaq _ddst+64(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux04:
; DARWIN-64-PIC: leaq _ddst+64(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @qux05() nounwind {
entry:
%0 = load i32** @dptr, align 8
%1 = load i32* getelementptr ([131072 x i32]* @dsrc, i32 0, i64 16), align 32
%2 = getelementptr i32* %0, i64 16
store i32 %1, i32* %2, align 4
; LINUX-64-STATIC: qux05:
; LINUX-64-STATIC: movl dsrc+64(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux05:
; LINUX-32-STATIC: movl dsrc+64, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl dptr, [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: qux05:
; LINUX-32-PIC: movl dsrc+64, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl dptr, [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux05:
; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]]), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux05:
; DARWIN-32-STATIC: movl _dsrc+64, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _dptr, [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux05:
; DARWIN-32-DYNAMIC: movl _dsrc+64, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux05:
; DARWIN-32-PIC: calll L20$pb
; DARWIN-32-PIC-NEXT: L20$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl (_dsrc-L20$pb)+64([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _dptr-L20$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux05:
; DARWIN-64-STATIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux05:
; DARWIN-64-DYNAMIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux05:
; DARWIN-64-PIC: movl _dsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @qux06() nounwind {
entry:
%0 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 16), align 4
store i32 %0, i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 16), align 4
ret void
; LINUX-64-STATIC: qux06:
; LINUX-64-STATIC: movl lsrc+64(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], ldst+64
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux06:
; LINUX-32-STATIC: movl lsrc+64, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ldst+64
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qux06:
; LINUX-32-PIC: movl lsrc+64, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ldst+64
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux06:
; LINUX-64-PIC: movl lsrc+64(%rip), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ldst+64(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux06:
; DARWIN-32-STATIC: movl _lsrc+64, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ldst+64
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux06:
; DARWIN-32-DYNAMIC: movl _lsrc+64, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _ldst+64
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux06:
; DARWIN-32-PIC: calll L21$pb
; DARWIN-32-PIC-NEXT: L21$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl (_lsrc-L21$pb)+64([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], (_ldst-L21$pb)+64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux06:
; DARWIN-64-STATIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], _ldst+64(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux06:
; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], _ldst+64(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux06:
; DARWIN-64-PIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], _ldst+64(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @qux07() nounwind {
entry:
store i32* getelementptr ([131072 x i32]* @ldst, i32 0, i64 16), i32** @lptr, align 8
ret void
; LINUX-64-STATIC: qux07:
; LINUX-64-STATIC: movq $ldst+64, lptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux07:
; LINUX-32-STATIC: movl $ldst+64, lptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: qux07:
; LINUX-32-PIC: movl $ldst+64, lptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux07:
; LINUX-64-PIC: leaq ldst+64(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux07:
; DARWIN-32-STATIC: movl $_ldst+64, _lptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux07:
; DARWIN-32-DYNAMIC: movl $_ldst+64, _lptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux07:
; DARWIN-32-PIC: calll L22$pb
; DARWIN-32-PIC-NEXT: L22$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: leal (_ldst-L22$pb)+64([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L22$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux07:
; DARWIN-64-STATIC: leaq _ldst+64(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux07:
; DARWIN-64-DYNAMIC: leaq _ldst+64(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux07:
; DARWIN-64-PIC: leaq _ldst+64(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @qux08() nounwind {
entry:
%0 = load i32** @lptr, align 8
%1 = load i32* getelementptr ([131072 x i32]* @lsrc, i32 0, i64 16), align 4
%2 = getelementptr i32* %0, i64 16
store i32 %1, i32* %2, align 4
; LINUX-64-STATIC: qux08:
; LINUX-64-STATIC: movl lsrc+64(%rip), [[EAX:%e.x]]
; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]])
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: qux08:
; LINUX-32-STATIC: movl lsrc+64, [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl lptr, [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-STATIC-NEXT: ret
ret void
; LINUX-32-PIC: qux08:
; LINUX-32-PIC: movl lsrc+64, [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl lptr, [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], 64([[ECX]])
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: qux08:
; LINUX-64-PIC: movl lsrc+64(%rip), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _qux08:
; DARWIN-32-STATIC: movl _lsrc+64, [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _lptr, [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _qux08:
; DARWIN-32-DYNAMIC: movl _lsrc+64, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], 64([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _qux08:
; DARWIN-32-PIC: calll L23$pb
; DARWIN-32-PIC-NEXT: L23$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl (_lsrc-L23$pb)+64([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _lptr-L23$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], 64([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _qux08:
; DARWIN-64-STATIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _qux08:
; DARWIN-64-DYNAMIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _qux08:
; DARWIN-64-PIC: movl _lsrc+64(%rip), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @ind00(i64 %i) nounwind {
entry:
%0 = getelementptr [131072 x i32]* @src, i64 0, i64 %i
%1 = load i32* %0, align 4
%2 = getelementptr [131072 x i32]* @dst, i64 0, i64 %i
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: ind00:
; LINUX-64-STATIC: movl src(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], dst(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind00:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], dst(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind00:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], dst(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind00:
; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind00:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _src(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], _dst(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind00:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind00:
; DARWIN-32-PIC: calll L24$pb
; DARWIN-32-PIC-NEXT: L24$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L24$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L24$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind00:
; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind00:
; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind00:
; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @ixd00(i64 %i) nounwind {
entry:
%0 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %i
%1 = load i32* %0, align 4
%2 = getelementptr [32 x i32]* @xdst, i64 0, i64 %i
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: ixd00:
; LINUX-64-STATIC: movl xsrc(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], xdst(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ixd00:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], xdst(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ixd00:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], xdst(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ixd00:
; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ixd00:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _xsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], _xdst(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ixd00:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ixd00:
; DARWIN-32-PIC: calll L25$pb
; DARWIN-32-PIC-NEXT: L25$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L25$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L25$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ixd00:
; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ixd00:
; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ixd00:
; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @ind01(i64 %i) nounwind {
entry:
%0 = getelementptr [131072 x i32]* @dst, i64 0, i64 %i
store i32* %0, i32** @ptr, align 8
ret void
; LINUX-64-STATIC: ind01:
; LINUX-64-STATIC: leaq dst(,%rdi,4), [[RAX:%r.x]]
; LINUX-64-STATIC: movq [[RAX]], ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind01:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: leal dst(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind01:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: leal dst(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind01:
; LINUX-64-PIC: shlq $2, %rdi
; LINUX-64-PIC-NEXT: addq dst@GOTPCREL(%rip), %rdi
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq %rdi, ([[RAX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind01:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: leal _dst(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind01:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: shll $2, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: addl L_dst$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind01:
; DARWIN-32-PIC: calll L26$pb
; DARWIN-32-PIC-NEXT: L26$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: shll $2, [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: addl L_dst$non_lazy_ptr-L26$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L26$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind01:
; DARWIN-64-STATIC: shlq $2, %rdi
; DARWIN-64-STATIC-NEXT: addq _dst@GOTPCREL(%rip), %rdi
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind01:
; DARWIN-64-DYNAMIC: shlq $2, %rdi
; DARWIN-64-DYNAMIC-NEXT: addq _dst@GOTPCREL(%rip), %rdi
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind01:
; DARWIN-64-PIC: shlq $2, %rdi
; DARWIN-64-PIC-NEXT: addq _dst@GOTPCREL(%rip), %rdi
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @ixd01(i64 %i) nounwind {
entry:
%0 = getelementptr [32 x i32]* @xdst, i64 0, i64 %i
store i32* %0, i32** @ptr, align 8
ret void
; LINUX-64-STATIC: ixd01:
; LINUX-64-STATIC: leaq xdst(,%rdi,4), [[RAX:%r.x]]
; LINUX-64-STATIC: movq [[RAX]], ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ixd01:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: leal xdst(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ixd01:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: leal xdst(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ixd01:
; LINUX-64-PIC: shlq $2, %rdi
; LINUX-64-PIC-NEXT: addq xdst@GOTPCREL(%rip), %rdi
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq %rdi, ([[RAX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ixd01:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: leal _xdst(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ixd01:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: shll $2, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: addl L_xdst$non_lazy_ptr, [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ixd01:
; DARWIN-32-PIC: calll L27$pb
; DARWIN-32-PIC-NEXT: L27$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: shll $2, [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: addl L_xdst$non_lazy_ptr-L27$pb([[EAX]]), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L27$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ixd01:
; DARWIN-64-STATIC: shlq $2, %rdi
; DARWIN-64-STATIC-NEXT: addq _xdst@GOTPCREL(%rip), %rdi
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ixd01:
; DARWIN-64-DYNAMIC: shlq $2, %rdi
; DARWIN-64-DYNAMIC-NEXT: addq _xdst@GOTPCREL(%rip), %rdi
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ixd01:
; DARWIN-64-PIC: shlq $2, %rdi
; DARWIN-64-PIC-NEXT: addq _xdst@GOTPCREL(%rip), %rdi
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq %rdi, ([[RAX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @ind02(i64 %i) nounwind {
entry:
%0 = load i32** @ptr, align 8
%1 = getelementptr [131072 x i32]* @src, i64 0, i64 %i
%2 = load i32* %1, align 4
%3 = getelementptr i32* %0, i64 %i
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: ind02:
; LINUX-64-STATIC: movl src(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind02:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind02:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl src(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind02:
; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind02:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _src(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind02:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind02:
; DARWIN-32-PIC: calll L28$pb
; DARWIN-32-PIC-NEXT: L28$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L28$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L28$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind02:
; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind02:
; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind02:
; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @ixd02(i64 %i) nounwind {
entry:
%0 = load i32** @ptr, align 8
%1 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %i
%2 = load i32* %1, align 4
%3 = getelementptr i32* %0, i64 %i
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: ixd02:
; LINUX-64-STATIC: movl xsrc(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ixd02:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ixd02:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl xsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ixd02:
; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ixd02:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _xsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ixd02:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[ECX]],[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ixd02:
; DARWIN-32-PIC: calll L29$pb
; DARWIN-32-PIC-NEXT: L29$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L29$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EDX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L29$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ixd02:
; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ixd02:
; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ixd02:
; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @ind03(i64 %i) nounwind {
entry:
%0 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %i
%1 = load i32* %0, align 4
%2 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %i
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: ind03:
; LINUX-64-STATIC: movl dsrc(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], ddst(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind03:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], ddst(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind03:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], ddst(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind03:
; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind03:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ddst(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind03:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ddst(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind03:
; DARWIN-32-PIC: calll L30$pb
; DARWIN-32-PIC-NEXT: L30$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _dsrc-L30$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], _ddst-L30$pb([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind03:
; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind03:
; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind03:
; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @ind04(i64 %i) nounwind {
entry:
%0 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %i
store i32* %0, i32** @dptr, align 8
ret void
; LINUX-64-STATIC: ind04:
; LINUX-64-STATIC: leaq ddst(,%rdi,4), [[RAX:%r.x]]
; LINUX-64-STATIC: movq [[RAX]], dptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind04:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: leal ddst(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], dptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind04:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: leal ddst(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], dptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind04:
; LINUX-64-PIC: shlq $2, %rdi
; LINUX-64-PIC-NEXT: addq ddst@GOTPCREL(%rip), %rdi
; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq %rdi, ([[RAX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind04:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: leal _ddst(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind04:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: leal _ddst(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind04:
; DARWIN-32-PIC: calll L31$pb
; DARWIN-32-PIC-NEXT: L31$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: leal _ddst-L31$pb([[EAX]],[[ECX]],4), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L31$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind04:
; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind04:
; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind04:
; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @ind05(i64 %i) nounwind {
entry:
%0 = load i32** @dptr, align 8
%1 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %i
%2 = load i32* %1, align 4
%3 = getelementptr i32* %0, i64 %i
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: ind05:
; LINUX-64-STATIC: movl dsrc(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind05:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl dptr, [[EDX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind05:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl dsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl dptr, [[EDX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind05:
; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind05:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _dptr, [[EDX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind05:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _dsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind05:
; DARWIN-32-PIC: calll L32$pb
; DARWIN-32-PIC-NEXT: L32$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _dsrc-L32$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _dptr-L32$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind05:
; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind05:
; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind05:
; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @ind06(i64 %i) nounwind {
entry:
%0 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %i
%1 = load i32* %0, align 4
%2 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %i
store i32 %1, i32* %2, align 4
ret void
; LINUX-64-STATIC: ind06:
; LINUX-64-STATIC: movl lsrc(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], ldst(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind06:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], ldst(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind06:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], ldst(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind06:
; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: leaq ldst(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind06:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ldst(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind06:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ldst(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind06:
; DARWIN-32-PIC: calll L33$pb
; DARWIN-32-PIC-NEXT: L33$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _lsrc-L33$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], _ldst-L33$pb([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind06:
; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind06:
; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind06:
; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @ind07(i64 %i) nounwind {
entry:
%0 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %i
store i32* %0, i32** @lptr, align 8
ret void
; LINUX-64-STATIC: ind07:
; LINUX-64-STATIC: leaq ldst(,%rdi,4), [[RAX:%r.x]]
; LINUX-64-STATIC: movq [[RAX]], lptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind07:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: leal ldst(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], lptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind07:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: leal ldst(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], lptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind07:
; LINUX-64-PIC: leaq ldst(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], lptr(%rip)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind07:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: leal _ldst(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _lptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind07:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: leal _ldst(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _lptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind07:
; DARWIN-32-PIC: calll L34$pb
; DARWIN-32-PIC-NEXT: L34$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: leal _ldst-L34$pb([[EAX]],[[ECX]],4), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], _lptr-L34$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind07:
; DARWIN-64-STATIC: leaq _ldst(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind07:
; DARWIN-64-DYNAMIC: leaq _ldst(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind07:
; DARWIN-64-PIC: leaq _ldst(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: leaq ([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], _lptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @ind08(i64 %i) nounwind {
entry:
%0 = load i32** @lptr, align 8
%1 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %i
%2 = load i32* %1, align 4
%3 = getelementptr i32* %0, i64 %i
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: ind08:
; LINUX-64-STATIC: movl lsrc(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movq lptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ind08:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl lptr, [[EDX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ind08:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl lsrc(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl lptr, [[EDX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ind08:
; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq lptr(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _ind08:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _lptr, [[EDX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _ind08:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _lsrc(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _lptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], ([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _ind08:
; DARWIN-32-PIC: calll L35$pb
; DARWIN-32-PIC-NEXT: L35$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _lsrc-L35$pb([[EAX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _lptr-L35$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], ([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _ind08:
; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _ind08:
; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _ind08:
; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl ([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _lptr(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], ([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @off00(i64 %i) nounwind {
entry:
%0 = add i64 %i, 16
%1 = getelementptr [131072 x i32]* @src, i64 0, i64 %0
%2 = load i32* %1, align 4
%3 = getelementptr [131072 x i32]* @dst, i64 0, i64 %0
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: off00:
; LINUX-64-STATIC: movl src+64(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], dst+64(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off00:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], dst+64(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off00:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], dst+64(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off00:
; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq dst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off00:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _src+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], _dst+64(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off00:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off00:
; DARWIN-32-PIC: calll L36$pb
; DARWIN-32-PIC-NEXT: L36$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L36$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L36$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off00:
; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off00:
; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off00:
; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _dst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @oxf00(i64 %i) nounwind {
entry:
%0 = add i64 %i, 16
%1 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %0
%2 = load i32* %1, align 4
%3 = getelementptr [32 x i32]* @xdst, i64 0, i64 %0
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: oxf00:
; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], xdst+64(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: oxf00:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], xdst+64(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: oxf00:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], xdst+64(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: oxf00:
; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _oxf00:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], _xdst+64(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _oxf00:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _oxf00:
; DARWIN-32-PIC: calll L37$pb
; DARWIN-32-PIC-NEXT: L37$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L37$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L37$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _oxf00:
; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _oxf00:
; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _oxf00:
; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _xdst@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @off01(i64 %i) nounwind {
entry:
%.sum = add i64 %i, 16
%0 = getelementptr [131072 x i32]* @dst, i64 0, i64 %.sum
store i32* %0, i32** @ptr, align 8
ret void
; LINUX-64-STATIC: off01:
; LINUX-64-STATIC: leaq dst+64(,%rdi,4), [[RAX:%r.x]]
; LINUX-64-STATIC: movq [[RAX]], ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off01:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: leal dst+64(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off01:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: leal dst+64(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off01:
; LINUX-64-PIC: movq dst@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off01:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: leal _dst+64(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off01:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_dst$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off01:
; DARWIN-32-PIC: calll L38$pb
; DARWIN-32-PIC-NEXT: L38$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_dst$non_lazy_ptr-L38$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: leal 64([[EDX]],[[ECX]],4), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L38$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off01:
; DARWIN-64-STATIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off01:
; DARWIN-64-DYNAMIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off01:
; DARWIN-64-PIC: movq _dst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @oxf01(i64 %i) nounwind {
entry:
%.sum = add i64 %i, 16
%0 = getelementptr [32 x i32]* @xdst, i64 0, i64 %.sum
store i32* %0, i32** @ptr, align 8
ret void
; LINUX-64-STATIC: oxf01:
; LINUX-64-STATIC: leaq xdst+64(,%rdi,4), [[RAX:%r.x]]
; LINUX-64-STATIC: movq [[RAX]], ptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: oxf01:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: leal xdst+64(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], ptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: oxf01:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: leal xdst+64(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], ptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: oxf01:
; LINUX-64-PIC: movq xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _oxf01:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: leal _xdst+64(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _ptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _oxf01:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_xdst$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: leal 64([[ECX]],[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], ([[ECX]])
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _oxf01:
; DARWIN-32-PIC: calll L39$pb
; DARWIN-32-PIC-NEXT: L39$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xdst$non_lazy_ptr-L39$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: leal 64([[EDX]],[[ECX]],4), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L39$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], ([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _oxf01:
; DARWIN-64-STATIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _oxf01:
; DARWIN-64-DYNAMIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _oxf01:
; DARWIN-64-PIC: movq _xdst@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; DARWIN-64-PIC-NEXT: ret
}
define void @off02(i64 %i) nounwind {
entry:
%0 = load i32** @ptr, align 8
%1 = add i64 %i, 16
%2 = getelementptr [131072 x i32]* @src, i64 0, i64 %1
%3 = load i32* %2, align 4
%4 = getelementptr i32* %0, i64 %1
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: off02:
; LINUX-64-STATIC: movl src+64(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off02:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off02:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl src+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off02:
; LINUX-64-PIC: movq src@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off02:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _src+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off02:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_src$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off02:
; DARWIN-32-PIC: calll L40$pb
; DARWIN-32-PIC-NEXT: L40$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_src$non_lazy_ptr-L40$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L40$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off02:
; DARWIN-64-STATIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off02:
; DARWIN-64-DYNAMIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off02:
; DARWIN-64-PIC: movq _src@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @oxf02(i64 %i) nounwind {
entry:
%0 = load i32** @ptr, align 8
%1 = add i64 %i, 16
%2 = getelementptr [32 x i32]* @xsrc, i64 0, i64 %1
%3 = load i32* %2, align 4
%4 = getelementptr i32* %0, i64 %1
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: oxf02:
; LINUX-64-STATIC: movl xsrc+64(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movq ptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: oxf02:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl ptr, [[EDX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: oxf02:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl ptr, [[EDX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: oxf02:
; LINUX-64-PIC: movq xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _oxf02:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _xsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _ptr, [[EDX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _oxf02:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_xsrc$non_lazy_ptr, [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl 64([[ECX]],[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl L_ptr$non_lazy_ptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl ([[EDX]]), [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _oxf02:
; DARWIN-32-PIC: calll L41$pb
; DARWIN-32-PIC-NEXT: L41$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_xsrc$non_lazy_ptr-L41$pb([[EAX]]), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 64([[EDX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl L_ptr$non_lazy_ptr-L41$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl ([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _oxf02:
; DARWIN-64-STATIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _oxf02:
; DARWIN-64-DYNAMIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _oxf02:
; DARWIN-64-PIC: movq _xsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _ptr@GOTPCREL(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @off03(i64 %i) nounwind {
entry:
%0 = add i64 %i, 16
%1 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %0
%2 = load i32* %1, align 4
%3 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %0
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: off03:
; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], ddst+64(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off03:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], ddst+64(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off03:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], ddst+64(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off03:
; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq ddst@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off03:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ddst+64(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off03:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ddst+64(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off03:
; DARWIN-32-PIC: calll L42$pb
; DARWIN-32-PIC-NEXT: L42$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl (_dsrc-L42$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ddst-L42$pb)+64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off03:
; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off03:
; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off03:
; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: leaq _ddst(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @off04(i64 %i) nounwind {
entry:
%.sum = add i64 %i, 16
%0 = getelementptr [131072 x i32]* @ddst, i64 0, i64 %.sum
store i32* %0, i32** @dptr, align 8
ret void
; LINUX-64-STATIC: off04:
; LINUX-64-STATIC: leaq ddst+64(,%rdi,4), [[RAX:%r.x]]
; LINUX-64-STATIC: movq [[RAX]], dptr
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off04:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: leal ddst+64(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[EAX]], dptr
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off04:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: leal ddst+64(,[[EAX]],4), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[EAX]], dptr
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off04:
; LINUX-64-PIC: movq ddst@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq [[RAX]], ([[RCX]])
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off04:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: leal _ddst+64(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off04:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: leal _ddst+64(,[[EAX]],4), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[EAX]], _dptr
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off04:
; DARWIN-32-PIC: calll L43$pb
; DARWIN-32-PIC-NEXT: L43$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: leal (_ddst-L43$pb)+64([[EAX]],[[ECX]],4), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[ECX]], _dptr-L43$pb([[EAX]])
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off04:
; DARWIN-64-STATIC: leaq _ddst(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off04:
; DARWIN-64-DYNAMIC: leaq _ddst(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off04:
; DARWIN-64-PIC: leaq _ddst(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: leaq 64([[RAX]],%rdi,4), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movq [[RAX]], _dptr(%rip)
; DARWIN-64-PIC-NEXT: ret
}
define void @off05(i64 %i) nounwind {
entry:
%0 = load i32** @dptr, align 8
%1 = add i64 %i, 16
%2 = getelementptr [131072 x i32]* @dsrc, i64 0, i64 %1
%3 = load i32* %2, align 4
%4 = getelementptr i32* %0, i64 %1
store i32 %3, i32* %4, align 4
ret void
; LINUX-64-STATIC: off05:
; LINUX-64-STATIC: movl dsrc+64(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movq dptr(%rip), [[RCX:%r.x]]
; LINUX-64-STATIC: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off05:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl dptr, [[EDX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off05:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl dptr, [[EDX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off05:
; LINUX-64-PIC: movq dsrc@GOTPCREL(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: movq dptr@GOTPCREL(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movq ([[RCX]]), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off05:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _dptr, [[EDX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off05:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _dsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _dptr, [[EDX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], 64([[EDX]],[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off05:
; DARWIN-32-PIC: calll L44$pb
; DARWIN-32-PIC-NEXT: L44$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl (_dsrc-L44$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl _dptr-L44$pb([[EAX]]), [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], 64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off05:
; DARWIN-64-STATIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off05:
; DARWIN-64-DYNAMIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off05:
; DARWIN-64-PIC: leaq _dsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: movq _dptr(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret
}
define void @off06(i64 %i) nounwind {
entry:
%0 = add i64 %i, 16
%1 = getelementptr [131072 x i32]* @lsrc, i64 0, i64 %0
%2 = load i32* %1, align 4
%3 = getelementptr [131072 x i32]* @ldst, i64 0, i64 %0
store i32 %2, i32* %3, align 4
ret void
; LINUX-64-STATIC: off06:
; LINUX-64-STATIC: movl lsrc+64(,%rdi,4), [[EAX:%e.x]]
; LINUX-64-STATIC: movl [[EAX]], ldst+64(,%rdi,4)
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: off06:
; LINUX-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-STATIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-STATIC-NEXT: movl [[ECX]], ldst+64(,[[EAX]],4)
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: off06:
; LINUX-32-PIC: movl 4(%esp), [[EAX:%e.x]]
; LINUX-32-PIC-NEXT: movl lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; LINUX-32-PIC-NEXT: movl [[ECX]], ldst+64(,[[EAX]],4)
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: off06:
; LINUX-64-PIC: leaq lsrc(%rip), [[RAX:%r.x]]
; LINUX-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; LINUX-64-PIC-NEXT: leaq ldst(%rip), [[RCX:%r.x]]
; LINUX-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; LINUX-64-PIC-NEXT: ret
; DARWIN-32-STATIC: _off06:
; DARWIN-32-STATIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-STATIC-NEXT: movl [[ECX]], _ldst+64(,[[EAX]],4)
; DARWIN-32-STATIC-NEXT: ret
; DARWIN-32-DYNAMIC: _off06:
; DARWIN-32-DYNAMIC: movl 4(%esp), [[EAX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl _lsrc+64(,[[EAX]],4), [[ECX:%e.x]]
; DARWIN-32-DYNAMIC-NEXT: movl [[ECX]], _ldst+64(,[[EAX]],4)
; DARWIN-32-DYNAMIC-NEXT: ret
; DARWIN-32-PIC: _off06:
; DARWIN-32-PIC: calll L45$pb
; DARWIN-32-PIC-NEXT: L45$pb:
; DARWIN-32-PIC-NEXT: popl [[EAX:%e.x]]
; DARWIN-32-PIC-NEXT: movl 4(%esp), [[ECX:%e.x]]
; DARWIN-32-PIC-NEXT: movl (_lsrc-L45$pb)+64([[EAX]],[[ECX]],4), [[EDX:%e.x]]
; DARWIN-32-PIC-NEXT: movl [[EDX]], (_ldst-L45$pb)+64([[EAX]],[[ECX]],4)
; DARWIN-32-PIC-NEXT: ret
; DARWIN-64-STATIC: _off06:
; DARWIN-64-STATIC: leaq _lsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-STATIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
; DARWIN-64-STATIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-STATIC-NEXT: ret
; DARWIN-64-DYNAMIC: _off06:
; DARWIN-64-DYNAMIC: leaq _lsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-DYNAMIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
; DARWIN-64-DYNAMIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-DYNAMIC-NEXT: ret
; DARWIN-64-PIC: _off06:
; DARWIN-64-PIC: leaq _lsrc(%rip), [[RAX:%r.x]]
; DARWIN-64-PIC-NEXT: movl 64([[RAX]],%rdi,4), [[EAX:%e.x]]
; DARWIN-64-PIC-NEXT: leaq _ldst(%rip), [[RCX:%r.x]]
; DARWIN-64-PIC-NEXT: movl [[EAX]], 64([[RCX]],%rdi,4)
; DARWIN-64-PIC-NEXT: ret