<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/93447>93447</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            DG, a llvm-slicer issue 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Y-LONG28
      </td>
    </tr>
</table>

<pre>
     I am trying to convert Rust code to .bc using rustc and then perform program slicing with dg.
 my Rust code as follows:
```
fn main()
{       
        let a = 1; 
}
```
Compilation command:
`rustc --emit=llvm-bc -g test.rs`

Slicing command:
` ~/dg/build/tools/llvm-slicer -c  3:a -annotate slice simple_test.bc`

The error message is as follows:
```
SC: Matched '3#a' to: 
    store i32 1, i32* %a.dbg.spill, align 4, !dbg !38
 ... and  1 more
[llvm-slicer] cutoff 2 diverging blocks and 21 completely removed
 #0 0x00007cfd8d83fd01 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-14/lib/libLLVM-14.so.1+0xe3fd01)
 #1 0x00007cfd8d83da0c llvm::sys::RunSignalHandlers() (/usr/lib/llvm-14/lib/libLLVM-14.so.1+0xe3da0c)
 #2 0x00007cfd8d840236 (/usr/lib/llvm-14/lib/libLLVM-14.so.1+0xe40236)
 #3 0x00007cfd8c242520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007cfd934e84c2 llvm::Value::getValueID() const /usr/include/llvm-14/llvm/IR/Value.h:533:12
 #5 0x00007cfd934e84c2 llvm::Instruction::getOpcode() const /usr/include/llvm-14/llvm/IR/Instruction.h:158:49
 #6 0x00007cfd934e84c2 dg::pta::LLVMPointerGraphBuilder::isRelevantInstruction(llvm::Instruction const&) /home/firepunch/dg/lib/llvm/PointerAnalysis/PointerGraph.cpp:428:27
 #7 0x00007cfd934efa74 dg::pta::LLVMPointerGraphBuilder::buildPointerGraphBlock(llvm::BasicBlock const&, dg::pta::PointerSubgraph*) /home/firepunch/dg/lib/llvm/PointerAnalysis/Block.cpp:36:9
 #8 0x00007cfd934e9675 __gnu_cxx::__normal_iterator<dg::pta::LLVMPointerGraphBuilder::PSNodesSeq* const*, std::vector<dg::pta::LLVMPointerGraphBuilder::PSNodesSeq*, std::allocator<dg::pta::LLVMPointerGraphBuilder::PSNodesSeq*> > >::__normal_iterator(dg::pta::LLVMPointerGraphBuilder::PSNodesSeq* const* const&) /usr/include/c++/11/bits/stl_iterator.h:1028:9
 #9 0x00007cfd934e9675 std::vector<dg::pta::LLVMPointerGraphBuilder::PSNodesSeq*, std::allocator<dg::pta::LLVMPointerGraphBuilder::PSNodesSeq*> >::end() const /usr/include/c++/11/bits/stl_vector.h:839:16
#10 0x00007cfd934e9675 std::vector<dg::pta::LLVMPointerGraphBuilder::PSNodesSeq*, std::allocator<dg::pta::LLVMPointerGraphBuilder::PSNodesSeq*> >::empty() const /usr/include/c++/11/bits/stl_vector.h:1008:30
#11 0x00007cfd934e9675 dg::pta::LLVMPointerGraphBuilder::PSNodesBlock::empty() const /home/firepunch/dg/include/dg/llvm/PointerAnalysis/PointerGraph.h:98:49
#12 0x00007cfd934e9675 dg::pta::LLVMPointerGraphBuilder::buildFunction(llvm::Function const&) /home/firepunch/dg/lib/llvm/PointerAnalysis/PointerGraph.cpp:587:22
#13 0x00007cfd934ea28a dg::pta::LLVMPointerGraphBuilder::buildLLVMPointerGraph() /home/firepunch/dg/lib/llvm/PointerAnalysis/PointerGraph.cpp:648:24
#14 0x000056f6a413d6c2 dg::DGLLVMPointerAnalysis::buildSubgraph() /home/firepunch/dg/include/dg/llvm/PointerAnalysis/PointerAnalysis.h:288:12
#15 0x000056f6a413d6c2 dg::DGLLVMPointerAnalysis::initialize() /home/firepunch/dg/include/dg/llvm/PointerAnalysis/PointerAnalysis.h:310:22
#16 0x000056f6a413f518 std::__uniq_ptr_impl<dg::pta::PointerAnalysis, std::default_delete<dg::pta::PointerAnalysis> >::_M_ptr() const /usr/include/c++/11/bits/unique_ptr.h:173:58
#17 0x000056f6a413f518 std::unique_ptr<dg::pta::PointerAnalysis, std::default_delete<dg::pta::PointerAnalysis> >::get() const /usr/include/c++/11/bits/unique_ptr.h:422:27
#18 0x000056f6a413f518 std::unique_ptr<dg::pta::PointerAnalysis, std::default_delete<dg::pta::PointerAnalysis> >::operator->() const /usr/include/c++/11/bits/unique_ptr.h:416:12
#19 0x000056f6a413f518 dg::DGLLVMPointerAnalysis::run() /home/firepunch/dg/include/dg/llvm/PointerAnalysis/PointerAnalysis.h:332:24
#20 0x000056f6a413f518 dg::llvmdg::LLVMDependenceGraphBuilder::_runPointerAnalysis() /home/firepunch/dg/include/dg/llvm/LLVMDependenceGraphBuilder.h:80:18
#21 0x000056f6a413f518 dg::llvmdg::LLVMDependenceGraphBuilder::constructCFGOnly() /home/firepunch/dg/include/dg/llvm/LLVMDependenceGraphBuilder.h:202:28
#22 0x000056f6a413f518 Slicer::buildDG(bool) /home/firepunch/dg/tools/include/dg/tools/llvm-slicer.h:83:24
#23 0x000056f6a4135f9b main /home/firepunch/dg/tools/llvm-slicer.cpp:223:5
#24 0x00007cfd8c229d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#25 0x00007cfd8c229e40 call_init ./csu/../csu/libc-start.c:128:20
#26 0x00007cfd8c229e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#27 0x000056f6a4136655 _start (/home/firepunch/dg/build/tools/llvm-slicer+0xf655)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Segmentation fault (core dumped)

```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcWU1v2zoW_TX0hrBBkZIsLbxw4udMgfa1qB8eMCuBoiiZU4rUI6k0mcX89gEpJZIdp03TdDAzgNvS_Dj3nMvLS_qWWisaxfkGJFcg2S1o747abP6-fP_x9xucLUpd3W_gO0hb6My9UA10GjKtbr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