[all-commits] [llvm/llvm-project] 311d11: Do not emit right shift by 0 in DWARF expressions ...

Tom Tromey via All-commits all-commits at lists.llvm.org
Fri Oct 10 07:15:39 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 311d1138e7e736f887dadba16ffb64ee9b47b159
      https://github.com/llvm/llvm-project/commit/311d1138e7e736f887dadba16ffb64ee9b47b159
  Author: Tom Tromey <tromey at adacore.com>
  Date:   2025-10-10 (Fri, 10 Oct 2025)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
    M llvm/test/DebugInfo/X86/DW_OP_LLVM_extract_bits.ll

  Log Message:
  -----------
  Do not emit right shift by 0 in DWARF expressions (#162738)

DW_OP_LLVM_extract_bits_zext and DW_OP_LLVM_extract_bits_sext can end up
emitting "DW_OP_constu 0; DW_OP_shr" when given certain arguments.
However, a shift by zero is not useful, and so it can be omitted.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list