[all-commits] [llvm/llvm-project] ee8668: [Statepoints][ISEL] gc.relocate uniquification sho...

dantrushin via All-commits all-commits at lists.llvm.org
Mon Sep 21 05:45:16 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ee86688b81751c57ca5b24e462194ea5522345c4
      https://github.com/llvm/llvm-project/commit/ee86688b81751c57ca5b24e462194ea5522345c4
  Author: Denis Antrushin <dantrushin at gmail.com>
  Date:   2020-09-21 (Mon, 21 Sep 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
    M llvm/test/CodeGen/X86/statepoint-vreg-details.ll

  Log Message:
  -----------
  [Statepoints][ISEL] gc.relocate uniquification should be based on SDValue, not IR Value.

When exporting statepoint results to virtual registers we try to avoid
generating exports for duplicated inputs. But we erroneously use
IR Value* to check if inputs are duplicated. Instead, we should use
SDValue, because even different IR values can get lowered to the same
SDValue.
I'm adding a (degenerate) test case which emphasizes importance of this
feature for invoke statepoints.
If we fail to export only unique values we will end up with something
like that:

  %0 = STATEPOINT
  %1 = COPY %0

landing_pad:
  <use of %1>

And when exceptional path is taken, %1 is left uninitialized (COPY is never
execute).

Reviewed By: reames

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




More information about the All-commits mailing list