[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Duncan Sands baldrick at free.fr
Mon May 7 13:49:46 PDT 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.448 -> 1.449
---
Log message:

Parameter attributes on invoke calls were being lost due to the wrong
attribute index being used.  Fix proposed by Anton Korobeynikov, who
asked me to implement and commit it for him.  This is PR1398: http://llvm.org/PR1398 .


---
Diffs of the changes:  (+6 -4)

 SelectionDAGISel.cpp |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.448 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.449
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.448	Sun May  6 15:14:21 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Mon May  7 15:49:28 2007
@@ -2787,10 +2787,12 @@
     Value *Arg = I.getOperand(i);
     SDOperand ArgNode = getValue(Arg);
     Entry.Node = ArgNode; Entry.Ty = Arg->getType();
-    Entry.isSExt   = Attrs && Attrs->paramHasAttr(i, ParamAttr::SExt);
-    Entry.isZExt   = Attrs && Attrs->paramHasAttr(i, ParamAttr::ZExt);
-    Entry.isInReg  = Attrs && Attrs->paramHasAttr(i, ParamAttr::InReg);
-    Entry.isSRet   = Attrs && Attrs->paramHasAttr(i, ParamAttr::StructRet);
+
+    unsigned attrInd = i - OpIdx + 1;
+    Entry.isSExt  = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::SExt);
+    Entry.isZExt  = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::ZExt);
+    Entry.isInReg = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::InReg);
+    Entry.isSRet  = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::StructRet);
     Args.push_back(Entry);
   }
 






More information about the llvm-commits mailing list