[all-commits] [llvm/llvm-project] a03eeb: [SelectionDAG][X86] Add a NoWrap flag to Selection...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Apr 30 16:53:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a03eeb0e98fefa24b3f596221942814178518703
      https://github.com/llvm/llvm-project/commit/a03eeb0e98fefa24b3f596221942814178518703
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/SelectionDAG.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
    M llvm/test/CodeGen/X86/pr90668.ll

  Log Message:
  -----------
  [SelectionDAG][X86] Add a NoWrap flag to SelectionDAG::isAddLike. NFC (#90681)

If this flag is set, Xor will not be considered AddLike. If an Xor were
treated as an Add it may wrap. If we can prove there would be no carry out and
thus no wrap, the Xor would be turned into a disjoint Or by DAGCombine.

Use this new flag to fix a bug in X86 where an Xor is incorrectly being treated
as an NUWAdd.

Fixes #90668.



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