aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/bitfield-store-loadu.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-22 17:31:57 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-24 08:18:36 +0200
commit3f2cbce78f78cbae35a02eb318a86f78556f71aa (patch)
tree92daecdcc157eb89fc007078e0479d48b9be9be5 /validation/optim/bitfield-store-loadu.c
parent240c84a3eea0649f76a2510f61475a5216fe9a81 (diff)
downloadsparse-dev-3f2cbce78f78cbae35a02eb318a86f78556f71aa.tar.gz
simplify AND(SHIFT(a | b, S), M)
The simplification of AND(SHIFT(a | b, S), M) can be done by combining the mask M with the effective mask corresponding to SHIFT(_, S). This instruction pattern is generated when accessing bitfields, for example, code like: struct u { unsigned int :2; unsigned int f:3; }; int bfu(struct u s, int a) { s.f = a; return s.f; } is now simplified into the minimal: bfu: and.32 %r11 <- %arg2, $7 ret.32 %r11 The simplification is done by introducing a small helper, simplify_mask_shift(), doing the pattern matching and then calling simplify_mask_shift_or() with the mask M. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim/bitfield-store-loadu.c')
-rw-r--r--validation/optim/bitfield-store-loadu.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/optim/bitfield-store-loadu.c b/validation/optim/bitfield-store-loadu.c
index 4c289504..7fa1593d 100644
--- a/validation/optim/bitfield-store-loadu.c
+++ b/validation/optim/bitfield-store-loadu.c
@@ -12,7 +12,6 @@ int foo(struct s s, int a)
/*
* check-name: bitfield-store-load unsigned
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: shl\\.