diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-08 23:59:51 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-25 22:07:00 +0200 |
| commit | 0fc8a1eebbb1c7adeef5900288203b24a3aa4f7d (patch) | |
| tree | 050f99bfea7291e06b325dcab78a729cdd694063 /validation/optim/bool-sext-test.c | |
| parent | 6fc095ca97f6a93e151bbc98fde897e867b7c750 (diff) | |
| download | sparse-dev-0fc8a1eebbb1c7adeef5900288203b24a3aa4f7d.tar.gz | |
testcase for SET{EQ,NE}([SZ]EXT(x, N),{0,1})'s simplification
Add some basic testcase for these relatively common
simplification opportunities.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim/bool-sext-test.c')
| -rw-r--r-- | validation/optim/bool-sext-test.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/validation/optim/bool-sext-test.c b/validation/optim/bool-sext-test.c new file mode 100644 index 00000000..0ca3dea9 --- /dev/null +++ b/validation/optim/bool-sext-test.c @@ -0,0 +1,13 @@ +_Bool eqs0( signed char a) { return a == 0; } +_Bool eqs1( signed char a) { return a == 1; } +_Bool nes0( signed char a) { return a != 0; } +_Bool nes1( signed char a) { return a != 1; } + +/* + * check-name: bool-sext-test + * check-command: test-linearize -Wno-decl $file + * check-known-to-fail + * + * check-output-ignore + * check-output-excludes: sext\\. + */ |
