summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/R600ISelLowering.cpp
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/R600ISelLowering.cpp
parent2df2c31087770a6e4e79f90fe096e370cd632e00 (diff)
radeon/llvm: Use a custom inserter to lower FABS
Diffstat (limited to 'src/gallium/drivers/radeon/R600ISelLowering.cpp')
-rw-r--r--src/gallium/drivers/radeon/R600ISelLowering.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/R600ISelLowering.cpp b/src/gallium/drivers/radeon/R600ISelLowering.cpp
index 05a31d3ff9b..4d789cb22b6 100644
--- a/src/gallium/drivers/radeon/R600ISelLowering.cpp
+++ b/src/gallium/drivers/radeon/R600ISelLowering.cpp
@@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//
#include "R600ISelLowering.h"
+#include "AMDGPUUtil.h"
#include "R600InstrInfo.h"
#include "R600MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
@@ -100,6 +101,13 @@ MachineBasicBlock * R600TargetLowering::EmitInstrWithCustomInserter(
lowerImplicitParameter(MI, *BB, MRI, 8);
break;
+ case AMDIL::FABS_R600:
+ MI->getOperand(1).addTargetFlag(MO_FLAG_ABS);
+ BuildMI(*BB, I, BB->findDebugLoc(I), TII->get(AMDIL::MOV))
+ .addOperand(MI->getOperand(0))
+ .addOperand(MI->getOperand(1));
+ break;
+
case AMDIL::R600_LOAD_CONST:
{
int64_t RegIndex = MI->getOperand(1).getImm();