OSDN Git Service

[X86] Avoid SFB - Fix inconsistent codegen with/without debug info
authorRobert Lougher <rob.lougher@gmail.com>
Fri, 10 May 2019 15:55:06 +0000 (15:55 +0000)
committerRobert Lougher <rob.lougher@gmail.com>
Fri, 10 May 2019 15:55:06 +0000 (15:55 +0000)
commitc00a8f657a7c92e9c6826cc9913df3dbb7fb9509
tree991618700dcf582cb36b6a3b10f9e157f0463b42
parent1513e5ffeebd7a0da092f1d970d037b1a7a385cb
[X86] Avoid SFB - Fix inconsistent codegen with/without debug info

Fixes https://bugs.llvm.org/show_bug.cgi?id=40969

The functions findPotentiallyBlockedCopies and buildCopy are currently not
accounting for the presence of debug instructions. In the former this results
in the optimization not being trigerred, and in the latter results in
inconsistent codegen.

This patch enables the optimization to be performed in a debug build and
ensures the codegen is consistent with non-debug builds.

Patch by Chris Dawson.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360436 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
test/CodeGen/X86/avoid-sfb-g-no-change.mir [new file with mode: 0644]