Commit b7426089 authored by Keith Randall's avatar Keith Randall

cmd/compile: simple cleanups

Change-Id: If2cf3c5a29afc6cf74c3b08b9745e950231ead37
Reviewed-on: https://go-review.googlesource.com/29441Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent f5f7d6e3
...@@ -1690,7 +1690,7 @@ func (s *state) expr(n *Node) *ssa.Value { ...@@ -1690,7 +1690,7 @@ func (s *state) expr(n *Node) *ssa.Value {
op := s.ssaOp(OEQ, pt) op := s.ssaOp(OEQ, pt)
r := s.newValue2(op, Types[TBOOL], s.newValue1(ssa.OpComplexReal, pt, a), s.newValue1(ssa.OpComplexReal, pt, b)) r := s.newValue2(op, Types[TBOOL], s.newValue1(ssa.OpComplexReal, pt, a), s.newValue1(ssa.OpComplexReal, pt, b))
i := s.newValue2(op, Types[TBOOL], s.newValue1(ssa.OpComplexImag, pt, a), s.newValue1(ssa.OpComplexImag, pt, b)) i := s.newValue2(op, Types[TBOOL], s.newValue1(ssa.OpComplexImag, pt, a), s.newValue1(ssa.OpComplexImag, pt, b))
c := s.newValue2(ssa.OpAnd8, Types[TBOOL], r, i) c := s.newValue2(ssa.OpAndB, Types[TBOOL], r, i)
switch n.Op { switch n.Op {
case OEQ: case OEQ:
return c return c
......
...@@ -9,7 +9,6 @@ import ( ...@@ -9,7 +9,6 @@ import (
"internal/testenv" "internal/testenv"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"runtime"
"strings" "strings"
"testing" "testing"
) )
...@@ -49,12 +48,7 @@ func TestBreakContinue(t *testing.T) { runTest(t, "break.go") } ...@@ -49,12 +48,7 @@ func TestBreakContinue(t *testing.T) { runTest(t, "break.go") }
func TestTypeAssertion(t *testing.T) { runTest(t, "assert.go") } func TestTypeAssertion(t *testing.T) { runTest(t, "assert.go") }
// TestArithmetic tests that both backends have the same result for arithmetic expressions. // TestArithmetic tests that both backends have the same result for arithmetic expressions.
func TestArithmetic(t *testing.T) { func TestArithmetic(t *testing.T) { runTest(t, "arith.go") }
if runtime.GOARCH == "386" {
t.Skip("legacy 386 compiler can't handle this test")
}
runTest(t, "arith.go")
}
// TestFP tests that both backends have the same result for floating point expressions. // TestFP tests that both backends have the same result for floating point expressions.
func TestFP(t *testing.T) { runTest(t, "fp.go") } func TestFP(t *testing.T) { runTest(t, "fp.go") }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment