[llvm-commits] [llvm] r172054 - in /llvm/trunk: lib/Linker/LinkModules.cpp test/Linker/testlink1.ll test/Linker/testlink2.ll
Joey Gouly
joey.gouly at arm.com
Thu Jan 10 02:49:36 PST 2013
Author: joey
Date: Thu Jan 10 04:49:36 2013
New Revision: 172054
URL: http://llvm.org/viewvc/llvm-project?rev=172054&view=rev
Log:
Fix a copy/paste error in the IR Linker, casting an ArrayType instead of a VectorType.
Modified:
llvm/trunk/lib/Linker/LinkModules.cpp
llvm/trunk/test/Linker/testlink1.ll
llvm/trunk/test/Linker/testlink2.ll
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=172054&r1=172053&r2=172054&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Thu Jan 10 04:49:36 2013
@@ -180,7 +180,7 @@
if (DATy->getNumElements() != cast<ArrayType>(SrcTy)->getNumElements())
return false;
} else if (VectorType *DVTy = dyn_cast<VectorType>(DstTy)) {
- if (DVTy->getNumElements() != cast<ArrayType>(SrcTy)->getNumElements())
+ if (DVTy->getNumElements() != cast<VectorType>(SrcTy)->getNumElements())
return false;
}
Modified: llvm/trunk/test/Linker/testlink1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/testlink1.ll?rev=172054&r1=172053&r2=172054&view=diff
==============================================================================
--- llvm/trunk/test/Linker/testlink1.ll (original)
+++ llvm/trunk/test/Linker/testlink1.ll Thu Jan 10 04:49:36 2013
@@ -13,6 +13,10 @@
; The uses of intlist in the other file should be remapped.
; CHECK-NOT: {{%intlist.[0-9]}}
+; CHECK: %VecSize = type { <5 x i32> }
+; CHECK: %VecSize.{{[0-9]}} = type { <10 x i32> }
+%VecSize = type { <5 x i32> }
+
%Struct1 = type opaque
@S1GV = external global %Struct1*
@@ -93,3 +97,5 @@
define void @testIntern() {
ret void
}
+
+declare void @VecSizeCrash(%VecSize)
Modified: llvm/trunk/test/Linker/testlink2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/testlink2.ll?rev=172054&r1=172053&r2=172054&view=diff
==============================================================================
--- llvm/trunk/test/Linker/testlink2.ll (original)
+++ llvm/trunk/test/Linker/testlink2.ll Thu Jan 10 04:49:36 2013
@@ -8,6 +8,8 @@
%Ty1 = type { %Ty2* }
%Ty2 = type opaque
+%VecSize = type { <10 x i32> }
+
@GVTy1 = global %Ty1* null
@GVTy2 = external global %Ty2*
@@ -53,3 +55,4 @@
ret void
}
+declare void @VecSizeCrash1(%VecSize)
More information about the llvm-commits
mailing list