diff options
Diffstat (limited to 'validation/optim')
| -rw-r--r-- | validation/optim/call-inlined.c | 11 | ||||
| -rw-r--r-- | validation/optim/eqne-select.c | 12 | ||||
| -rw-r--r-- | validation/optim/select-constant-cond.c | 10 | ||||
| -rw-r--r-- | validation/optim/select-same-args.c | 9 | ||||
| -rw-r--r-- | validation/optim/select-select-true-false0.c | 10 | ||||
| -rw-r--r-- | validation/optim/select-select-true-false1.c | 13 | ||||
| -rw-r--r-- | validation/optim/select-select-true-true.c | 9 | ||||
| -rw-r--r-- | validation/optim/select-self-zero.c | 10 |
8 files changed, 75 insertions, 9 deletions
diff --git a/validation/optim/call-inlined.c b/validation/optim/call-inlined.c index f21b3294..7f5f4e89 100644 --- a/validation/optim/call-inlined.c +++ b/validation/optim/call-inlined.c @@ -18,13 +18,6 @@ int foo(int a, int b, int p) * check-name: call-inlined * check-command: test-linearize -Wno-decl $file * - * check-output-start -foo: -.L0: - <entry-point> - select.32 %r10 <- %arg3, %arg3, $0 - ret.32 %r10 - - - * check-output-end + * check-output-ignore + * check-output-returns: %arg3 */ diff --git a/validation/optim/eqne-select.c b/validation/optim/eqne-select.c new file mode 100644 index 00000000..9dfd88b5 --- /dev/null +++ b/validation/optim/eqne-select.c @@ -0,0 +1,12 @@ +int sel_eq01(int a, int b) { return ((a == b) ? a : b) == b; } +int sel_eq10(int a, int b) { return ((a == b) ? b : a) == a; } +int sel_ne01(int a, int b) { return ((a != b) ? a : b) == a; } +int sel_ne10(int a, int b) { return ((a != b) ? b : a) == b; } + +/* + * check-name: eqne-select + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-returns: 1 + */ diff --git a/validation/optim/select-constant-cond.c b/validation/optim/select-constant-cond.c new file mode 100644 index 00000000..a9337e2c --- /dev/null +++ b/validation/optim/select-constant-cond.c @@ -0,0 +1,10 @@ +int t(int p, int a, int b) { return ((p == p) ? a : b) == a; } +int f(int p, int a, int b) { return ((p != p) ? a : b) == b; } + +/* + * check-name: select-constant-cond + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-returns: 1 + */ diff --git a/validation/optim/select-same-args.c b/validation/optim/select-same-args.c new file mode 100644 index 00000000..403af471 --- /dev/null +++ b/validation/optim/select-same-args.c @@ -0,0 +1,9 @@ +int foo(int p, int a) { return (p ? a : a) == a; } + +/* + * check-name: select-same-args + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-returns: 1 + */ diff --git a/validation/optim/select-select-true-false0.c b/validation/optim/select-select-true-false0.c new file mode 100644 index 00000000..4066c2da --- /dev/null +++ b/validation/optim/select-select-true-false0.c @@ -0,0 +1,10 @@ +int fw(int p, int a, int b) { return ((p ? 42 : 0) ? a : b) == ( p ? a : b); } +int bw(int p, int a, int b) { return ((p ? 0 : 42) ? a : b) == ( p ? b : a); } + +/* + * check-name: select-select-true-false0 + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-returns: 1 + */ diff --git a/validation/optim/select-select-true-false1.c b/validation/optim/select-select-true-false1.c new file mode 100644 index 00000000..32c0364d --- /dev/null +++ b/validation/optim/select-select-true-false1.c @@ -0,0 +1,13 @@ +int foo(int p) +{ + int t = (p ? 42 : 0); + return (t ? 42 : 0) == ( p ? 42 : 0); +} + +/* + * check-name: select-select-true-false1 + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-returns: 1 + */ diff --git a/validation/optim/select-select-true-true.c b/validation/optim/select-select-true-true.c new file mode 100644 index 00000000..c0c26fdd --- /dev/null +++ b/validation/optim/select-select-true-true.c @@ -0,0 +1,9 @@ +int foo(int p, int a, int b) { return ((p ? 42 : 43) ? a : b) == a ; } + +/* + * check-name: select-select-true-true + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-returns: 1 + */ diff --git a/validation/optim/select-self-zero.c b/validation/optim/select-self-zero.c new file mode 100644 index 00000000..73b3a3dc --- /dev/null +++ b/validation/optim/select-self-zero.c @@ -0,0 +1,10 @@ +int sel_self0x(int x) { return (x ? 0 : x) == 0; } +int sel_selfx0(int x) { return (x ? x : 0) == x; } + +/* + * check-name: select-self-zero + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-returns: 1 + */ |
