From: Keith Randall Date: Tue, 20 Sep 2016 20:59:40 +0000 (-0700) Subject: cmd/compile: simple cleanups X-Git-Tag: go1.8beta1~1218 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b7426089e597d20bade4b4bbfea1188844a07af8;p=gostls13.git cmd/compile: simple cleanups Change-Id: If2cf3c5a29afc6cf74c3b08b9745e950231ead37 Reviewed-on: https://go-review.googlesource.com/29441 Reviewed-by: Brad Fitzpatrick Reviewed-by: Cherry Zhang Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index 44be52b937..e0f6079837 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -1690,7 +1690,7 @@ func (s *state) expr(n *Node) *ssa.Value { op := s.ssaOp(OEQ, pt) 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)) - c := s.newValue2(ssa.OpAnd8, Types[TBOOL], r, i) + c := s.newValue2(ssa.OpAndB, Types[TBOOL], r, i) switch n.Op { case OEQ: return c diff --git a/src/cmd/compile/internal/gc/ssa_test.go b/src/cmd/compile/internal/gc/ssa_test.go index b54ada9544..debdc4386b 100644 --- a/src/cmd/compile/internal/gc/ssa_test.go +++ b/src/cmd/compile/internal/gc/ssa_test.go @@ -9,7 +9,6 @@ import ( "internal/testenv" "os/exec" "path/filepath" - "runtime" "strings" "testing" ) @@ -49,12 +48,7 @@ func TestBreakContinue(t *testing.T) { runTest(t, "break.go") } func TestTypeAssertion(t *testing.T) { runTest(t, "assert.go") } // TestArithmetic tests that both backends have the same result for arithmetic expressions. -func TestArithmetic(t *testing.T) { - if runtime.GOARCH == "386" { - t.Skip("legacy 386 compiler can't handle this test") - } - runTest(t, "arith.go") -} +func TestArithmetic(t *testing.T) { runTest(t, "arith.go") } // TestFP tests that both backends have the same result for floating point expressions. func TestFP(t *testing.T) { runTest(t, "fp.go") }