projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2df298
)
Do not convert Sub(P, P) into a simple Minus ...
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Mon, 16 Oct 2006 11:50:06 +0000
(11:50 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Mon, 16 Oct 2006 11:50:06 +0000
(11:50 +0000)
[r8350]
ir/ir/iropt.c
patch
|
blob
|
history
diff --git
a/ir/ir/iropt.c
b/ir/ir/iropt.c
index
310e102
..
3019dd1
100644
(file)
--- a/
ir/ir/iropt.c
+++ b/
ir/ir/iropt.c
@@
-2039,7
+2039,8
@@
static ir_node *transform_node_Sub(ir_node *n)
if (mode_is_float(mode) && (get_irg_fp_model(current_ir_graph) & fp_strict_algebraic))
return n;
- if (mode_is_num(mode) && (classify_Const(a) == CNST_NULL)) {
+ /* Beware of Sub(P, P) which cannot be optimized into a simple Minus ... */
+ if (mode_is_num(mode) && mode == get_irn_mode(a) && (classify_Const(a) == CNST_NULL)) {
n = new_rd_Minus(
get_irn_dbg_info(n),
current_ir_graph,