[PATCH 1/2] cse: add testcase for missed opportunity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In the test the offset is the same for dst & src and thus
it's calculation should be CSEed away but it is not (yet).

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 validation/optim/cse-cmp-next.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 validation/optim/cse-cmp-next.c

diff --git a/validation/optim/cse-cmp-next.c b/validation/optim/cse-cmp-next.c
new file mode 100644
index 000000000..e7cf16235
--- /dev/null
+++ b/validation/optim/cse-cmp-next.c
@@ -0,0 +1,16 @@
+void foo(int p, int i, int f, int *ref, int *dst, int *src)
+{
+	if (p)
+		f = ref[i];
+	if (f)
+		dst[i] = src[i];
+}
+
+/*
+ * check-name: cse-cmp-next
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-pattern(1,2): mul\\.
+ */
-- 
2.17.1

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux