[all-commits] [llvm/llvm-project] 704fc6: [SelectionDAG] Prefer to use ATOMIC_LOAD extension...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Apr 21 13:50:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 704fc6542cf171c603bd387663a2de3a3fa9c4ff
      https://github.com/llvm/llvm-project/commit/704fc6542cf171c603bd387663a2de3a3fa9c4ff
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2025-04-21 (Mon, 21 Apr 2025)

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

  Log Message:
  -----------
  [SelectionDAG] Prefer to use ATOMIC_LOAD extension type over getExtendForAtomicOps() in computeKnownBits/ComputeNumSignBits. (#136600)

If an ATOMIC_LOAD has ZEXTLOAD/SEXTLOAD extension type we should trust
that over getExtendForAtomicOps().

SystemZ is the only target that uses setAtomicLoadExtAction and they
return ANY_EXTEND from getExtendForAtomicOps(). So I'm not sure there's
a way to get a contradiction currently.

Note, type legalization uses getExtendForAtomicOps() when promoting
ATOMIC_LOAD so we may not need to check getExtendForAtomicOps() for
ATOMIC_LOAD. I have not done much investigating of this.



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