Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for Slicemask (0.33 sec)

  1. test/prove.go

    	e = stack[last]
    	// Buggy compiler prints "Disproved Leq64" for the next line.
    	stack = stack[:last]
    	return e, nil
    }
    
    func sm1(b []int, x int) {
    	// Test constant argument to slicemask.
    	useSlice(b[2:8]) // ERROR "Proved slicemask not needed$"
    	// Test non-constant argument with known limits.
    	if cap(b) > 10 {
    		useSlice(b[2:])
    	}
    }
    
    func lim1(x, y, z int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 23 00:02:36 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/prove.go

    		case OpSlicemask:
    			// Replace OpSlicemask operations in b with constants where possible.
    			x, delta := isConstDelta(v.Args[0])
    			if x == nil {
    				break
    			}
    			// slicemask(x + y)
    			// if x is larger than -y (y is negative), then slicemask is -1.
    			lim, ok := ft.limits[x.ID]
    			if !ok {
    				break
    			}
    			if lim.umin > uint64(-delta) {
    				if v.Args[0].Op == OpAdd64 {
    					v.reset(OpConst64)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:30:21 UTC 2024
    - 48.9K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/_gen/Wasm.rules

    (ZeroExt32to64        x) => (I64And x (I64Const [0xffffffff]))
    (ZeroExt16to(64|32)   x) => (I64And x (I64Const [0xffff]))
    (ZeroExt8to(64|32|16) x) => (I64And x (I64Const [0xff]))
    
    (Slicemask x) => (I64ShrS (I64Sub (I64Const [0]) x) (I64Const [63]))
    
    // Lowering truncation
    // Because we ignore the high parts, truncates are just copies.
    (Trunc64to(32|16|8) ...) => (Copy ...)
    (Trunc32to(16|8)    ...) => (Copy ...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 03:56:57 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/_gen/generic.rules

    (SignExt16to32 (Trunc32to16 x:(Rsh32x64 _ (Const64 [s])))) && s >= 16 => x
    (SignExt8to16  (Trunc16to8  x:(Rsh16x64 _ (Const64 [s])))) && s >= 8 => x
    
    (Slicemask (Const32 [x])) && x > 0 => (Const32 [-1])
    (Slicemask (Const32 [0]))          => (Const32 [0])
    (Slicemask (Const64 [x])) && x > 0 => (Const64 [-1])
    (Slicemask (Const64 [0]))          => (Const64 [0])
    
    // simplifications often used for lengths.  e.g. len(s[i:i+5])==5
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 22:21:05 UTC 2024
    - 135.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/LOONG64.rules

    // constants
    (Const(64|32|16|8) [val]) => (MOVVconst [int64(val)])
    (Const(32|64)F [val]) => (MOV(F|D)const [float64(val)])
    (ConstNil) => (MOVVconst [0])
    (ConstBool [t]) => (MOVVconst [int64(b2i(t))])
    
    (Slicemask <t> x) => (SRAVconst (NEGV <t> x) [63])
    
    // truncations
    // Because we ignore high parts of registers, truncates are just copies.
    (Trunc16to8 ...) => (Copy ...)
    (Trunc32to8 ...) => (Copy ...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 19:26:25 UTC 2023
    - 31.8K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/_gen/RISCV64.rules

    (Cvt64Fto64 ...) => (FCVTLD ...)
    
    (Cvt32Fto64F ...) => (FCVTDS ...)
    (Cvt64Fto32F ...) => (FCVTSD ...)
    
    (CvtBoolToUint8 ...) => (Copy ...)
    
    (Round(32|64)F ...) => (LoweredRound(32|64)F ...)
    
    (Slicemask <t> x) => (SRAI [63] (NEG <t> x))
    
    // Truncations
    // We ignore the unused high parts of registers, so truncates are just copies.
    (Trunc16to8  ...) => (Copy ...)
    (Trunc32to8  ...) => (Copy ...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 14:57:07 UTC 2024
    - 40.3K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/_gen/MIPS.rules

    (SignExt8to16 ...)  => (MOVBreg ...)
    (SignExt8to32 ...)  => (MOVBreg ...)
    (SignExt16to32 ...) => (MOVHreg ...)
    
    (Signmask x) => (SRAconst x [31])
    (Zeromask x) => (NEG (SGTU x (MOVWconst [0])))
    (Slicemask <t> x) => (SRAconst (NEG <t> x) [31])
    
    // float-int conversion
    (Cvt32to(32|64)F ...) => (MOVW(F|D) ...)
    (Cvt(32|64)Fto32 ...) => (TRUNC(F|D)W ...)
    (Cvt32Fto64F ...) => (MOVFD ...)
    (Cvt64Fto32F ...) => (MOVDF ...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 14:43:03 UTC 2023
    - 35.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/_gen/MIPS64.rules

    // constants
    (Const(64|32|16|8) [val]) => (MOVVconst [int64(val)])
    (Const(32|64)F [val]) => (MOV(F|D)const [float64(val)])
    (ConstNil) => (MOVVconst [0])
    (ConstBool [t]) => (MOVVconst [int64(b2i(t))])
    
    (Slicemask <t> x) => (SRAVconst (NEGV <t> x) [63])
    
    // truncations
    // Because we ignore high parts of registers, truncates are just copies.
    (Trunc16to8 ...) => (Copy ...)
    (Trunc32to8 ...) => (Copy ...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 31 03:59:48 UTC 2023
    - 41.9K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/_gen/genericOps.go

    	{name: "Signmask", argLength: 1, typ: "Int32"},  // 0 if arg0 >= 0, -1 if arg0 < 0
    	{name: "Zeromask", argLength: 1, typ: "UInt32"}, // 0 if arg0 == 0, 0xffffffff if arg0 != 0
    	{name: "Slicemask", argLength: 1},               // 0 if arg0 == 0, -1 if arg0 > 0, undef if arg0<0. Type is native int size.
    
    	{name: "SpectreIndex", argLength: 2},      // arg0 if 0 <= arg0 < arg1, 0 otherwise. Type is native int size.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 15:49:20 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/_gen/AMD64.rules

    (ZeroExt8to32  ...) => (MOVBQZX ...)
    (ZeroExt8to64  ...) => (MOVBQZX ...)
    (ZeroExt16to32 ...) => (MOVWQZX ...)
    (ZeroExt16to64 ...) => (MOVWQZX ...)
    (ZeroExt32to64 ...) => (MOVLQZX ...)
    
    (Slicemask <t> x) => (SARQconst (NEGQ <t> x) [63])
    
    (SpectreIndex <t> x y) => (CMOVQCC x (MOVQconst [0]) (CMPQ x y))
    (SpectreSliceIndex <t> x y) => (CMOVQHI x (MOVQconst [0]) (CMPQ x y))
    
    // Lowering truncation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 12 19:38:41 UTC 2024
    - 93.9K bytes
    - Viewed (0)
Back to top