diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-25 23:01:48 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-27 22:19:41 +0100 |
| commit | cafabc769e77f14e47ab44866b304e51af42c44c (patch) | |
| tree | 4d8a3870d76d1ae0f0e304ecaab8cae22b180aac /validation/optim | |
| parent | 2b77484ed79f2d2edb032b5922236575e57dfb5c (diff) | |
| download | sparse-dev-cafabc769e77f14e47ab44866b304e51af42c44c.tar.gz | |
convert SEL(x & BIT1, BIT2, 0) into SHIFT(x & BIT1, S)
Convert an expression like:
(x & (1 << A)) ? (1 << B) : 0
into:
(x & (1 << A)) << (B - A)
or:
(x & (1 << A)) >> (A - B)
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
| -rw-r--r-- | validation/optim/select-and-shift.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/optim/select-and-shift.c b/validation/optim/select-and-shift.c index fbe044c7..5313fe4b 100644 --- a/validation/optim/select-and-shift.c +++ b/validation/optim/select-and-shift.c @@ -11,7 +11,6 @@ int bar(int p) { return ((p & B) ? A : 0) == ((((unsigned)p) & B) >> S); } /* * check-name: select-and-shift * check-command: test-linearize -Wno-decl $file - * check-known-to-fail * * check-output-ignore * check-output-returns: 1 |
