[llvm] r222720 - Add an interesting test that we already get right. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Mon Nov 24 19:47:57 PST 2014
Author: rafael
Date: Mon Nov 24 21:47:57 2014
New Revision: 222720
URL: http://llvm.org/viewvc/llvm-project?rev=222720&view=rev
Log:
Add an interesting test that we already get right. NFC.
Added:
llvm/trunk/test/Linker/Inputs/type-unique-unrelated2.ll
llvm/trunk/test/Linker/Inputs/type-unique-unrelated3.ll
llvm/trunk/test/Linker/type-unique-unrelated.ll
Added: llvm/trunk/test/Linker/Inputs/type-unique-unrelated2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/Inputs/type-unique-unrelated2.ll?rev=222720&view=auto
==============================================================================
--- llvm/trunk/test/Linker/Inputs/type-unique-unrelated2.ll (added)
+++ llvm/trunk/test/Linker/Inputs/type-unique-unrelated2.ll Mon Nov 24 21:47:57 2014
@@ -0,0 +1,7 @@
+%t = type { i8* }
+declare %t @g()
+
+define %t @g2() {
+ %x = call %t @g()
+ ret %t %x
+}
Added: llvm/trunk/test/Linker/Inputs/type-unique-unrelated3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/Inputs/type-unique-unrelated3.ll?rev=222720&view=auto
==============================================================================
--- llvm/trunk/test/Linker/Inputs/type-unique-unrelated3.ll (added)
+++ llvm/trunk/test/Linker/Inputs/type-unique-unrelated3.ll Mon Nov 24 21:47:57 2014
@@ -0,0 +1,7 @@
+%t = type { i8* }
+declare %t @f()
+
+define %t @g() {
+ %x = call %t @f()
+ ret %t %x
+}
Added: llvm/trunk/test/Linker/type-unique-unrelated.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-unrelated.ll?rev=222720&view=auto
==============================================================================
--- llvm/trunk/test/Linker/type-unique-unrelated.ll (added)
+++ llvm/trunk/test/Linker/type-unique-unrelated.ll Mon Nov 24 21:47:57 2014
@@ -0,0 +1,31 @@
+; RUN: llvm-link -S %s %p/Inputs/type-unique-unrelated2.ll %p/Inputs/type-unique-unrelated3.ll | FileCheck %s
+
+; CHECK: %t = type { i8* }
+
+; CHECK: define %t @f2() {
+; CHECK-NEXT: %x = call %t @f2()
+; CHECK-NEXT: ret %t %x
+; CHECK-NEXT: }
+
+; CHECK: define %t @g2() {
+; CHECK-NEXT: %x = call %t @g()
+; CHECK-NEXT: ret %t %x
+; CHECK-NEXT: }
+
+; CHECK: define %t @g() {
+; CHECK-NEXT: %x = call %t @f()
+; CHECK-NEXT: ret %t %x
+; CHECK-NEXT: }
+
+; The idea of this test is that the %t in this file and the one in
+; type-unique-unrelated2.ll look unrelated until type-unique-unrelated3.ll
+; is merged in.
+
+%t = type { i8* }
+declare %t @f()
+
+define %t @f2() {
+ %x = call %t @f2()
+ ret %t %x
+}
+
More information about the llvm-commits
mailing list