]> granicus.if.org Git - llvm/commit
[SystemZ] Handle DBG_VALUE instructions in two places in backend.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 23 Jan 2019 07:42:26 +0000 (07:42 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 23 Jan 2019 07:42:26 +0000 (07:42 +0000)
commit842b69bf631c415797c9971bccafffde5d157c7a
treef334ac900d35572449559d65ac13e742cda4c728
parent83265e9e74362e8737b5c09540873a1cc321c041
[SystemZ]  Handle DBG_VALUE instructions in two places in backend.

Two backend optimizations failed to handle cases when compiled with -g, due
to failing to consider DBG_VALUE instructions. This was in
SystemZTargetLowering::emitSelect() and
SystemZElimCompare::getRegReferences().

This patch makes sure that DBG_VALUEs are recognized so that they do not
affect these optimizations.

Tests for branch-on-count, load-and-trap and consecutive selects.

Review: Ulrich Weigand
https://reviews.llvm.org/D57048

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351928 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZElimCompare.cpp
lib/Target/SystemZ/SystemZISelLowering.cpp
test/CodeGen/SystemZ/debuginstr-00.mir [new file with mode: 0644]
test/CodeGen/SystemZ/debuginstr-01.mir [new file with mode: 0644]
test/CodeGen/SystemZ/debuginstr-02.mir [new file with mode: 0644]