- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 30 for constBool (0.21 sec)
-
src/cmd/compile/internal/ssa/_gen/generic.rules
(EqB (ConstBool [false]) x) => (Not x) (EqB (ConstBool [true]) x) => x (Neq(64|32|16|8) x x) => (ConstBool [false]) (NeqB (ConstBool [c]) (ConstBool [d])) => (ConstBool [c != d]) (NeqB (ConstBool [false]) x) => x (NeqB (ConstBool [true]) x) => (Not x) (NeqB (Not x) (Not y)) => (NeqB x y) (Eq64 (Const64 <t> [c]) (Add64 (Const64 <t> [d]) x)) => (Eq64 (Const64 <t> [c-d]) x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 22:21:05 UTC 2024 - 135.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/phiopt.go
// sb0 // If d -> sd0, sd1 // sd1 // ... // sd0 // Plain -> b // b // x = (OpPhi (ConstBool [true]) (ConstBool [false])) // // In this case we can also replace x with a copy of c. // // The optimization idea: // 1. block b has a phi value x, x = OpPhi (ConstBool [true]) (ConstBool [false]), // and len(b.Preds) is equal to 2.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 8.1K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/shortcircuit.go
if p.Kind != BlockIf { continue } if p.Controls[0] != a { continue } if e.i == 0 { if ct == nil { ct = f.ConstBool(f.Config.Types.Bool, true) } v.SetArg(i, ct) } else { if cf == nil { cf = f.ConstBool(f.Config.Types.Bool, false) } v.SetArg(i, cf) } } } } // Step 2: Redirect control flow around known branches. // p:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 03 17:47:02 UTC 2022 - 12.6K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/func_test.go
f := c.Fun("entry", Bloc("entry", Valu("mem", OpInitMem, types.TypeMem, 0, nil), Exit("mem"))) v1 := f.f.ConstBool(c.config.Types.Bool, false) v2 := f.f.ConstBool(c.config.Types.Bool, true) f.f.freeValue(v1) f.f.freeValue(v2) v3 := f.f.ConstBool(c.config.Types.Bool, false) v4 := f.f.ConstBool(c.config.Types.Bool, true) if v3.AuxInt != 0 { t.Errorf("expected %s to have auxint of 0\n", v3.LongString()) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:01:04 UTC 2023 - 13.1K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewritegeneric.go
return true } } break } return false } func rewriteValuegeneric_OpEqB(v *Value) bool { v_1 := v.Args[1] v_0 := v.Args[0] // match: (EqB (ConstBool [c]) (ConstBool [d])) // result: (ConstBool [c == d]) for { for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 { if v_0.Op != OpConstBool { continue } c := auxIntToBool(v_0.AuxInt)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:24:47 UTC 2024 - 812.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/func.go
const ( constSliceMagic = 1122334455 constInterfaceMagic = 2233445566 constNilMagic = 3344556677 constEmptyStringMagic = 4455667788 ) // ConstBool returns an int constant representing its argument. func (f *Func) ConstBool(t *types.Type, c bool) *Value { i := int64(0) if c { i = 1 } return f.constVal(OpConstBool, t, i, true) } func (f *Func) ConstInt8(t *types.Type, c int8) *Value {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 19:44:43 UTC 2024 - 25.8K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/Wasm.rules
(LoweredZero [s] destptr mem) // Lowering constants (Const64 ...) => (I64Const ...) (Const(32|16|8) [c]) => (I64Const [int64(c)]) (Const(64|32)F ...) => (F(64|32)Const ...) (ConstNil) => (I64Const [0]) (ConstBool [c]) => (I64Const [b2i(c)]) // Lowering calls (StaticCall ...) => (LoweredStaticCall ...) (ClosureCall ...) => (LoweredClosureCall ...) (InterCall ...) => (LoweredInterCall ...)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 03:56:57 UTC 2023 - 16.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/AMD64.rules
// Unsigned comparisons to 0/1 (ULT (TEST(Q|L|W|B) x x) yes no) => (First no yes) (UGE (TEST(Q|L|W|B) x x) yes no) => (First yes no) (SETB (TEST(Q|L|W|B) x x)) => (ConstBool [false]) (SETAE (TEST(Q|L|W|B) x x)) => (ConstBool [true]) // x & 1 != 0 -> x & 1 (SETNE (TEST(B|W)const [1] x)) => (AND(L|L)const [1] x) (SETB (BT(L|Q)const [0] x)) => (AND(L|Q)const [1] x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 12 19:38:41 UTC 2024 - 93.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/LOONG64.rules
(NeqB ...) => (XOR ...) (Not x) => (XORconst [1] x) // 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 ...)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 19:26:25 UTC 2023 - 31.8K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/RISCV64.rules
(Const(64|32|16|8) [val]) => (MOVDconst [int64(val)]) (Const32F [val]) => (FMVSX (MOVDconst [int64(math.Float32bits(val))])) (Const64F [val]) => (FMVDX (MOVDconst [int64(math.Float64bits(val))])) (ConstNil) => (MOVDconst [0]) (ConstBool [val]) => (MOVDconst [int64(b2i(val))]) (Addr {sym} base) => (MOVaddr {sym} [0] base) (LocalAddr <t> {sym} base mem) && t.Elem().HasPointers() => (MOVaddr {sym} (SPanchored base mem))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 14:57:07 UTC 2024 - 40.3K bytes - Viewed (0)