R600/SI: Fix asam errors in SIFoldOperands
[oota-llvm.git] / lib / Target / R600 / SIFoldOperands.cpp
index a1feeb44a8e5ef3b930687bcc17d622f5c5bc2a5..ae4b05d66956539887165912c8324e3ffc465373 100644 (file)
@@ -203,7 +203,8 @@ bool SIFoldOperands::runOnMachineFunction(MachineFunction &MF) {
         const MachineOperand &UseOp = UseMI->getOperand(Use.getOperandNo());
 
         // FIXME: Fold operands with subregs.
-        if (UseOp.isReg() && UseOp.getSubReg() && OpToFold.isReg()) {
+        if (UseOp.isReg() && ((UseOp.getSubReg() && OpToFold.isReg()) ||
+            UseOp.isImplicit())) {
           continue;
         }