projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a real Dummy node instead of misusing an Unknown node and shortly deactivating...
[libfirm]
/
ir
/
opt
/
boolopt.c
diff --git
a/ir/opt/boolopt.c
b/ir/opt/boolopt.c
index
5696e47
..
7b39212
100644
(file)
--- a/
ir/opt/boolopt.c
+++ b/
ir/opt/boolopt.c
@@
-368,18
+368,18
@@
static ir_node *bool_or(cond_pair *const cpair, ir_node *dst_block)
(pnc_hi == pn_Cmp_Gt || pnc_lo == pn_Cmp_Ge) &&
get_mode_arithmetic(mode) == irma_twos_complement) {
/* works for two-complements only */
(pnc_hi == pn_Cmp_Gt || pnc_lo == pn_Cmp_Ge) &&
get_mode_arithmetic(mode) == irma_twos_complement) {
/* works for two-complements only */
- /* x <|
\
= lo || x >|>= hi ==> (x - lo) >u|>=u (hi-lo) */
- if (pnc_lo == pn_Cmp_L
t
) {
- /* must convert to <
=
*/
+ /* x <|
<
= lo || x >|>= hi ==> (x - lo) >u|>=u (hi-lo) */
+ if (pnc_lo == pn_Cmp_L
e
) {
+ /* must convert to < */
ir_mode *mode = get_tarval_mode(tv_lo);
ir_mode *mode = get_tarval_mode(tv_lo);
- tarval *n = tarval_
sub(tv_lo, get_mode_one(mode), NULL
);
- if (n != tarval_bad && tarval_cmp(n, tv_lo) == pn_Cmp_
L
t) {
+ tarval *n = tarval_
add(tv_lo, get_mode_one(mode)
);
+ if (n != tarval_bad && tarval_cmp(n, tv_lo) == pn_Cmp_
G
t) {
/* no overflow */
tv_lo = n;
/* no overflow */
tv_lo = n;
- pnc_lo = pn_Cmp_L
e
;
+ pnc_lo = pn_Cmp_L
t
;
}
}
}
}
- if (pnc_lo == pn_Cmp_L
e
) {
+ if (pnc_lo == pn_Cmp_L
t
) {
/* all fine */
ir_node *const block = get_nodes_block(cmp_hi);
ir_node * x = get_Cmp_left(cmp_hi);
/* all fine */
ir_node *const block = get_nodes_block(cmp_hi);
ir_node * x = get_Cmp_left(cmp_hi);