aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/AMDGPUInstrInfo.td
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-06-20 16:28:01 -0400
committerTom Stellard <[email protected]>2012-06-21 20:42:06 +0000
commitc53c8d05551083437eb991e79002c0a272541a79 (patch)
tree667ab99b9bce570cafb0f70e5ff681e5d97f937b /src/gallium/drivers/radeon/AMDGPUInstrInfo.td
parentcd287301ec598d2811f3f85c03d23bae01be2359 (diff)
radeon/llvm: Lower ROTL to BIT_ALIGN
Diffstat (limited to 'src/gallium/drivers/radeon/AMDGPUInstrInfo.td')
-rw-r--r--src/gallium/drivers/radeon/AMDGPUInstrInfo.td14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/AMDGPUInstrInfo.td b/src/gallium/drivers/radeon/AMDGPUInstrInfo.td
index 5e44ef9c40b..44527196861 100644
--- a/src/gallium/drivers/radeon/AMDGPUInstrInfo.td
+++ b/src/gallium/drivers/radeon/AMDGPUInstrInfo.td
@@ -12,9 +12,23 @@
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
+// AMDGPU DAG Profiles
+//===----------------------------------------------------------------------===//
+
+def AMDGPUDTIntTernaryOp : SDTypeProfile<1, 3, [
+ SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisInt<0>, SDTCisInt<3>
+]>;
+
+//===----------------------------------------------------------------------===//
// AMDGPU DAG Nodes
//
+// out = ((a << 32) | b) >> c)
+//
+// Can be used to optimize rtol:
+// rotl(a, b) = bitalign(a, a, 32 - b)
+def AMDGPUbitalign : SDNode<"AMDGPUISD::BITALIGN", AMDGPUDTIntTernaryOp>;
+
// out = a - floor(a)
def AMDGPUfract : SDNode<"AMDGPUISD::FRACT", SDTFPUnaryOp>;