Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testLoadStoreOrder_ssa (0.16 sec)

  1. src/cmd/compile/internal/test/testdata/loadstore_test.go

    package main
    
    import "testing"
    
    // testLoadStoreOrder tests for reordering of stores/loads.
    func testLoadStoreOrder(t *testing.T) {
    	z := uint32(1000)
    	if testLoadStoreOrder_ssa(&z, 100) == 0 {
    		t.Errorf("testLoadStoreOrder failed")
    	}
    }
    
    //go:noinline
    func testLoadStoreOrder_ssa(z *uint32, prec uint) int {
    	old := *z         // load
    	*z = uint32(prec) // store
    	if *z < old {     // load
    		return 1
    	}
    	return 0
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:54:15 UTC 2022
    - 4.8K bytes
    - Viewed (0)
Back to top