[Assignment Tracking][SROA] Fix fragment when slice size equals variable size
Correctly handle the case of splitting an alloca which backs contiguous distinct variables, where a slice's size equals the size of a backed variable. We need to ensure that we don't generate fragments expressions with fragments of the same size as the variable as this is a verifier error. Prior to this patch a fragment expression would be created in this situation. e.g. splitting an alloca i64 with two adjacent 32-bit variables into two 32-bit allocas, the new dbg.assign expressions would contain (DW_OP_LLVM_fragment, 0, 32) and (DW_OP_LLVM_fragment, 32, 32) even though those fragments cover each variable entirely. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D147696
Loading
Please sign in to comment