[all-commits] [llvm/llvm-project] 8d2efd: [DAG] Avoid ComputeNumSignBits call when we know t...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Oct 29 10:35:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d2efd7427ff01277f68a95ec27b83193c1c15fb
      https://github.com/llvm/llvm-project/commit/8d2efd7427ff01277f68a95ec27b83193c1c15fb
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2023-10-29 (Sun, 29 Oct 2023)

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

  Log Message:
  -----------
  [DAG] Avoid ComputeNumSignBits call when we know the result is unsigned

D146121 needs to set the NSW flag, but given the result is NUW then we know that the result has leading zeros, so we don't need to call ComputeNumSignBits - just reuse the existing KnownBits value instead.




More information about the All-commits mailing list