aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-12 11:56:52 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-22 09:25:34 +0200
commit03e845221e1d4e7e43f43a91a1d5b3ee96e58c5c (patch)
tree478b2c7edc4cc11b129ea6a4d8a4eb2c8f074ba4 /validation/optim
parent8ef6a1d0cac7fdbf5f0c0f70f5c3a25cc1e88670 (diff)
downloadsparse-dev-03e845221e1d4e7e43f43a91a1d5b3ee96e58c5c.tar.gz
simplify OP((x | C), K) when (C & M) != C
If the effective mask (M) corresponding to OP(_, K) is different than the combined mask (C & M), then the inner mask (C) can be replaced by the smaller (C & M), giving: OP((x | M'), K) with M' == (C & M). For example, code like: int foo(int x) { return (x | 0xfffffff0) & 0xfff; } is now simplified into: foo: or.32 %r2 <- %arg1, $0xff0 and.32 %r3 <- %r2, $0xfff ret.32 %r3 while previously, the constant was not reduced: foo: or.32 %r2 <- %arg1, $0xfffffff0 and.32 %r3 <- %r2, $0xfff ret.32 %r3 Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
-rw-r--r--validation/optim/and-or-constant2.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/optim/and-or-constant2.c b/validation/optim/and-or-constant2.c
index 82e0d3c6..d7e66f9c 100644
--- a/validation/optim/and-or-constant2.c
+++ b/validation/optim/and-or-constant2.c
@@ -6,7 +6,6 @@ int foo(int x)
/*
* check-name: and-or-constant2
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-contains: or\\..*\\$0xff0