diff options
Diffstat (limited to 'validation/optim')
| -rw-r--r-- | validation/optim/bitfield-size.c | 15 | ||||
| -rw-r--r-- | validation/optim/bitfield-store-loads.c | 4 | ||||
| -rw-r--r-- | validation/optim/sext.c | 7 | ||||
| -rw-r--r-- | validation/optim/trunc-or-shl.c | 6 |
4 files changed, 12 insertions, 20 deletions
diff --git a/validation/optim/bitfield-size.c b/validation/optim/bitfield-size.c index 0d2deeea..ea1ed57f 100644 --- a/validation/optim/bitfield-size.c +++ b/validation/optim/bitfield-size.c @@ -19,17 +19,6 @@ signed int get__bfs_b(struct bfs bf) { return bf.b; } signed int get_pbfs_a(struct bfs *bf) { return bf->a; } signed int get_pbfs_b(struct bfs *bf) { return bf->b; } - -struct bfi { - int a:4; - int :2; - int b:4; -}; -unsigned int get__bfi_a(struct bfi bf) { return bf.a; } -unsigned int get__bfi_b(struct bfi bf) { return bf.b; } -unsigned int get_pbfi_a(struct bfi *bf) { return bf->a; } -unsigned int get_pbfi_b(struct bfi *bf) { return bf->b; } - /* * check-name: bitfield size * check-command: test-linearize -Wno-decl $file @@ -37,8 +26,8 @@ unsigned int get_pbfi_b(struct bfi *bf) { return bf->b; } * * check-output-excludes: and\\..*\\$960 * check-output-excludes: zext\\. - * check-output-pattern(8): and\\..*\\$15 + * check-output-pattern(4): and\\..*\\$15 * check-output-pattern(4): sext\\. * check-output-pattern(4): trunc\\.4 - * check-output-pattern(6): lsr\\..*\\$6 + * check-output-pattern(4): lsr\\..*\\$6 */ diff --git a/validation/optim/bitfield-store-loads.c b/validation/optim/bitfield-store-loads.c index dc625131..f946715b 100644 --- a/validation/optim/bitfield-store-loads.c +++ b/validation/optim/bitfield-store-loads.c @@ -1,6 +1,6 @@ struct s { - char :2; - char f:3; + unsigned char :2; + unsigned char f:3; }; int foo(struct s s, int a) diff --git a/validation/optim/sext.c b/validation/optim/sext.c index 719730d5..3769a05c 100644 --- a/validation/optim/sext.c +++ b/validation/optim/sext.c @@ -6,10 +6,9 @@ int sext(int x) /* * check-name: sext * check-command: test-linearize -Wno-decl $file - * check-known-to-fail * * check-output-ignore - * check-output-contains: sext\\.$27 - * check-output-excludes: asr\\. - * check-output-excludes: shl\\. + * check-output-excludes: sext\\. + * check-output-contains: asr\\.32 + * check-output-contains: shl\\.32 */ diff --git a/validation/optim/trunc-or-shl.c b/validation/optim/trunc-or-shl.c index 70d8bd1d..8660d0f0 100644 --- a/validation/optim/trunc-or-shl.c +++ b/validation/optim/trunc-or-shl.c @@ -1,3 +1,6 @@ +// because of the cast to char, the fist arg should be eliminated +// and the whole reduced to TRUNC(%arg2, 8) + char foo(int a, int b) { return (a << 8) | b; @@ -9,5 +12,6 @@ char foo(int a, int b) * check-known-to-fail * * check-output-ignore - * check-output-contains: ret\\..*%arg2 + * check-output-excludes: %arg1 + * check-output-contains: trunc\\..*%arg2 */ |
