Add SplitKit::isOriginalEndpoint and use it to force live range splitting to terminate.
[oota-llvm.git] / test / CodeGen / X86 / remat-mov-0.ll
1 ; RUN: llc < %s -march=x86-64 | FileCheck %s
2
3 ; CodeGen should remat the zero instead of spilling it.
4
5 declare void @foo(i64 %p)
6
7 ; CHECK: bar:
8 ; CHECK: xorl %edi, %edi
9 ; CHECK: xorl %edi, %edi
10 define void @bar() nounwind {
11   call void @foo(i64 0)
12   call void @foo(i64 0)
13   ret void
14 }
15
16 ; CHECK: bat:
17 ; CHECK: movq $-1, %rdi
18 ; CHECK: movq $-1, %rdi
19 define void @bat() nounwind {
20   call void @foo(i64 -1)
21   call void @foo(i64 -1)
22   ret void
23 }
24
25 ; CHECK: bau:
26 ; CHECK: movl $1, %edi
27 ; CHECK: movl $1, %edi
28 define void @bau() nounwind {
29   call void @foo(i64 1)
30   call void @foo(i64 1)
31   ret void
32 }
33