go/src/cmd/compile/internal/ssa/rewriteCond_test.go

var x64

var x64b

var x64c

var y64

var x32

var x32b

var x32c

var y32

var one64

var one32

var v64

var v64_n

var v32

var v32_n

var uv32

var uz

var crTests

var crBenches

// Test int32/int64's add/sub/madd/msub operations with boundary values to
// ensure the optimization to 'comparing to zero' expressions of if-statements
// yield expected results.
// 32 rewriting rules are covered. At least two scenarios for "Canonicalize
// the order of arguments to comparisons", which helps with CSE, are covered.
// The tedious if-else structures are necessary to ensure all concerned rules
// and machine code sequences are covered.
// It's for arm64 initially, please see https://github.com/golang/go/issues/38740
func TestCondRewrite(t *testing.T) {}

// Profile the aforementioned optimization from two angles:
//
//	SoloJump: generated branching code has one 'jump', for '<' and '>='
//	CombJump: generated branching code has two consecutive 'jump', for '<=' and '>'
//
// We expect that 'CombJump' is generally on par with the non-optimized code, and
// 'SoloJump' demonstrates some improvement.
// It's for arm64 initially, please see https://github.com/golang/go/issues/38740
func BenchmarkCondRewrite(b *testing.B) {}

// var +/- const
func testAddConst64(t *testing.T) {}

// 32-bit var +/- const
func testAddConst32(t *testing.T) {}

// var + var
func testAddVar64(t *testing.T) {}

// var + var, cset
func testAddVar64Cset(t *testing.T) {}

// 32-bit var+var
func testAddVar32(t *testing.T) {}

// multiply-add
func testMAddVar64(t *testing.T) {}

// 32-bit multiply-add
func testMAddVar32(t *testing.T) {}

// multiply-sub
func testMSubVar64(t *testing.T) {}

// 32-bit multiply-sub
func testMSubVar32(t *testing.T) {}

// 32-bit ADDshift, pick up 1~2 scenarios randomly for each condition
func testAddShift32(t *testing.T) {}

// 32-bit SUBshift, pick up 1~2 scenarios randomly for each condition
func testSubShift32(t *testing.T) {}

var rnd

var sink

func benchSoloJump(b *testing.B) {}

func benchCombJump(b *testing.B) {}