1 ; RUN: llc < %s -mtriple=i686-unknown-linux -O2 | FileCheck %s 2 3 ; This tests the i686 lowering of mempcpy. 4 ; Also see mempcpy.ll 5 6 @G = common global i8* null, align 8 7 8 ; CHECK-LABEL: RET_MEMPCPY: 9 ; CHECK: movl [[REG:%e[a-z0-9]+]], {{.*}}G 10 ; CHECK: calll {{.*}}memcpy 11 ; CHECK: movl [[REG]], %eax 12 ; 13 define i8* @RET_MEMPCPY(i8* %DST, i8* %SRC, i32 %N) { 14 %add.ptr = getelementptr inbounds i8, i8* %DST, i32 %N 15 store i8* %add.ptr, i8** @G, align 8 16 %call = tail call i8* @mempcpy(i8* %DST, i8* %SRC, i32 %N) 17 ret i8* %call 18 } 19 20 declare i8* @mempcpy(i8*, i8*, i32) 21