projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- fixed typos and some comments
[libfirm]
/
ir
/
ir
/
iropt.c
diff --git
a/ir/ir/iropt.c
b/ir/ir/iropt.c
index
d7ab0b2
..
2bfb87c
100644
(file)
--- a/
ir/ir/iropt.c
+++ b/
ir/ir/iropt.c
@@
-1259,8
+1259,7
@@
restart:
}
}
}
}
}
}
- if (get_mode_arithmetic(n_mode) == irma_twos_complement &&
- get_mode_arithmetic(a_mode) == irma_ieee754) {
+ if (mode_is_int(n_mode) && get_mode_arithmetic(a_mode) == irma_ieee754) {
/* ConvI(ConvF(I)) -> I, iff float mantissa >= int mode */
unsigned int_mantissa = get_mode_size_bits(n_mode) - (mode_is_signed(n_mode) ? 1 : 0);
unsigned float_mantissa = tarval_ieee754_get_mantissa_size(a_mode);
/* ConvI(ConvF(I)) -> I, iff float mantissa >= int mode */
unsigned int_mantissa = get_mode_size_bits(n_mode) - (mode_is_signed(n_mode) ? 1 : 0);
unsigned float_mantissa = tarval_ieee754_get_mantissa_size(a_mode);
@@
-5281,7
+5280,11
@@
static ir_node *transform_node_Conv(ir_node *n) {
ir_node *c, *oldn = n;
ir_node *a = get_Conv_op(n);
ir_node *c, *oldn = n;
ir_node *a = get_Conv_op(n);
- if (is_const_Phi(a)) {
+ if (get_irn_mode(n) != mode_b && is_const_Phi(a)) {
+ /* Do NOT optimize mode_b Conv's, this leads to remaining
+ * Phib nodes later, because the conv_b_lower operation
+ * is instantly reverted, when it tries to insert a Convb.
+ */
c = apply_conv_on_phi(a, get_irn_mode(n));
if (c) {
DBG_OPT_ALGSIM0(oldn, c, FS_OPT_CONST_PHI);
c = apply_conv_on_phi(a, get_irn_mode(n));
if (c) {
DBG_OPT_ALGSIM0(oldn, c, FS_OPT_CONST_PHI);