diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-11-13 20:23:36 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-11-13 20:23:36 +0000 |
commit | 1a179e821947e4ef516058a1ec0de570f58cda74 (patch) | |
tree | 32199637f524a15b99a69e0fff46bcea10691f83 /llvm/lib | |
parent | 6ef66144f3e9512d11caeb46425c12a1e0d817f8 (diff) | |
download | bcm5719-llvm-1a179e821947e4ef516058a1ec0de570f58cda74.tar.gz bcm5719-llvm-1a179e821947e4ef516058a1ec0de570f58cda74.zip |
R600/SI: Fix definition for s_cselect_b32
These were directly using the old base instruction
class, and specifying the wrong register classes
for operands. The operands can be the other special
inputs besides SGPRs. The op name was also being
directly used for the asm string, so this was printed
without any operands.
llvm-svn: 221921
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/R600/SIInstrInfo.td | 5 | ||||
-rw-r--r-- | llvm/lib/Target/R600/SIInstructions.td | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Target/R600/SIInstrInfo.td b/llvm/lib/Target/R600/SIInstrInfo.td index 0ea08ea3fbb..6e098cd1dc1 100644 --- a/llvm/lib/Target/R600/SIInstrInfo.td +++ b/llvm/lib/Target/R600/SIInstrInfo.td @@ -340,6 +340,11 @@ class SOP2_32 <bits<7> op, string opName, list<dag> pattern> : SOP2 < opName#" $dst, $src0, $src1", pattern >; +class SOP2_SELECT_32 <bits<7> op, string opName, list<dag> pattern> : SOP2 < + op, (outs SReg_32:$dst), (ins SSrc_32:$src0, SSrc_32:$src1, SCCReg:$scc), + opName#" $dst, $src0, $src1 [$scc]", pattern +>; + class SOP2_64 <bits<7> op, string opName, list<dag> pattern> : SOP2 < op, (outs SReg_64:$dst), (ins SSrc_64:$src0, SSrc_64:$src1), opName#" $dst, $src0, $src1", pattern diff --git a/llvm/lib/Target/R600/SIInstructions.td b/llvm/lib/Target/R600/SIInstructions.td index 2d730b50399..14ad4529ab8 100644 --- a/llvm/lib/Target/R600/SIInstructions.td +++ b/llvm/lib/Target/R600/SIInstructions.td @@ -214,9 +214,8 @@ def S_MAX_U32 : SOP2_32 <0x00000009, "s_max_u32", [(set i32:$dst, (AMDGPUumax i32:$src0, i32:$src1))] >; -def S_CSELECT_B32 : SOP2 < - 0x0000000a, (outs SReg_32:$dst), - (ins SReg_32:$src0, SReg_32:$src1, SCCReg:$scc), "s_cselect_b32", +def S_CSELECT_B32 : SOP2_SELECT_32 < + 0x0000000a, "s_cselect_b32", [] >; |