[llvm] r175180 - R600: Do not fold modifier/litterals in vector inst

Vincent Lejeune vljn at ovi.com
Thu Feb 14 08:55:01 PST 2013


Author: vljn
Date: Thu Feb 14 10:55:01 2013
New Revision: 175180

URL: http://llvm.org/viewvc/llvm-project?rev=175180&view=rev
Log:
R600: Do not fold modifier/litterals in vector inst

This fixes a couple of regressions on (probably not just) cayman

NOTE: This is a candidate for the Mesa stable branch.

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

Modified:
    llvm/trunk/lib/Target/R600/AMDILISelDAGToDAG.cpp

Modified: llvm/trunk/lib/Target/R600/AMDILISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDILISelDAGToDAG.cpp?rev=175180&r1=175179&r2=175180&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDILISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDILISelDAGToDAG.cpp Thu Feb 14 10:55:01 2013
@@ -218,7 +218,9 @@ SDNode *AMDGPUDAGToDAGISel::Select(SDNod
             continue;
           }
       } else {
-        if (!TII->isALUInstr(Use->getMachineOpcode())) {
+        if (!TII->isALUInstr(Use->getMachineOpcode()) ||
+            (TII->get(Use->getMachineOpcode()).TSFlags &
+            R600_InstFlag::VECTOR)) {
           continue;
         }
 
@@ -261,7 +263,8 @@ SDNode *AMDGPUDAGToDAGISel::Select(SDNod
   if (ST.device()->getGeneration() <= AMDGPUDeviceInfo::HD6XXX) {
     const R600InstrInfo *TII =
         static_cast<const R600InstrInfo*>(TM.getInstrInfo());
-    if (Result && Result->isMachineOpcode()
+    if (Result && Result->isMachineOpcode() &&
+        !(TII->get(Result->getMachineOpcode()).TSFlags & R600_InstFlag::VECTOR)
         && TII->isALUInstr(Result->getMachineOpcode())) {
       // Fold FNEG/FABS/CONST_ADDRESS
       // TODO: Isel can generate multiple MachineInst, we need to recursively





More information about the llvm-commits mailing list