diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2016-12-06 14:04:40 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-11-13 14:16:51 +0100 |
| commit | fac99b8c7132db6e636766b35d662315b37d3b42 (patch) | |
| tree | a47834ce1decc7d92c7cffa54c42aca8e7caffd4 /validation/optim/bool-eq0.c | |
| parent | b3dc605badcd4930fa68fa6b5ab031970f54bde3 (diff) | |
| download | sparse-dev-fac99b8c7132db6e636766b35d662315b37d3b42.tar.gz | |
add test cases for simplification of equivalent to 'x == 0' or 'x != 0'
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim/bool-eq0.c')
| -rw-r--r-- | validation/optim/bool-eq0.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/validation/optim/bool-eq0.c b/validation/optim/bool-eq0.c new file mode 100644 index 00000000..dbc93d95 --- /dev/null +++ b/validation/optim/bool-eq0.c @@ -0,0 +1,12 @@ +int beq0(int a) { return a == 0; } +int bnotne0(int a) { return !(a != 0); } +int bnot(int a) { return !a; } + +/* + * check-name: bool-eq0 + * check-command: test-linearize -Wno-decl $file + * check-output-ignore + * + * check-output-excludes: setne\\. + * check-output-contains: seteq\\. + */ |
