diff options
-rw-r--r-- | llvm/test/CodeGen/X86/memcpy-from-string.ll | 13 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/memset-2.ll | 2 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/unaligned-load.ll | 63 |
3 files changed, 55 insertions, 23 deletions
diff --git a/llvm/test/CodeGen/X86/memcpy-from-string.ll b/llvm/test/CodeGen/X86/memcpy-from-string.ll index 8e2444ebe0e..454667276b4 100644 --- a/llvm/test/CodeGen/X86/memcpy-from-string.ll +++ b/llvm/test/CodeGen/X86/memcpy-from-string.ll @@ -1,4 +1,5 @@ -; RUN: llc < %s -asm-verbose=false | FileCheck %s +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s | FileCheck %s --check-prefix=X86 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @@ -12,11 +13,13 @@ target triple = "x86_64-unknown-linux-gnu" ; Memcpy lowering should emit stores of immediates containing string data from ; the correct offsets. -; CHECK-LABEL: foo: -; CHECK: movb $0, 6(%rdi) -; CHECK: movw $15212, 4(%rdi) -; CHECK: movl $1802117222, (%rdi) define void @foo(i8* %tmp2) { +; X86-LABEL: foo: +; X86: # %bb.0: +; X86-NEXT: movb $0, 6(%rdi) +; X86-NEXT: movw $15212, 4(%rdi) # imm = 0x3B6C +; X86-NEXT: movl $1802117222, (%rdi) # imm = 0x6B6A2066 +; X86-NEXT: retq call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @0, i64 0, i64 3), i64 7, i1 false) ret void } diff --git a/llvm/test/CodeGen/X86/memset-2.ll b/llvm/test/CodeGen/X86/memset-2.ll index a0511f2804a..33a2227058b 100644 --- a/llvm/test/CodeGen/X86/memset-2.ll +++ b/llvm/test/CodeGen/X86/memset-2.ll @@ -10,6 +10,7 @@ define fastcc void @t1() nounwind { ; CHECK-NEXT: pushl $0 ; CHECK-NEXT: calll _memset ; CHECK-NEXT: addl $16, %esp +; CHECK-NEXT: ud2 entry: call void @llvm.memset.p0i8.i32(i8* null, i8 0, i32 188, i1 false) unreachable @@ -22,6 +23,7 @@ define fastcc void @t2(i8 signext %c) nounwind { ; CHECK-NEXT: movl %ecx, {{[0-9]+}}(%esp) ; CHECK-NEXT: movl $76, {{[0-9]+}}(%esp) ; CHECK-NEXT: calll _memset +; CHECK-NEXT: ud2 entry: call void @llvm.memset.p0i8.i32(i8* undef, i8 %c, i32 76, i1 false) unreachable diff --git a/llvm/test/CodeGen/X86/unaligned-load.ll b/llvm/test/CodeGen/X86/unaligned-load.ll index 1ceca2cd06d..980fca26175 100644 --- a/llvm/test/CodeGen/X86/unaligned-load.ll +++ b/llvm/test/CodeGen/X86/unaligned-load.ll @@ -1,11 +1,53 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin10.0 -mcpu=core2 -relocation-model=dynamic-no-pic --asm-verbose=0 | FileCheck -check-prefix=I386 %s -; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -mcpu=core2 -relocation-model=dynamic-no-pic --asm-verbose=0 | FileCheck -check-prefix=CORE2 %s -; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -mcpu=corei7 -relocation-model=dynamic-no-pic --asm-verbose=0 | FileCheck -check-prefix=COREI7 %s +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=i386-apple-darwin10.0 -mcpu=core2 -relocation-model=dynamic-no-pic | FileCheck -check-prefix=I386 %s +; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -mcpu=core2 -relocation-model=dynamic-no-pic | FileCheck -check-prefix=CORE2 %s +; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -mcpu=corei7 -relocation-model=dynamic-no-pic | FileCheck -check-prefix=COREI7 %s @.str1 = internal constant [31 x i8] c"DHRYSTONE PROGRAM, SOME STRING\00", align 8 @.str3 = internal constant [31 x i8] c"DHRYSTONE PROGRAM, 2'ND STRING\00", align 8 define void @func() nounwind ssp { +; I386-LABEL: func: +; I386: ## %bb.0: ## %entry +; I386-NEXT: pushl %esi +; I386-NEXT: subl $40, %esp +; I386-NEXT: leal {{[0-9]+}}(%esp), %esi +; I386-NEXT: .p2align 4, 0x90 +; I386-NEXT: LBB0_1: ## %bb +; I386-NEXT: ## =>This Inner Loop Header: Depth=1 +; I386-NEXT: subl $4, %esp +; I386-NEXT: pushl $31 +; I386-NEXT: pushl $_.str3 +; I386-NEXT: pushl %esi +; I386-NEXT: calll _memcpy +; I386-NEXT: addl $16, %esp +; I386-NEXT: jmp LBB0_1 +; +; CORE2-LABEL: func: +; CORE2: ## %bb.0: ## %entry +; CORE2-NEXT: movabsq $20070800167293728, %rax ## imm = 0x474E4952545320 +; CORE2-NEXT: movabsq $2325069237881678925, %rcx ## imm = 0x20444E2732202C4D +; CORE2-NEXT: movabsq $4706902966564560965, %rdx ## imm = 0x4152474F52502045 +; CORE2-NEXT: movabsq $5642821575076104260, %rsi ## imm = 0x4E4F545359524844 +; CORE2-NEXT: .p2align 4, 0x90 +; CORE2-NEXT: LBB0_1: ## %bb +; CORE2-NEXT: ## =>This Inner Loop Header: Depth=1 +; CORE2-NEXT: movq %rax, -{{[0-9]+}}(%rsp) +; CORE2-NEXT: movq %rcx, -{{[0-9]+}}(%rsp) +; CORE2-NEXT: movq %rdx, -{{[0-9]+}}(%rsp) +; CORE2-NEXT: movq %rsi, -{{[0-9]+}}(%rsp) +; CORE2-NEXT: jmp LBB0_1 +; +; COREI7-LABEL: func: +; COREI7: ## %bb.0: ## %entry +; COREI7-NEXT: movups _.str3+{{.*}}(%rip), %xmm0 +; COREI7-NEXT: movups {{.*}}(%rip), %xmm1 +; COREI7-NEXT: .p2align 4, 0x90 +; COREI7-NEXT: LBB0_1: ## %bb +; COREI7-NEXT: ## =>This Inner Loop Header: Depth=1 +; COREI7-NEXT: movups %xmm0, -{{[0-9]+}}(%rsp) +; COREI7-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp) +; COREI7-NEXT: jmp LBB0_1 entry: %String2Loc = alloca [31 x i8], align 1 br label %bb @@ -20,18 +62,3 @@ return: ; No predecessors! } declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind - -; I386: calll {{_?}}memcpy - -; CORE2: movabsq -; CORE2: movabsq -; CORE2: movabsq - -; COREI7: movups _.str3 - -; CORE2: .section -; CORE2: .p2align 3 -; CORE2-NEXT: _.str1: -; CORE2-NEXT: .asciz "DHRYSTONE PROGRAM, SOME STRING" -; CORE2: .p2align 3 -; CORE2-NEXT: _.str3: |