aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-07-31 09:19:15 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-06 11:47:03 +0200
commitdb491ea79222ddaecc1d3c976bf76dc84e169405 (patch)
tree18874dc8a73f4b5d8c370a818096f79c7c8ccc6b /validation/optim
parentd1be6899cf4271d43c6334ff4f6b8f50f0c1483b (diff)
downloadsparse-dev-db491ea79222ddaecc1d3c976bf76dc84e169405.tar.gz
boolean conversion of boolean value is a no-op
If an expression is already a boolean (constant) expression, converting it to a boolean expression is a no-op. In this case, return early, this avoids to create intermediate code that will need to be simplified away at some later stage. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
-rw-r--r--validation/optim/bool-simplify.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/validation/optim/bool-simplify.c b/validation/optim/bool-simplify.c
index b872764c..fe8ce88b 100644
--- a/validation/optim/bool-simplify.c
+++ b/validation/optim/bool-simplify.c
@@ -43,15 +43,15 @@ and_0:
and_1:
.L2:
<entry-point>
- setne.32 %r11 <- %arg1, $0
- ret.32 %r11
+ setne.32 %r9 <- %arg1, $0
+ ret.32 %r9
or_0:
.L4:
<entry-point>
- setne.32 %r17 <- %arg1, $0
- ret.32 %r17
+ setne.32 %r14 <- %arg1, $0
+ ret.32 %r14
or_1:
@@ -63,8 +63,8 @@ or_1:
and_2:
.L8:
<entry-point>
- setne.32 %r29 <- %arg1, $0
- ret.32 %r29
+ setne.32 %r25 <- %arg1, $0
+ ret.32 %r25
or_2: