Mesa (master): radeon/llvm: Expand fsub during ISel

Tom Stellard tstellar at kemper.freedesktop.org
Thu May 17 13:21:30 PDT 2012


Module: Mesa
Branch: master
Commit: 1fe70c6ae12e85cdb5967ba6d72fca8a9e5c3ec3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1fe70c6ae12e85cdb5967ba6d72fca8a9e5c3ec3

Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Thu May 17 13:13:17 2012 -0400

radeon/llvm: Expand fsub during ISel

---

 src/gallium/drivers/radeon/R600ISelLowering.cpp    |    2 ++
 .../drivers/radeon/R600LowerInstructions.cpp       |   11 -----------
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/gallium/drivers/radeon/R600ISelLowering.cpp b/src/gallium/drivers/radeon/R600ISelLowering.cpp
index 4db40f7..1fffb99 100644
--- a/src/gallium/drivers/radeon/R600ISelLowering.cpp
+++ b/src/gallium/drivers/radeon/R600ISelLowering.cpp
@@ -34,6 +34,8 @@ R600TargetLowering::R600TargetLowering(TargetMachine &TM) :
   setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::v4f32, Legal);
   setOperationAction(ISD::EXTRACT_VECTOR_ELT, MVT::v4i32, Legal);
   setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::v4i32, Legal);
+
+  setOperationAction(ISD::FSUB, MVT::f32, Expand);
 }
 
 MachineBasicBlock * R600TargetLowering::EmitInstrWithCustomInserter(
diff --git a/src/gallium/drivers/radeon/R600LowerInstructions.cpp b/src/gallium/drivers/radeon/R600LowerInstructions.cpp
index 19c3aae..a5f57cc 100644
--- a/src/gallium/drivers/radeon/R600LowerInstructions.cpp
+++ b/src/gallium/drivers/radeon/R600LowerInstructions.cpp
@@ -303,17 +303,6 @@ bool R600LowerInstructionsPass::runOnMachineFunction(MachineFunction &MF)
           break;
         }
 
-      case AMDIL::SUB_f32:
-        {
-          MI.getOperand(2).addTargetFlag(MO_FLAG_NEG);
-          BuildMI(MBB, I, MBB.findDebugLoc(I),
-                          TII->get(TII->getISAOpcode(AMDIL::ADD)))
-                  .addOperand(MI.getOperand(0))
-                  .addOperand(MI.getOperand(1))
-                  .addOperand(MI.getOperand(2));
-          break;
-        }
-
       case AMDIL::ULT:
         BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(AMDIL::SETGT_UINT))
                 .addOperand(MI.getOperand(0))



More information about the mesa-commit mailing list