[all-commits] [llvm/llvm-project] 7d6ca2: InferAddressSpaces: Fix assert with unreachable code

Ta-Wei Tu via All-commits all-commits at lists.llvm.org
Tue Sep 15 12:49:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d6ca2ec57073b9eabe6808ff1fe0560586c5ffb
      https://github.com/llvm/llvm-project/commit/7d6ca2ec57073b9eabe6808ff1fe0560586c5ffb
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-09-15 (Tue, 15 Sep 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
    A llvm/test/Transforms/InferAddressSpaces/AMDGPU/self-phi.ll
    A llvm/test/Transforms/InferAddressSpaces/AMDGPU/unreachable-code-assert.ll

  Log Message:
  -----------
  InferAddressSpaces: Fix assert with unreachable code

Invalid IR in unreachable code is technically valid IR. In this case,
the address space of the value was never inferred, and we tried to
rewrite it with an invalid address space value which would assert.


  Commit: 38ecd6161993ea9632efe0c0bf304bf6c2dee98f
      https://github.com/llvm/llvm-project/commit/38ecd6161993ea9632efe0c0bf304bf6c2dee98f
  Author: Ta-Wei Tu <tu.da.wei at gmail.com>
  Date:   2020-09-15 (Tue, 15 Sep 2020)

  Changed paths:
    M llvm/utils/TableGen/CodeGenRegisters.cpp

  Log Message:
  -----------
  [TableGen] Fix invalid comparison function `SizeOrder` in `getMatchingSubClassWithSubRegs`

Building LLVM with -DEXPENSIVE_CHECKS fails with the following error
message with libstdc++ in debug mode:

Error: comparison doesn't meet irreflexive requirements,
assert(!(a < a)).

The patch fixes the comparison function SizeOrder by returning false
when comparing two equal items.


Compare: https://github.com/llvm/llvm-project/compare/f1a3ab904439...38ecd6161993


More information about the All-commits mailing list