diff --git a/cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir.expected b/cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir.expected index 5c12a3d2173..180296f25e9 100644 --- a/cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir.expected +++ b/cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir.expected @@ -29,6 +29,7 @@ ssa.cpp: # 15| r15_6(int) = Add : r15_4, r15_5 # 15| m15_7(int) = Store : &:r15_3, r15_6 # 15| m15_8(unknown) = Chi : total:m13_9, partial:m15_7 +# 15| r15_9(int) = CopyValue : r15_4 #-----| Goto -> Block 3 # 18| Block 2 @@ -40,6 +41,7 @@ ssa.cpp: # 18| r18_6(int) = Add : r18_4, r18_5 # 18| m18_7(int) = Store : &:r18_3, r18_6 # 18| m18_8(unknown) = Chi : total:m13_9, partial:m18_7 +# 18| r18_9(int) = CopyValue : r18_4 #-----| Goto -> Block 3 # 21| Block 3 @@ -61,6 +63,7 @@ ssa.cpp: # 22| r22_6(int) = Add : r22_4, r22_5 # 22| m22_7(int) = Store : &:r22_3, r22_6 # 22| m22_8(unknown) = Chi : total:m21_3, partial:m22_7 +# 22| r22_9(int) = CopyValue : r22_4 #-----| Goto -> Block 6 # 25| Block 5 @@ -72,6 +75,7 @@ ssa.cpp: # 25| r25_6(int) = Add : r25_4, r25_5 # 25| m25_7(int) = Store : &:r25_3, r25_6 # 25| m25_8(unknown) = Chi : total:m21_3, partial:m25_7 +# 25| r25_9(int) = CopyValue : r25_4 #-----| Goto -> Block 6 # 28| Block 6 @@ -193,6 +197,7 @@ ssa.cpp: # 62| r62_3(int) = Constant[1] : # 62| r62_4(int) = Add : r62_2, r62_3 # 62| m62_5(int) = Store : &:r62_1, r62_4 +# 62| r62_6(int) = CopyValue : r62_2 # 63| r63_1(bool) = Constant[0] : # 63| v63_2(void) = ConditionalBranch : r63_1 #-----| False -> Block 1 diff --git a/cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir_unsound.expected b/cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir_unsound.expected index 2a012447a68..5ccc7f3b6d7 100644 --- a/cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir_unsound.expected @@ -29,6 +29,7 @@ ssa.cpp: # 15| r15_6(int) = Add : r15_4, r15_5 # 15| m15_7(int) = Store : &:r15_3, r15_6 # 15| m15_8(unknown) = Chi : total:m13_9, partial:m15_7 +# 15| r15_9(int) = CopyValue : r15_4 #-----| Goto -> Block 3 # 18| Block 2 @@ -40,6 +41,7 @@ ssa.cpp: # 18| r18_6(int) = Add : r18_4, r18_5 # 18| m18_7(int) = Store : &:r18_3, r18_6 # 18| m18_8(unknown) = Chi : total:m13_9, partial:m18_7 +# 18| r18_9(int) = CopyValue : r18_4 #-----| Goto -> Block 3 # 21| Block 3 @@ -61,6 +63,7 @@ ssa.cpp: # 22| r22_6(int) = Add : r22_4, r22_5 # 22| m22_7(int) = Store : &:r22_3, r22_6 # 22| m22_8(unknown) = Chi : total:m21_3, partial:m22_7 +# 22| r22_9(int) = CopyValue : r22_4 #-----| Goto -> Block 6 # 25| Block 5 @@ -72,6 +75,7 @@ ssa.cpp: # 25| r25_6(int) = Add : r25_4, r25_5 # 25| m25_7(int) = Store : &:r25_3, r25_6 # 25| m25_8(unknown) = Chi : total:m21_3, partial:m25_7 +# 25| r25_9(int) = CopyValue : r25_4 #-----| Goto -> Block 6 # 28| Block 6 @@ -193,6 +197,7 @@ ssa.cpp: # 62| r62_3(int) = Constant[1] : # 62| r62_4(int) = Add : r62_2, r62_3 # 62| m62_5(int) = Store : &:r62_1, r62_4 +# 62| r62_6(int) = CopyValue : r62_2 # 63| r63_1(bool) = Constant[0] : # 63| v63_2(void) = ConditionalBranch : r63_1 #-----| False -> Block 1 diff --git a/cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir.expected b/cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir.expected index 4319cb86587..ba8a275bc00 100644 --- a/cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir.expected +++ b/cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir.expected @@ -27,6 +27,7 @@ ssa.cpp: # 15| r15_5(int) = Constant[1] : # 15| r15_6(int) = Add : r15_4, r15_5 # 15| mu15_7(int) = Store : &:r15_3, r15_6 +# 15| r15_8(int) = CopyValue : r15_4 #-----| Goto -> Block 3 # 18| Block 2 @@ -37,6 +38,7 @@ ssa.cpp: # 18| r18_5(int) = Constant[1] : # 18| r18_6(int) = Add : r18_4, r18_5 # 18| mu18_7(int) = Store : &:r18_3, r18_6 +# 18| r18_8(int) = CopyValue : r18_4 #-----| Goto -> Block 3 # 21| Block 3 @@ -54,6 +56,7 @@ ssa.cpp: # 22| r22_5(int) = Constant[1] : # 22| r22_6(int) = Add : r22_4, r22_5 # 22| mu22_7(int) = Store : &:r22_3, r22_6 +# 22| r22_8(int) = CopyValue : r22_4 #-----| Goto -> Block 6 # 25| Block 5 @@ -64,6 +67,7 @@ ssa.cpp: # 25| r25_5(int) = Constant[1] : # 25| r25_6(int) = Add : r25_4, r25_5 # 25| mu25_7(int) = Store : &:r25_3, r25_6 +# 25| r25_8(int) = CopyValue : r25_4 #-----| Goto -> Block 6 # 28| Block 6 @@ -188,6 +192,7 @@ ssa.cpp: # 62| r62_3(int) = Constant[1] : # 62| r62_4(int) = Add : r62_2, r62_3 # 62| m62_5(int) = Store : &:r62_1, r62_4 +# 62| r62_6(int) = CopyValue : r62_2 # 63| r63_1(bool) = Constant[0] : # 63| v63_2(void) = ConditionalBranch : r63_1 #-----| False -> Block 1 diff --git a/cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir_unsound.expected b/cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir_unsound.expected index 4319cb86587..ba8a275bc00 100644 --- a/cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir_unsound.expected @@ -27,6 +27,7 @@ ssa.cpp: # 15| r15_5(int) = Constant[1] : # 15| r15_6(int) = Add : r15_4, r15_5 # 15| mu15_7(int) = Store : &:r15_3, r15_6 +# 15| r15_8(int) = CopyValue : r15_4 #-----| Goto -> Block 3 # 18| Block 2 @@ -37,6 +38,7 @@ ssa.cpp: # 18| r18_5(int) = Constant[1] : # 18| r18_6(int) = Add : r18_4, r18_5 # 18| mu18_7(int) = Store : &:r18_3, r18_6 +# 18| r18_8(int) = CopyValue : r18_4 #-----| Goto -> Block 3 # 21| Block 3 @@ -54,6 +56,7 @@ ssa.cpp: # 22| r22_5(int) = Constant[1] : # 22| r22_6(int) = Add : r22_4, r22_5 # 22| mu22_7(int) = Store : &:r22_3, r22_6 +# 22| r22_8(int) = CopyValue : r22_4 #-----| Goto -> Block 6 # 25| Block 5 @@ -64,6 +67,7 @@ ssa.cpp: # 25| r25_5(int) = Constant[1] : # 25| r25_6(int) = Add : r25_4, r25_5 # 25| mu25_7(int) = Store : &:r25_3, r25_6 +# 25| r25_8(int) = CopyValue : r25_4 #-----| Goto -> Block 6 # 28| Block 6 @@ -188,6 +192,7 @@ ssa.cpp: # 62| r62_3(int) = Constant[1] : # 62| r62_4(int) = Add : r62_2, r62_3 # 62| m62_5(int) = Store : &:r62_1, r62_4 +# 62| r62_6(int) = CopyValue : r62_2 # 63| r63_1(bool) = Constant[0] : # 63| v63_2(void) = ConditionalBranch : r63_1 #-----| False -> Block 1 diff --git a/cpp/ql/test/library-tests/rangeanalysis/signanalysis/SignAnalysis.expected b/cpp/ql/test/library-tests/rangeanalysis/signanalysis/SignAnalysis.expected index 961e4b3a201..bdea65b3fe6 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/signanalysis/SignAnalysis.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/signanalysis/SignAnalysis.expected @@ -55,6 +55,7 @@ | test.c:24:5:24:9 | Load: count | positive | | test.c:24:5:24:11 | Add: ... ++ | positive strictlyPositive | | test.c:24:5:24:11 | Constant: ... ++ | positive strictlyPositive | +| test.c:24:5:24:11 | CopyValue: ... ++ | positive | | test.c:24:5:24:11 | Store: ... ++ | positive strictlyPositive | | test.c:25:5:25:22 | Store: ... = ... | positive | | test.c:25:13:25:17 | Load: count | positive strictlyPositive | @@ -85,6 +86,7 @@ | test.c:42:22:42:22 | Load: i | positive | | test.c:42:22:42:24 | Add: ... ++ | positive strictlyPositive | | test.c:42:22:42:24 | Constant: ... ++ | positive strictlyPositive | +| test.c:42:22:42:24 | CopyValue: ... ++ | positive | | test.c:42:22:42:24 | Store: ... ++ | positive strictlyPositive | | test.c:43:5:43:9 | Load: total | positive | | test.c:43:5:43:14 | Add: ... += ... | positive | @@ -457,6 +459,7 @@ | test.c:343:5:343:5 | Load: i | positive | | test.c:343:5:343:7 | Add: ... ++ | positive strictlyPositive | | test.c:343:5:343:7 | Constant: ... ++ | positive strictlyPositive | +| test.c:343:5:343:7 | CopyValue: ... ++ | positive | | test.c:343:5:343:7 | Store: ... ++ | positive strictlyPositive | | test.c:345:3:345:7 | Store: ... = ... | positive strictlyPositive | | test.c:345:7:345:7 | Load: i | positive strictlyPositive | @@ -654,6 +657,7 @@ | test.c:398:9:398:9 | Load: y | positive strictlyPositive | | test.c:398:9:398:11 | Add: ... ++ | positive strictlyPositive | | test.c:398:9:398:11 | Constant: ... ++ | positive strictlyPositive | +| test.c:398:9:398:11 | CopyValue: ... ++ | positive strictlyPositive | | test.c:398:9:398:11 | Store: ... ++ | positive strictlyPositive | | test.c:398:9:398:22 | CopyValue: ... , ... | positive strictlyPositive | | test.c:398:14:398:14 | Load: y | positive strictlyPositive | diff --git a/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected b/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected index cd44eb8572b..c25b70d9c1d 100644 --- a/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected +++ b/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected @@ -54,6 +54,7 @@ | test.cpp:56:13:56:16 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only | | test.cpp:56:13:56:16 | * ... | test.cpp:56:31:56:34 | * ... | AST only | | test.cpp:56:13:56:16 | * ... | test.cpp:59:9:59:12 | * ... | AST only | +| test.cpp:56:14:56:16 | ptr | test.cpp:56:47:56:51 | ... ++ | IR only | | test.cpp:56:21:56:24 | (int)... | test.cpp:53:10:53:13 | (int)... | AST only | | test.cpp:56:21:56:24 | (int)... | test.cpp:56:21:56:24 | (int)... | AST only | | test.cpp:56:30:56:43 | (...) | test.cpp:56:30:56:43 | (...) | AST only | @@ -62,25 +63,34 @@ | test.cpp:56:31:56:34 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only | | test.cpp:56:31:56:34 | * ... | test.cpp:56:13:56:16 | * ... | AST only | | test.cpp:56:31:56:34 | * ... | test.cpp:59:9:59:12 | * ... | AST only | +| test.cpp:56:32:56:34 | ptr | test.cpp:56:47:56:51 | ... ++ | IR only | | test.cpp:56:39:56:42 | (int)... | test.cpp:44:9:44:9 | 0 | AST only | | test.cpp:56:39:56:42 | (int)... | test.cpp:51:25:51:25 | 0 | AST only | | test.cpp:56:39:56:42 | (int)... | test.cpp:53:18:53:21 | (int)... | AST only | | test.cpp:56:39:56:42 | (int)... | test.cpp:56:39:56:42 | (int)... | AST only | | test.cpp:56:39:56:42 | (int)... | test.cpp:59:17:59:20 | (int)... | AST only | | test.cpp:56:39:56:42 | (int)... | test.cpp:88:12:88:12 | 0 | AST only | -| test.cpp:56:47:56:51 | ... ++ | test.cpp:56:47:56:51 | ... ++ | AST only | +| test.cpp:56:47:56:49 | ptr | test.cpp:56:47:56:51 | ... ++ | IR only | +| test.cpp:56:47:56:51 | ... ++ | test.cpp:56:14:56:16 | ptr | IR only | +| test.cpp:56:47:56:51 | ... ++ | test.cpp:56:32:56:34 | ptr | IR only | +| test.cpp:56:47:56:51 | ... ++ | test.cpp:56:47:56:49 | ptr | IR only | +| test.cpp:56:47:56:51 | ... ++ | test.cpp:59:10:59:12 | ptr | IR only | | test.cpp:59:9:59:12 | (int)... | test.cpp:56:13:56:16 | (int)... | AST only | | test.cpp:59:9:59:12 | (int)... | test.cpp:56:31:56:34 | (int)... | AST only | | test.cpp:59:9:59:12 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only | | test.cpp:59:9:59:12 | * ... | test.cpp:56:13:56:16 | * ... | AST only | | test.cpp:59:9:59:12 | * ... | test.cpp:56:31:56:34 | * ... | AST only | +| test.cpp:59:10:59:12 | ptr | test.cpp:56:47:56:51 | ... ++ | IR only | | test.cpp:59:17:59:20 | (int)... | test.cpp:44:9:44:9 | 0 | AST only | | test.cpp:59:17:59:20 | (int)... | test.cpp:51:25:51:25 | 0 | AST only | | test.cpp:59:17:59:20 | (int)... | test.cpp:53:18:53:21 | (int)... | AST only | | test.cpp:59:17:59:20 | (int)... | test.cpp:56:39:56:42 | (int)... | AST only | | test.cpp:59:17:59:20 | (int)... | test.cpp:59:17:59:20 | (int)... | AST only | | test.cpp:59:17:59:20 | (int)... | test.cpp:88:12:88:12 | 0 | AST only | -| test.cpp:62:5:62:12 | ... ++ | test.cpp:62:5:62:12 | ... ++ | AST only | +| test.cpp:62:5:62:10 | result | test.cpp:62:5:62:12 | ... ++ | IR only | +| test.cpp:62:5:62:12 | ... ++ | test.cpp:62:5:62:10 | result | IR only | +| test.cpp:62:5:62:12 | ... ++ | test.cpp:65:10:65:15 | result | IR only | +| test.cpp:65:10:65:15 | result | test.cpp:62:5:62:12 | ... ++ | IR only | | test.cpp:77:20:77:28 | call to getAValue | test.cpp:79:7:79:7 | v | IR only | | test.cpp:77:20:77:30 | (signed short)... | test.cpp:77:20:77:30 | (signed short)... | AST only | | test.cpp:77:20:77:30 | (signed short)... | test.cpp:79:7:79:7 | v | AST only | diff --git a/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected b/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected index 10366d1f6bb..f0ab6dfac76 100644 --- a/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected +++ b/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected @@ -404,7 +404,7 @@ test.cpp: # 53| Block 1 # 53| m53_1(unsigned int) = Phi : from 0:m51_3, from 8:m62_5 -# 53| valnum = m53_1, m65_4, r62_2, r65_3 +# 53| valnum = m53_1, m65_4, r62_2, r62_6, r65_3 # 53| r53_2(glval) = VariableAddress[str] : # 53| valnum = r49_6, r53_2, r56_6 # 53| r53_3(char *) = Load : &:r53_2, m49_7 @@ -434,11 +434,11 @@ test.cpp: # 56| Block 3 # 56| m56_1(decltype(nullptr)) = Phi : from 2:m55_4, from 5:m56_23 -# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2 +# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2 # 56| r56_2(glval) = VariableAddress[ptr] : # 56| valnum = r50_1, r55_3, r56_12, r56_19, r56_2, r59_1 # 56| r56_3(char *) = Load : &:r56_2, m56_1 -# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2 +# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2 # 56| r56_4(char) = Load : &:r56_3, ~m49_4 # 56| valnum = unique # 56| r56_5(int) = Convert : r56_4 @@ -461,7 +461,7 @@ test.cpp: # 56| r56_12(glval) = VariableAddress[ptr] : # 56| valnum = r50_1, r55_3, r56_12, r56_19, r56_2, r59_1 # 56| r56_13(char *) = Load : &:r56_12, m56_1 -# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2 +# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2 # 56| r56_14(char) = Load : &:r56_13, ~m49_4 # 56| valnum = unique # 56| r56_15(int) = Convert : r56_14 @@ -478,20 +478,22 @@ test.cpp: # 56| r56_19(glval) = VariableAddress[ptr] : # 56| valnum = r50_1, r55_3, r56_12, r56_19, r56_2, r59_1 # 56| r56_20(char *) = Load : &:r56_19, m56_1 -# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2 +# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2 # 56| r56_21(int) = Constant[1] : # 56| valnum = unique # 56| r56_22(char *) = PointerAdd[1] : r56_20, r56_21 # 56| valnum = m56_23, r56_22 # 56| m56_23(char *) = Store : &:r56_19, r56_22 # 56| valnum = m56_23, r56_22 +# 56| r56_24(char *) = CopyValue : r56_20 +# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2 #-----| Goto (back edge) -> Block 3 # 59| Block 6 # 59| r59_1(glval) = VariableAddress[ptr] : # 59| valnum = r50_1, r55_3, r56_12, r56_19, r56_2, r59_1 # 59| r59_2(char *) = Load : &:r59_1, m56_1 -# 59| valnum = m56_1, r56_13, r56_20, r56_3, r59_2 +# 59| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2 # 59| r59_3(char) = Load : &:r59_2, ~m49_4 # 59| valnum = unique # 59| r59_4(int) = Convert : r59_3 @@ -512,13 +514,15 @@ test.cpp: # 62| r62_1(glval) = VariableAddress[result] : # 62| valnum = r51_1, r62_1, r65_2 # 62| r62_2(unsigned int) = Load : &:r62_1, m53_1 -# 62| valnum = m53_1, m65_4, r62_2, r65_3 +# 62| valnum = m53_1, m65_4, r62_2, r62_6, r65_3 # 62| r62_3(unsigned int) = Constant[1] : # 62| valnum = unique # 62| r62_4(unsigned int) = Add : r62_2, r62_3 # 62| valnum = m62_5, r62_4 # 62| m62_5(unsigned int) = Store : &:r62_1, r62_4 # 62| valnum = m62_5, r62_4 +# 62| r62_6(unsigned int) = CopyValue : r62_2 +# 62| valnum = m53_1, m65_4, r62_2, r62_6, r65_3 #-----| Goto (back edge) -> Block 1 # 63| Block 9 @@ -528,9 +532,9 @@ test.cpp: # 65| r65_2(glval) = VariableAddress[result] : # 65| valnum = r51_1, r62_1, r65_2 # 65| r65_3(unsigned int) = Load : &:r65_2, m53_1 -# 65| valnum = m53_1, m65_4, r62_2, r65_3 +# 65| valnum = m53_1, m65_4, r62_2, r62_6, r65_3 # 65| m65_4(unsigned int) = Store : &:r65_1, r65_3 -# 65| valnum = m53_1, m65_4, r62_2, r65_3 +# 65| valnum = m53_1, m65_4, r62_2, r62_6, r65_3 # 49| v49_14(void) = ReturnIndirection : &:r49_8, m49_9 # 49| v49_15(void) = ReturnIndirection : &:r49_12, m49_13 # 49| r49_16(glval) = VariableAddress[#return] :