diff options
author | Tom Stellard <[email protected]> | 2012-07-19 13:26:41 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-07-27 17:08:07 +0000 |
commit | ba76684292e568c164cb7cbe7537181af4b452b8 (patch) | |
tree | dfe8d38081aeae03ea6e16a7dfbb6b260f159365 /src | |
parent | d36455ba2c3febe5da6fc6f53e4acd98f771532a (diff) |
radeon/llvm: Move conditional pattern leafs to common tablegen file
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeon/AMDGPUInstructions.td | 41 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/R600Instructions.td | 41 |
2 files changed, 41 insertions, 41 deletions
diff --git a/src/gallium/drivers/radeon/AMDGPUInstructions.td b/src/gallium/drivers/radeon/AMDGPUInstructions.td index 81b58c16e0f..c8a7db6c772 100644 --- a/src/gallium/drivers/radeon/AMDGPUInstructions.td +++ b/src/gallium/drivers/radeon/AMDGPUInstructions.td @@ -33,6 +33,47 @@ class AMDGPUShaderInst <dag outs, dag ins, string asm, list<dag> pattern> } +def COND_EQ : PatLeaf < + (cond), + [{switch(N->get()){{default: return false; + case ISD::SETOEQ: case ISD::SETUEQ: + case ISD::SETEQ: return true;}}}] +>; + +def COND_NE : PatLeaf < + (cond), + [{switch(N->get()){{default: return false; + case ISD::SETONE: case ISD::SETUNE: + case ISD::SETNE: return true;}}}] +>; +def COND_GT : PatLeaf < + (cond), + [{switch(N->get()){{default: return false; + case ISD::SETOGT: case ISD::SETUGT: + case ISD::SETGT: return true;}}}] +>; + +def COND_GE : PatLeaf < + (cond), + [{switch(N->get()){{default: return false; + case ISD::SETOGE: case ISD::SETUGE: + case ISD::SETGE: return true;}}}] +>; + +def COND_LT : PatLeaf < + (cond), + [{switch(N->get()){{default: return false; + case ISD::SETOLT: case ISD::SETULT: + case ISD::SETLT: return true;}}}] +>; + +def COND_LE : PatLeaf < + (cond), + [{switch(N->get()){{default: return false; + case ISD::SETOLE: case ISD::SETULE: + case ISD::SETLE: return true;}}}] +>; + class Constants { int TWO_PI = 0x40c90fdb; int PI = 0x40490fdb; diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td index f96bd157da7..082c0b38527 100644 --- a/src/gallium/drivers/radeon/R600Instructions.td +++ b/src/gallium/drivers/radeon/R600Instructions.td @@ -130,47 +130,6 @@ def TEX_SHADOW : PatLeaf< }] >; -def COND_EQ : PatLeaf < - (cond), - [{switch(N->get()){{default: return false; - case ISD::SETOEQ: case ISD::SETUEQ: - case ISD::SETEQ: return true;}}}] ->; - -def COND_NE : PatLeaf < - (cond), - [{switch(N->get()){{default: return false; - case ISD::SETONE: case ISD::SETUNE: - case ISD::SETNE: return true;}}}] ->; -def COND_GT : PatLeaf < - (cond), - [{switch(N->get()){{default: return false; - case ISD::SETOGT: case ISD::SETUGT: - case ISD::SETGT: return true;}}}] ->; - -def COND_GE : PatLeaf < - (cond), - [{switch(N->get()){{default: return false; - case ISD::SETOGE: case ISD::SETUGE: - case ISD::SETGE: return true;}}}] ->; - -def COND_LT : PatLeaf < - (cond), - [{switch(N->get()){{default: return false; - case ISD::SETOLT: case ISD::SETULT: - case ISD::SETLT: return true;}}}] ->; - -def COND_LE : PatLeaf < - (cond), - [{switch(N->get()){{default: return false; - case ISD::SETOLE: case ISD::SETULE: - case ISD::SETLE: return true;}}}] ->; - class EG_CF_RAT <bits <8> cf_inst, bits <6> rat_inst, bits<4> rat_id, dag outs, dag ins, string asm, list<dag> pattern> : InstR600ISA <outs, ins, asm, pattern> |