public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5071e7
)
Floating point promotion is less buggy.
author
David Given
<dg@cowlark.com>
Wed, 19 Oct 2016 21:27:53 +0000
(23:27 +0200)
committer
David Given
<dg@cowlark.com>
Wed, 19 Oct 2016 21:27:53 +0000
(23:27 +0200)
mach/proto/mcg/pass_promotefloatops.c
patch
|
blob
|
history
diff --git
a/mach/proto/mcg/pass_promotefloatops.c
b/mach/proto/mcg/pass_promotefloatops.c
index
ffea3f0
..
87db1e4
100644
(file)
--- a/
mach/proto/mcg/pass_promotefloatops.c
+++ b/
mach/proto/mcg/pass_promotefloatops.c
@@
-86,8
+86,21
@@
static void modify_promotable_irs(void)
{
struct ir* ir = promotable.item[i];
- if (ir->opcode != IR_PHI)
- ir->opcode++;
+ switch (ir->opcode)
+ {
+ case IR_ADDF:
+ case IR_SUBF:
+ case IR_MULF:
+ case IR_DIVF:
+ case IR_NEGF:
+ case IR_PHI:
+ case IR_NOP:
+ break;
+
+ default:
+ ir->opcode++;
+ break;
+ }
}
}