diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-08 10:22:40 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-22 09:25:34 +0200 |
| commit | cd554eebc1d6b10546f8478e47490737168644d7 (patch) | |
| tree | cc11cd574ed22937564db239c5cbc59a939a7e63 /validation/optim/and-or-mask.c | |
| parent | c05b1caa7c81b945526b77e84b888f48cfa91780 (diff) | |
| download | sparse-dev-cd554eebc1d6b10546f8478e47490737168644d7.tar.gz | |
add testcase for (((x & M') | (y & M'')) & M)
There is a potential problem when the second side of the OR
is simplified away.
Add 2 testcases to catch possible regressions here.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim/and-or-mask.c')
| -rw-r--r-- | validation/optim/and-or-mask.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/validation/optim/and-or-mask.c b/validation/optim/and-or-mask.c new file mode 100644 index 00000000..46803789 --- /dev/null +++ b/validation/optim/and-or-mask.c @@ -0,0 +1,18 @@ +int foo(int a, int b) +{ + return ((a & 7) | (b & 3)) & 8; +} + +/* + * check-name: and-or-mask + * check-command: test-linearize -Wno-decl $file + * + * check-output-start +foo: +.L0: + <entry-point> + ret.32 $0 + + + * check-output-end + */ |
