[PATCH] D40085: Fix APInt bit size in processDbgDeclares

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 13:29:52 PST 2017


yaxunl added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1147
+      APInt Offset(DL.getPointerSizeInBits(
+                       isa<PointerType>(T) ? T->getPointerAddressSpace() : 0),
+                   0);
----------------
arsenm wrote:
> Is a vector of pointers allowed here? How could this never be a PointerType?
There are lit tests in which `Address` is not pointer, e.g. CodeGen/X86/selectiondag-order.ll


```
define i64 @simulateWithDbgDeclare(<2 x i32> %a) local_unnamed_addr  {
entry:
  %rand = tail call i64 @lrand48() #3
  tail call void @llvm.dbg.declare(metadata i64 %rand, metadata !6, metadata !7), !dbg !8
  br label %body

```



https://reviews.llvm.org/D40085





More information about the llvm-commits mailing list