Add a few memory refinement unit tests
ADD
tests/alive-tv/refinement/global-fail.src.ll
+@x = global i32 0
+
+define void @f() {
+ store i32 10, i32* @x
+ ret void
+}
+
+; ERROR: Mismatch in memory

ADD
tests/alive-tv/refinement/global-fail.tgt.ll
+@x = global i32 0
+
+define void @f() {
+ store i32 20, i32* @x
+ ret void
+}

ADD
tests/alive-tv/refinement/global.src.ll
+@x = global i32 0
+@y = global i32 0
+@z = global i32 0
+@w = global i32 0
+
+define void @f() {
+ store i32 10, i32* @x
+ store i32 20, i32* @y
+ store i32 30, i32* @z
+ store i32 40, i32* @w
+ ret void
+}

ADD
tests/alive-tv/refinement/global.tgt.ll
+@x = global i32 0
+@y = global i32 0
+@z = global i32 0
+@w = global i32 0
+
+define void @f() {
+ store i32 40, i32* @w
+ store i32 30, i32* @z
+ store i32 20, i32* @y
+ store i32 10, i32* @x
+ ret void
+}

ADD
tests/alive-tv/refinement/local.src.ll
+define void @f() {
+ %p = alloca i32
+ store i32 0, i32* %p
+ ret void
+}

ADD
tests/alive-tv/refinement/local.tgt.ll
+define void @f() {
+ %p = alloca i32
+ store i32 1, i32* %p
+ ret void
+}

ADD
tests/alive-tv/refinement/nonlocal-fail.src.ll
+define void @f(i32* %p, i32* %q) {
+ store i32 10, i32* %p
+ store i32 20, i32* %q
+ ret void
+}
+
+; ERROR: Mismatch in memory

ADD
tests/alive-tv/refinement/nonlocal-fail.tgt.ll
+define void @f(i32* %p, i32* %q) {
+ store i32 20, i32* %q
+ store i32 10, i32* %p
+ ret void
+}

Add a few memory refinement unit tests (#185)