summaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-04-12 15:40:25 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-04-12 15:40:25 +0000
commitd1862af3148ad9a6e7c0252b597018b6a3d479b8 (patch)
tree160d31aa4709b4510555ce832f1dee41643de04a /test/CodeGen
parent183402a788cd769e039f71b21bef621fbcafd346 (diff)
downloadexternal_llvm-d1862af3148ad9a6e7c0252b597018b6a3d479b8.zip
external_llvm-d1862af3148ad9a6e7c0252b597018b6a3d479b8.tar.gz
external_llvm-d1862af3148ad9a6e7c0252b597018b6a3d479b8.tar.bz2
Add same value coalescing testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/2004-04-09-SameValueCoalescing.llx19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2004-04-09-SameValueCoalescing.llx b/test/CodeGen/X86/2004-04-09-SameValueCoalescing.llx
new file mode 100644
index 0000000..70ebc23
--- /dev/null
+++ b/test/CodeGen/X86/2004-04-09-SameValueCoalescing.llx
@@ -0,0 +1,19 @@
+; Linear scan does not currently coalesce any two variables that have
+; overlapping live intervals. When two overlapping intervals have the same
+; value, they can be joined though.
+;
+; RUN: llvm-as < %s | llc -march=x86 -regalloc=linearscan | not grep 'mov %[A-Z]\{2,3\}, %[A-Z]\{2,3\}'
+
+int %main() {
+ %ptr = alloca uint
+ br label %Loop
+Loop:
+ %I = phi int [0, %0], [%i2, %Loop]
+ %i2 = add int %I, 1
+ %i3 = cast int %i2 to uint
+ store uint %i3, uint* %ptr
+ %C = seteq int %i2, 10
+ br bool %C, label %Out, label %Loop
+Out:
+ ret int 0
+}