[SROA] Fix PR18615 with some long overdue simplifications to the bounds
[oota-llvm.git] / test / Transforms / SROA / basictest.ll
index b8dbab1bece34d30c72ff8b42fe852509801cd3a..983c038316b9df47c068f832f9f182b638a86bf0 100644 (file)
@@ -1393,3 +1393,15 @@ entry:
   call void @llvm.memcpy.p0i8.p0i8.i32(i8* %cast1, i8* %cast0, i32 4, i32 1, i1 false)
   ret void
 }
+
+define void @PR18615() {
+; CHECK-LABEL: @PR18615(
+; CHECK-NOT: alloca
+; CHECK: ret void
+entry:
+  %f = alloca i8
+  %gep = getelementptr i8* %f, i64 -1
+  call void @llvm.memcpy.p0i8.p0i8.i32(i8* undef, i8* %gep, i32 1, i32 1, i1 false)
+  ret void
+}
+