Fix PR9464 by correcting some math that just happened to be right in most cases
[oota-llvm.git] / test / Transforms / ScalarRepl / vector_promote.ll
index 8e143612ebdf10697dabccaa6306f9c69f9188b7..67bbf71b362d7ca28f03e9d93a693e4b5f6b944c 100644 (file)
@@ -171,3 +171,19 @@ define void @test11(<2 x i64> %x) {
 ; CHECK: @test11
 ; CHECK-NOT: alloca
 }
+
+define void @test12() {
+entry:
+  %a = alloca <64 x i8>, align 64
+  store <64 x i8> undef, <64 x i8>* %a, align 64
+  %p = bitcast <64 x i8>* %a to <16 x i8>*
+  %0 = load <16 x i8>* %p, align 64
+  store <16 x i8> undef, <16 x i8>* %p, align 64
+  %q = bitcast <16 x i8>* %p to <64 x i8>*
+  %1 = load <64 x i8>* %q, align 64
+  ret void
+; CHECK: @test12
+; CHECK-NOT: alloca
+; CHECK: extractelement <4 x i128>
+; CHECK: insertelement <4 x i128>
+}