diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-10-26 07:07:06 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-08 02:16:26 +0100 |
| commit | c60237251a55984b1fcf6302d25650d35533dc2a (patch) | |
| tree | bc676ac80d7b0716b95fb63d7d8ea06f351cc182 /validation/optim | |
| parent | cae6fa2f2d5a99927c26f063d10b6ecfeb81b403 (diff) | |
| download | sparse-dev-c60237251a55984b1fcf6302d25650d35533dc2a.tar.gz | |
cmp: simplify compares and sign/zero extend
Compare instructions with both operands sign or zero-extended
from the same original size are equivalent to a compare of
the original values. If the values were zero-extended, a signed
compare becomes an unsigned one.
Simplify away the sign/zero-extensions.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
| -rw-r--r-- | validation/optim/cmp-sext-sext.c | 1 | ||||
| -rw-r--r-- | validation/optim/cmp-zext-zext.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/validation/optim/cmp-sext-sext.c b/validation/optim/cmp-sext-sext.c index ba6ed54e..3bd22fb7 100644 --- a/validation/optim/cmp-sext-sext.c +++ b/validation/optim/cmp-sext-sext.c @@ -11,7 +11,6 @@ _Bool cmpu_sext_sext(ARGS(INT32)) { return TEST(UINT64, UINT32, a, < , b); } /* * check-name: cmp-sext-sext * check-command: test-linearize -Wno-decl $file - * check-known-to-fail * * check-output-ignore * check-output-returns: 1 diff --git a/validation/optim/cmp-zext-zext.c b/validation/optim/cmp-zext-zext.c index 9f188297..88f9078f 100644 --- a/validation/optim/cmp-zext-zext.c +++ b/validation/optim/cmp-zext-zext.c @@ -11,7 +11,6 @@ _Bool cmpu_zext_zext(ARGS(UINT32)) { return TEST(UINT64, UINT32, a, < , b); } /* * check-name: cmp-zext-zext * check-command: test-linearize -Wno-decl $file - * check-known-to-fail * * check-output-ignore * check-output-returns: 1 |
