diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-06 23:34:41 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-23 10:58:21 +0200 |
| commit | 1091da3a64c840d813fb4d035e8b90ca126f8114 (patch) | |
| tree | d1c24c081a676005903229092c81eaf18f4b0e4f /validation | |
| parent | 5c189c40bb2c8fd7f5652f930ddb2869a1d1a9ff (diff) | |
| download | sparse-dev-1091da3a64c840d813fb4d035e8b90ca126f8114.tar.gz | |
cse: add testcase for missed opportunity
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@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/optim/cse-cmp-next.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/validation/optim/cse-cmp-next.c b/validation/optim/cse-cmp-next.c new file mode 100644 index 00000000..e7cf1623 --- /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\\. + */ |
