ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

SFPCOMPC

T1 tenstorrent simd insn
SFPCOMPC (Conditionally invert vector conditional execution state)
SourceTenstorrent Official Tensix ISA Documentation (Wormhole & Blackhole) (tenstorrent_tt_isa)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeBlackholeA0 / WormholeB0
Tenstorrent Wormhole B0 & Blackhole A0
License & VersionApache-2.0
main
Upstreamhttps://github.com/tenstorrent/tt-isa-documentation
Privilegeuser
ExtensionsTensix, Vector Unit, BlackholeA0, WormholeB0

Summary

Used to implement else when a compiler maps SIMT if / else onto the vector conditional execution stack.

Syntax / Encoding

TT_SFPCOMPC(0, 0, /* u4 */ VD, 0)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32Tensix-32b10001011xxxxxxxxxxxxxxxxxxxxxxxx0xff000000 / 0x8b000000

Operands

NameDescription
VD

Reference Notes

# `SFPCOMPC` (Conditionally invert vector conditional execution state)

**Summary:** Used to implement `else` when a compiler maps SIMT `if` / `else` onto the vector conditional execution stack.

**Backend execution unit:** [Vector Unit (SFPU)](VectorUnit.md), simple sub-unit

## Syntax

```c
TT_SFPCOMPC(0, 0, /* u4 */ VD, 0)
```

## Encoding

![](../../../Diagrams/Out/Bits32_SFPCOMPC.svg)

## Functional model

```c
lanewise {
  if (VD < 12 || LaneConfig.DISABLE_BACKDOOR_LOAD) {
    // Peek at stack top.
    FlagStackEntry Top;
    if (FlagStack.IsEmpty()) {
      Top.UseLaneFlagsForLaneEnable = true;
      Top.LaneFlags = true;
    } else {
      Top = FlagStack.Top();
    }

    // Invert LaneFlags, subject to Top.
    if (Top.UseLaneFlagsForLaneEnable && UseLaneFlagsForLaneEnable) {
      LaneFlags = Top.LaneFlags && !LaneFlags;
    } else {
      LaneFlags = false;
    }
  }
}
```