@@ -5571,26 +5571,8 @@ bool SelectionDAGBuilder::EmitFuncArgumentDbgValue(
5571
5571
= [&](ArrayRef<std::pair<unsigned , unsigned >> SplitRegs) {
5572
5572
unsigned Offset = 0 ;
5573
5573
for (auto RegAndSize : SplitRegs) {
5574
- // If the expression is already a fragment, the current register
5575
- // offset+size might extend beyond the fragment. In this case, only
5576
- // the register bits that are inside the fragment are relevant.
5577
- int RegFragmentSizeInBits = RegAndSize.second ;
5578
- if (auto ExprFragmentInfo = Expr->getFragmentInfo ()) {
5579
- uint64_t ExprFragmentSizeInBits = ExprFragmentInfo->SizeInBits ;
5580
- // The register is entirely outside the expression fragment,
5581
- // so is irrelevant for debug info.
5582
- if (Offset >= ExprFragmentSizeInBits)
5583
- break ;
5584
- // The register is partially outside the expression fragment, only
5585
- // the low bits within the fragment are relevant for debug info.
5586
- if (Offset + RegFragmentSizeInBits > ExprFragmentSizeInBits) {
5587
- RegFragmentSizeInBits = ExprFragmentSizeInBits - Offset;
5588
- }
5589
- }
5590
-
5591
5574
auto FragmentExpr = DIExpression::createFragmentExpression (
5592
- Expr, Offset, RegFragmentSizeInBits);
5593
- Offset += RegAndSize.second ;
5575
+ Expr, Offset, RegAndSize.second );
5594
5576
// If a valid fragment expression cannot be created, the variable's
5595
5577
// correct value cannot be determined and so it is set as Undef.
5596
5578
if (!FragmentExpr) {
@@ -5603,6 +5585,7 @@ bool SelectionDAGBuilder::EmitFuncArgumentDbgValue(
5603
5585
FuncInfo.ArgDbgValues .push_back (
5604
5586
BuildMI (MF, DL, TII->get (TargetOpcode::DBG_VALUE), false ,
5605
5587
RegAndSize.first , Variable, *FragmentExpr));
5588
+ Offset += RegAndSize.second ;
5606
5589
}
5607
5590
};
5608
5591
0 commit comments