commit | 95dd4420419a6daae6304ed490a50537094ed488 | [log] [tgz] |
---|---|---|
author | Bill Wendling <isanbard@gmail.com> | Tue May 01 22:50:45 2012 +0000 |
committer | Bill Wendling <isanbard@gmail.com> | Tue May 01 22:50:45 2012 +0000 |
tree | 6708c49e7890e72dd4af36deaec6f57372f51ba6 | |
parent | 902337092fef14ce2519b4c93c37d72bf66ce768 [diff] [blame] |
Strip the pointer casts off of allocas so that the selection DAG can find them. PR10799 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155954 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 94cb958..f1e879b 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -5050,7 +5050,7 @@ } case Intrinsic::gcroot: if (GFI) { - const Value *Alloca = I.getArgOperand(0); + const Value *Alloca = I.getArgOperand(0)->stripPointerCasts(); const Constant *TypeMap = cast<Constant>(I.getArgOperand(1)); FrameIndexSDNode *FI = cast<FrameIndexSDNode>(getValue(Alloca).getNode());