diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-31 00:24:17 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-06 08:51:39 +0200 |
| commit | 1a5e49c57e6585832c4197f4f2ed91c73a964cb9 (patch) | |
| tree | 6473cd536120da23b77dbfc2d71b8b515ad02adf /validation/optim/bool-simplify.c | |
| parent | 8457b3c20a2f3e3f1ad1201af217faf4e89e0940 (diff) | |
| download | sparse-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/optim/bool-simplify.c')
| -rw-r--r-- | validation/optim/bool-simplify.c | 9 |
1 files changed, 3 insertions, 6 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 |
