aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-22 17:25:39 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-29 23:19:34 +0200
commite46af66b3c2b1cb32c6394ac5e6c7ce632d905a9 (patch)
tree7ffdfd0cb8aa07240928a4fb5a6750e3df2b8295
parent1ed0dfb473629202784f9701991671a6f9c6ff6e (diff)
downloadsparse-dev-e46af66b3c2b1cb32c6394ac5e6c7ce632d905a9.tar.gz
cast: reorganize testcases for cast optimization
validation/linear/* should not contain testcases that are optimization dependent and validation/*.c should not contain tests using 'test-linearize', only those using 'sparse'. Move some cast-related testcases accordingly. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--validation/cast-kinds-check.c22
-rw-r--r--validation/cast-weirds.c35
-rw-r--r--validation/optim/cast-kinds.c (renamed from validation/linear/cast-kinds.c)0
3 files changed, 12 insertions, 45 deletions
diff --git a/validation/cast-kinds-check.c b/validation/cast-kinds-check.c
index 0fe705f5..b50ddd24 100644
--- a/validation/cast-kinds-check.c
+++ b/validation/cast-kinds-check.c
@@ -1,19 +1,19 @@
-#include "linear/cast-kinds.c"
+#include "optim/cast-kinds.c"
/*
* check-name: cast-kinds check
* check-command: sparse -m64 -v -Wno-pointer-to-int-cast $file
*
* check-error-start
-linear/cast-kinds.c:5:45: warning: cast drops bits
-linear/cast-kinds.c:6:47: warning: cast drops bits
-linear/cast-kinds.c:7:46: warning: cast drops bits
-linear/cast-kinds.c:8:45: warning: cast drops bits
-linear/cast-kinds.c:12:48: warning: cast drops bits
-linear/cast-kinds.c:13:50: warning: cast drops bits
-linear/cast-kinds.c:14:49: warning: cast drops bits
-linear/cast-kinds.c:15:48: warning: cast drops bits
-linear/cast-kinds.c:37:42: warning: non size-preserving integer to pointer cast
-linear/cast-kinds.c:38:44: warning: non size-preserving integer to pointer cast
+optim/cast-kinds.c:5:45: warning: cast drops bits
+optim/cast-kinds.c:6:47: warning: cast drops bits
+optim/cast-kinds.c:7:46: warning: cast drops bits
+optim/cast-kinds.c:8:45: warning: cast drops bits
+optim/cast-kinds.c:12:48: warning: cast drops bits
+optim/cast-kinds.c:13:50: warning: cast drops bits
+optim/cast-kinds.c:14:49: warning: cast drops bits
+optim/cast-kinds.c:15:48: warning: cast drops bits
+optim/cast-kinds.c:37:42: warning: non size-preserving integer to pointer cast
+optim/cast-kinds.c:38:44: warning: non size-preserving integer to pointer cast
* check-error-end
*/
diff --git a/validation/cast-weirds.c b/validation/cast-weirds.c
index a99c65d2..01ccc473 100644
--- a/validation/cast-weirds.c
+++ b/validation/cast-weirds.c
@@ -9,43 +9,10 @@ static void * uint_2_vptr(uint a) { return (void *)a; }
/*
* check-name: cast-weirds
- * check-command: test-linearize -m64 $file
+ * check-command: sparse -m64 $file
*
* check-error-start
cast-weirds.c:4:42: warning: non size-preserving integer to pointer cast
cast-weirds.c:5:44: warning: non size-preserving integer to pointer cast
* check-error-end
- *
- * check-output-start
-int_2_iptr:
-.L0:
- <entry-point>
- sext.64 %r2 <- (32) %arg1
- utptr.64 %r3 <- (64) %r2
- ret.64 %r3
-
-
-uint_2_iptr:
-.L2:
- <entry-point>
- zext.64 %r6 <- (32) %arg1
- utptr.64 %r7 <- (64) %r6
- ret.64 %r7
-
-
-int_2_vptr:
-.L4:
- <entry-point>
- sext.64 %r10 <- (32) %arg1
- ret.64 %r10
-
-
-uint_2_vptr:
-.L6:
- <entry-point>
- zext.64 %r13 <- (32) %arg1
- ret.64 %r13
-
-
- * check-output-end
*/
diff --git a/validation/linear/cast-kinds.c b/validation/optim/cast-kinds.c
index 5df307bc..5df307bc 100644
--- a/validation/linear/cast-kinds.c
+++ b/validation/optim/cast-kinds.c