It's not necessary to do rounding for alloca operations when the requested
alignment is equal to the stack alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40004 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Transforms/Mem2Reg/UndefValuesMerge.ll b/test/Transforms/Mem2Reg/UndefValuesMerge.ll
new file mode 100644
index 0000000..dc2f011
--- /dev/null
+++ b/test/Transforms/Mem2Reg/UndefValuesMerge.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep phi
+
+implementation
+
+int %testfunc(bool %C, int %i, sbyte %j) {
+ %I = alloca int
+ br bool %C, label %T, label %Cont
+T:
+ store int %i, int* %I
+ br label %Cont
+Cont:
+ %Y = load int* %I ;; %Y = phi %i, undef -> %Y = %i
+ ret int %Y
+}