aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/AMDGPUInstructions.td
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-05-25 10:29:09 -0400
committerTom Stellard <[email protected]>2012-05-25 15:40:58 -0400
commit17f852892346fdf3b1e9eec56b7a55c470279bc8 (patch)
treef5ff63b1fde8173bff34d757bcdeb1c71311cad8 /src/gallium/drivers/radeon/AMDGPUInstructions.td
parent2df2c31087770a6e4e79f90fe096e370cd632e00 (diff)
radeon/llvm: Use a custom inserter to lower FABS
Diffstat (limited to 'src/gallium/drivers/radeon/AMDGPUInstructions.td')
-rw-r--r--src/gallium/drivers/radeon/AMDGPUInstructions.td14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/AMDGPUInstructions.td b/src/gallium/drivers/radeon/AMDGPUInstructions.td
index 291081fef43..e1ace508e88 100644
--- a/src/gallium/drivers/radeon/AMDGPUInstructions.td
+++ b/src/gallium/drivers/radeon/AMDGPUInstructions.td
@@ -47,7 +47,19 @@ let isCodeGenOnly = 1 in {
"MASK_WRITE $src",
[]
>;
-}
+
+let isPseudo = 1, usesCustomInserter = 1 in {
+
+class FABS <RegisterClass rc> : AMDGPUShaderInst <
+ (outs rc:$dst),
+ (ins rc:$src0),
+ "FABS $dst, $src0",
+ [(set rc:$dst, (fabs rc:$src0))]
+>;
+
+} // End isPseudo = 1, hasCustomInserter = 1
+
+} // End isCodeGenOnly = 1
/* Generic helper patterns for intrinsics */
/* -------------------------------------- */