projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
324699d
)
fix Cmp input normalisation
author
Matthias Braun
<matze@braunis.de>
Fri, 19 Oct 2007 18:13:10 +0000
(18:13 +0000)
committer
Matthias Braun
<matze@braunis.de>
Fri, 19 Oct 2007 18:13:10 +0000
(18:13 +0000)
[r16285]
ir/ir/iropt.c
patch
|
blob
|
history
diff --git
a/ir/ir/iropt.c
b/ir/ir/iropt.c
index
ad239d5
..
428fe2d
100644
(file)
--- a/
ir/ir/iropt.c
+++ b/
ir/ir/iropt.c
@@
-3707,8
+3707,10
@@
static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
* We ignore the case that both are constants
* this case should be optimized away.
*/
- if (is_Const(right)) {
- c = right;
+ if (is_irn_constlike(right) && !(is_Const(left) && !is_Const(right))) {
+ if(is_Const(right)) {
+ c = right;
+ }
} else if (is_irn_constlike(left)) {
c = left;
left = right;