[PATCH 1/2] add testcase for CSE of floating-point compares

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

 



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

diff --git a/validation/optim/cse-fcmp.c b/validation/optim/cse-fcmp.c
new file mode 100644
index 000000000..9e6872302
--- /dev/null
+++ b/validation/optim/cse-fcmp.c
@@ -0,0 +1,20 @@
+extern void fun(void);
+
+int foo(double a, double b)
+{
+	if (a < b)
+		fun();
+	if (a < b)
+		return 1;
+
+	return 0;
+}
+
+/*
+ * check-name: cse-fcmp
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-pattern(1): fcmp
+ */
-- 
2.15.0

--
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