aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-07-31 00:24:17 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-06 08:51:39 +0200
commit1a5e49c57e6585832c4197f4f2ed91c73a964cb9 (patch)
tree6473cd536120da23b77dbfc2d71b8b515ad02adf /validation
parent8457b3c20a2f3e3f1ad1201af217faf4e89e0940 (diff)
downloadsparse-dev-1a5e49c57e6585832c4197f4f2ed91c73a964cb9.tar.gz
simplify ZEXT(SETCC(x,y), N)
Since the OP_SETCC instructions can only return a 0 or a 1, a zero-extension won't change the value and the OP_SETCC can be changed to directly return the extended size. Remove the unneeded extension. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/optim/bool-simplify.c9
-rw-r--r--validation/optim/setne0-zext.c1
-rw-r--r--validation/optim/trunc-seteq0.c1
3 files changed, 3 insertions, 8 deletions
diff --git a/validation/optim/bool-simplify.c b/validation/optim/bool-simplify.c
index 68aabb78..b872764c 100644
--- a/validation/optim/bool-simplify.c
+++ b/validation/optim/bool-simplify.c
@@ -43,16 +43,14 @@ and_0:
and_1:
.L2:
<entry-point>
- setne.1 %r8 <- %arg1, $0
- zext.32 %r11 <- (1) %r8
+ setne.32 %r11 <- %arg1, $0
ret.32 %r11
or_0:
.L4:
<entry-point>
- setne.1 %r14 <- %arg1, $0
- zext.32 %r17 <- (1) %r14
+ setne.32 %r17 <- %arg1, $0
ret.32 %r17
@@ -65,8 +63,7 @@ or_1:
and_2:
.L8:
<entry-point>
- setne.1 %r26 <- %arg1, $0
- zext.32 %r29 <- (1) %r26
+ setne.32 %r29 <- %arg1, $0
ret.32 %r29
diff --git a/validation/optim/setne0-zext.c b/validation/optim/setne0-zext.c
index fc6615be..8a074f03 100644
--- a/validation/optim/setne0-zext.c
+++ b/validation/optim/setne0-zext.c
@@ -3,7 +3,6 @@ unsigned long foo(int a) { return (unsigned int) (a != 0); }
/*
* check-name: setne0-zext
* check-command: test-linearize -m64 -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: zext\\.
diff --git a/validation/optim/trunc-seteq0.c b/validation/optim/trunc-seteq0.c
index 321c045e..5994b17c 100644
--- a/validation/optim/trunc-seteq0.c
+++ b/validation/optim/trunc-seteq0.c
@@ -10,7 +10,6 @@ int ou(int i, struct S *b) { return i || b->u; }
/*
* check-name: trunc-seteq0
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: trunc\\.