aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/reassoc-op-op1.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-01 22:52:36 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-20 22:34:43 +0200
commit9c808cbc7c57fe380c0b511f04c18630fea0b24d (patch)
tree17508aabeaad883acc7d4b1064c7163811902960 /validation/optim/reassoc-op-op1.c
parent5192dc1ff23dae8644480a89ada8ff420ebb674a (diff)
downloadsparse-dev-9c808cbc7c57fe380c0b511f04c18630fea0b24d.tar.gz
add testcases about OP_ADD & OP_SUB simplifications
Add some testcases about basic simplifications of additions and subtractions. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim/reassoc-op-op1.c')
-rw-r--r--validation/optim/reassoc-op-op1.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/optim/reassoc-op-op1.c b/validation/optim/reassoc-op-op1.c
new file mode 100644
index 00000000..aa7092ff
--- /dev/null
+++ b/validation/optim/reassoc-op-op1.c
@@ -0,0 +1,15 @@
+int foo(int x, int *ptr)
+{
+ int t = x + 1;
+ *ptr = t;
+ return t + -1;
+}
+
+/*
+ * check-name: reassoc-op-op1
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-pattern(1): add\\.
+ */