aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2010-03-19 01:19:52 +0000
committerMon P Wang <wangmp@apple.com>2010-03-19 01:19:52 +0000
commitc1e5d491a0bd99a71c87f6a69bafbecd2f948c82 (patch)
treef836e8e0a8a20034b486b7b2fff9dda3c6921ae1 /test
parentc28c7689fc555b8507d2b0b128f4e6b05dcf2027 (diff)
downloadexternal_llvm-c1e5d491a0bd99a71c87f6a69bafbecd2f948c82.zip
external_llvm-c1e5d491a0bd99a71c87f6a69bafbecd2f948c82.tar.gz
external_llvm-c1e5d491a0bd99a71c87f6a69bafbecd2f948c82.tar.bz2
Fixed a widening bug where we were not using the correct size for the load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/widen_load-2.ll26
1 files changed, 25 insertions, 1 deletions
diff --git a/test/CodeGen/X86/widen_load-2.ll b/test/CodeGen/X86/widen_load-2.ll
index 11383fa..58b557a 100644
--- a/test/CodeGen/X86/widen_load-2.ll
+++ b/test/CodeGen/X86/widen_load-2.ll
@@ -152,4 +152,28 @@ define void @add31i8(%i8vec31* nocapture sret %ret, %i8vec31* %ap, %i8vec31* %bp
%x = add %i8vec31 %a, %b
store %i8vec31 %x, %i8vec31* %ret, align 16
ret void
-} \ No newline at end of file
+}
+
+
+%i8vec3pack = type { <3 x i8>, i8 }
+define %i8vec3pack @rot() nounwind {
+; CHECK: shrb
+entry:
+ %X = alloca %i8vec3pack, align 4
+ %rot = alloca %i8vec3pack, align 4
+ %result = alloca %i8vec3pack, align 4
+ %storetmp = bitcast %i8vec3pack* %X to <3 x i8>*
+ store <3 x i8> <i8 -98, i8 -98, i8 -98>, <3 x i8>* %storetmp
+ %storetmp1 = bitcast %i8vec3pack* %rot to <3 x i8>*
+ store <3 x i8> <i8 1, i8 1, i8 1>, <3 x i8>* %storetmp1
+ %tmp = load %i8vec3pack* %X
+ %extractVec = extractvalue %i8vec3pack %tmp, 0
+ %tmp2 = load %i8vec3pack* %rot
+ %extractVec3 = extractvalue %i8vec3pack %tmp2, 0
+ %shr = lshr <3 x i8> %extractVec, %extractVec3
+ %storetmp4 = bitcast %i8vec3pack* %result to <3 x i8>*
+ store <3 x i8> %shr, <3 x i8>* %storetmp4
+ %tmp5 = load %i8vec3pack* %result
+ ret %i8vec3pack %tmp5
+}
+