aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2012-07-25 18:28:13 +0000
committerManman Ren <mren@apple.com>2012-07-25 18:28:13 +0000
commitd68e8cda245269c032a692873dc8eb163fa6ef00 (patch)
treed1f0c6987fb904ed8cb31ca343ae71e48571363d /test/CodeGen/X86
parent9f14ed1c60a1f6e8ab434a85d2ba9d82bc125cf4 (diff)
downloadexternal_llvm-d68e8cda245269c032a692873dc8eb163fa6ef00.zip
external_llvm-d68e8cda245269c032a692873dc8eb163fa6ef00.tar.gz
external_llvm-d68e8cda245269c032a692873dc8eb163fa6ef00.tar.bz2
Disable rematerialization in TwoAddressInstructionPass.
It is redundant; RegisterCoalescer will do the remat if it can't eliminate the copy. Collected instruction counts before and after this. A few extra instructions are generated due to spilling but it is normal to see these kinds of changes with almost any small codegen change, according to Jakob. This also fixed rdar://11830760 where xor is expected instead of movi0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160749 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r--test/CodeGen/X86/cmov.ll8
-rw-r--r--test/CodeGen/X86/jump_sign.ll1
-rw-r--r--test/CodeGen/X86/select.ll2
3 files changed, 6 insertions, 5 deletions
diff --git a/test/CodeGen/X86/cmov.ll b/test/CodeGen/X86/cmov.ll
index 43beac0..ed25c82 100644
--- a/test/CodeGen/X86/cmov.ll
+++ b/test/CodeGen/X86/cmov.ll
@@ -4,8 +4,8 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
define i32 @test1(i32 %x, i32 %n, i32 %w, i32* %vp) nounwind readnone {
entry:
; CHECK: test1:
-; CHECK: btl
-; CHECK-NEXT: movl $12, %eax
+; CHECK: movl $12, %eax
+; CHECK-NEXT: btl
; CHECK-NEXT: cmovael (%rcx), %eax
; CHECK-NEXT: ret
@@ -19,8 +19,8 @@ entry:
define i32 @test2(i32 %x, i32 %n, i32 %w, i32* %vp) nounwind readnone {
entry:
; CHECK: test2:
-; CHECK: btl
-; CHECK-NEXT: movl $12, %eax
+; CHECK: movl $12, %eax
+; CHECK-NEXT: btl
; CHECK-NEXT: cmovbl (%rcx), %eax
; CHECK-NEXT: ret
diff --git a/test/CodeGen/X86/jump_sign.ll b/test/CodeGen/X86/jump_sign.ll
index 5b7c19f..5fb6ee5 100644
--- a/test/CodeGen/X86/jump_sign.ll
+++ b/test/CodeGen/X86/jump_sign.ll
@@ -142,6 +142,7 @@ if.else:
define i32 @l4(i32 %a, i32 %b) nounwind {
entry:
; CHECK: l4:
+; CHECK: xor
; CHECK: sub
; CHECK-NOT: cmp
%cmp = icmp sgt i32 %b, %a
diff --git a/test/CodeGen/X86/select.ll b/test/CodeGen/X86/select.ll
index c8d9345..ac95028 100644
--- a/test/CodeGen/X86/select.ll
+++ b/test/CodeGen/X86/select.ll
@@ -189,8 +189,8 @@ entry:
%call = tail call noalias i8* @_Znam(i64 %D) nounwind noredzone
ret i8* %call
; CHECK: test12:
-; CHECK: mulq
; CHECK: movq $-1, %rdi
+; CHECK: mulq
; CHECK: cmovnoq %rax, %rdi
; CHECK: jmp __Znam
}