diff options
author | Tom Stellard <[email protected]> | 2012-07-25 08:30:32 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-07-27 17:08:08 +0000 |
commit | 50ff2dc0a4f553eb8d634d6f081fe5e4e25f6f48 (patch) | |
tree | acc1b4b0a305aff1f771399445614bf10302fd24 /src/gallium/drivers/radeon/SIInstrInfo.td | |
parent | c424975572af2edd46863e5bb9fe3c51c96b4f9b (diff) |
radeon/llvm: Add special nodes for SALU operations on VCC
The VCC register is tricky because the SALU views it as 64-bit, but the
VALU views it as 1-bit. In order to deal with this we've added some
special bitcast and binary operations to help convert from the 64-bit
SALU view to the 1-bit VALU view and vice versa.
Diffstat (limited to 'src/gallium/drivers/radeon/SIInstrInfo.td')
-rw-r--r-- | src/gallium/drivers/radeon/SIInstrInfo.td | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/SIInstrInfo.td b/src/gallium/drivers/radeon/SIInstrInfo.td index aac644369d9..72f03d29315 100644 --- a/src/gallium/drivers/radeon/SIInstrInfo.td +++ b/src/gallium/drivers/radeon/SIInstrInfo.td @@ -7,7 +7,26 @@ // //===----------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// +// SI DAG Profiles +//===----------------------------------------------------------------------===// +def SDTVCCBinaryOp : SDTypeProfile<1, 2, [ + SDTCisInt<0>, SDTCisInt<1>, SDTCisSameAs<1, 2> +]>; + +//===----------------------------------------------------------------------===// +// SI DAG Nodes +//===----------------------------------------------------------------------===// + +// and operation on 64-bit wide vcc +def SIvcc_and : SDNode<"SIISD::VCC_AND", SDTVCCBinaryOp, + [SDNPCommutative, SDNPAssociative] +>; +// Special bitcast node for sharing VCC register between VALU and SALU +def SIvcc_bitcast : SDNode<"SIISD::VCC_BITCAST", + SDTypeProfile<1, 1, [SDTCisInt<0>, SDTCisInt<1>]> +>; class InstSI <dag outs, dag ins, string asm, list<dag> pattern> : AMDGPUInst<outs, ins, asm, pattern> { |