[all-commits] [llvm/llvm-project] c2bce8: [GlobalISel] Fix CSEMIRBuilder silently allowing u...

AE via All-commits all-commits at lists.llvm.org
Mon Oct 5 11:00:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c2bce848ecae0e17883e7cc4b8054c1e12ef1f98
      https://github.com/llvm/llvm-project/commit/c2bce848ecae0e17883e7cc4b8054c1e12ef1f98
  Author: Amara Emerson <amara at apple.com>
  Date:   2020-10-05 (Mon, 05 Oct 2020)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-implicit-def.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-constant.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-flat.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-global.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-local.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-private.mir
    M llvm/unittests/CodeGen/GlobalISel/CSETest.cpp

  Log Message:
  -----------
  [GlobalISel] Fix CSEMIRBuilder silently allowing use-before-def.

If a CSEMIRBuilder query hits the instruction at the current insert point,
move insert point ahead one so that subsequent uses of the builder don't end up with
uses before defs.

This fix also shows that AMDGPU was also affected by this bug often, but got away
with it because it was using a G_IMPLICIT_DEF before the use.

Differential Revision: https://reviews.llvm.org/D88605




More information about the All-commits mailing list