[all-commits] [llvm/llvm-project] c42288: [SelectionDAGBuilder] Use address width when lower...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Wed Oct 15 15:50:00 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c422881670faf30b545362b3af2c310a6800cde5
      https://github.com/llvm/llvm-project/commit/c422881670faf30b545362b3af2c310a6800cde5
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2025-10-15 (Wed, 15 Oct 2025)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

  Log Message:
  -----------
  [SelectionDAGBuilder] Use address width when lowering ptrtoaddr

Instead of just deferring to ptrtoint, we should truncate to the index
width and then perform the ZextOrTrunc.
This is effectively NFC since ptrtoint ends up doing the same thing, but
handling it explicitly is cleaner and will make it easier to eventually
upstream the changes needed for CHERI support.

Reviewed By: nikic, arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/139423



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