diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-02-07 19:39:38 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-02-07 19:39:38 +0000 |
commit | 75ddd4cd4c726b3bf93b2a83b51d95a505ce0739 (patch) | |
tree | 83e8fd60b31e237f2619118c6ed55a196b14fa97 /lib/Target/R600/SIInstrInfo.td | |
parent | b0b1a7feeedf1b93b23fcd6e675cbced0295f632 (diff) | |
download | llvm-75ddd4cd4c726b3bf93b2a83b51d95a505ce0739.tar.gz llvm-75ddd4cd4c726b3bf93b2a83b51d95a505ce0739.tar.bz2 llvm-75ddd4cd4c726b3bf93b2a83b51d95a505ce0739.tar.xz |
R600/SI: add proper 64bit immediate support v2
v2: rebased on current upstream
Patch by: Christian König
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174652 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/SIInstrInfo.td')
-rw-r--r-- | lib/Target/R600/SIInstrInfo.td | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/R600/SIInstrInfo.td b/lib/Target/R600/SIInstrInfo.td index 9d9f5f6e1e..83ee2cffb4 100644 --- a/lib/Target/R600/SIInstrInfo.td +++ b/lib/Target/R600/SIInstrInfo.td @@ -38,6 +38,16 @@ def SIvcc_bitcast : SDNode<"SIISD::VCC_BITCAST", SDTypeProfile<1, 1, [SDTCisInt<0>, SDTCisInt<1>]> >; +// Transformation function, extract the lower 32bit of a 64bit immediate +def LO32 : SDNodeXForm<imm, [{ + return CurDAG->getTargetConstant(N->getZExtValue() & 0xffffffff, MVT::i32); +}]>; + +// Transformation function, extract the upper 32bit of a 64bit immediate +def HI32 : SDNodeXForm<imm, [{ + return CurDAG->getTargetConstant(N->getZExtValue() >> 32, MVT::i32); +}]>; + class InstSI <dag outs, dag ins, string asm, list<dag> pattern> : AMDGPUInst<outs, ins, asm, pattern> { |