diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-18 18:42:17 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-22 09:26:18 +0200 |
| commit | cb4bed63e19e64d62364337cca20285f782ac6fd (patch) | |
| tree | b78904af07a4813721c4e259fcaf67e2f2e03d3b /validation/optim | |
| parent | 729be196bb860270de32ec076873c6d327f592a0 (diff) | |
| download | sparse-dev-cb4bed63e19e64d62364337cca20285f782ac6fd.tar.gz | |
simplify ((x & M) << S) when (M << S) == 0
The instructions SHL(AND(x, M), S) can be simplified to 0
if (M << S) == 0.
For example code like:
unsigned foo(unsigned x)
{
return (x & 0xfff00000) << 12;
}
is now simplified into:
foo:
ret.32 $0
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
| -rw-r--r-- | validation/optim/shl-and0.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/optim/shl-and0.c b/validation/optim/shl-and0.c index 289859ae..894bd882 100644 --- a/validation/optim/shl-and0.c +++ b/validation/optim/shl-and0.c @@ -7,7 +7,6 @@ unsigned shl_and0(unsigned x) /* * check-name: shl-and0 * check-command: test-linearize -Wno-decl $file - * check-known-to-fail * * check-output-ignore * check-output-contains: ret\\..*\\$0$ |
