Resubmit r360436 "[X86] Avoid SFB - Fix inconsistent codegen with/without debug info"
authorRobert Lougher <rob.lougher@gmail.com>
Thu, 23 May 2019 18:15:12 +0000 (18:15 +0000)
committerRobert Lougher <rob.lougher@gmail.com>
Thu, 23 May 2019 18:15:12 +0000 (18:15 +0000)
commit170dfeb2ff06d6eb9157054c9b321a5bb2fc10f7
tree9b6fdbea6c000d37dee58575fc771ec4f27348a3
parente18b5c62376ce5258c19ba60358cffd9e8fa67bd
Resubmit r360436 "[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

llvm-svn: 361527
llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
llvm/test/CodeGen/X86/avoid-sfb-g-no-change.mir [new file with mode: 0644]