summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-08-14 14:34:37 -0400
committerRuss Cox <rsc@golang.org>2014-08-14 14:34:37 -0400
commit81e54561e935e41fed0232a798a7f9264c8b93fb (patch)
treef197ea034a409b720f01640a18e5aba78c6a7d36
parentf3632613eff2a93279fa9d357832e4d4c7d4b9bc (diff)
downloadgo-81e54561e935e41fed0232a798a7f9264c8b93fb.tar.gz
[dev.power64] cmd/9g: correct floating point comparison
LGTM=minux R=minux CC=golang-codereviews https://codereview.appspot.com/129210043
-rw-r--r--src/cmd/9g/cgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/9g/cgen.c b/src/cmd/9g/cgen.c
index 6bb44f547..86a56975a 100644
--- a/src/cmd/9g/cgen.c
+++ b/src/cmd/9g/cgen.c
@@ -1267,9 +1267,9 @@ bgen(Node *n, int true, int likely, Prog *to)
l = &n1;
r = &n2;
gins(optoas(OCMP, nr->type), l, r);
- if(isfloat[nr->type->etype] && (n->op == OLE || n->op == OGE)) {
+ if(isfloat[nr->type->etype] && (a == OLE || a == OGE)) {
// To get NaN right, must rewrite x <= y into separate x < y or x = y.
- switch(n->op) {
+ switch(a) {
case OLE:
a = OLT;
break;