FastISel needs to remove dead code when it bails out.
authorPaul Robinson <paul_robinson@playstation.sony.com>
Mon, 14 Dec 2015 18:33:18 +0000 (18:33 +0000)
committerPaul Robinson <paul_robinson@playstation.sony.com>
Mon, 14 Dec 2015 18:33:18 +0000 (18:33 +0000)
commit16cba6923a59f37985c34484a64879b7bca263bd
tree6bd390643b770bd51a011431ab4a27c9816b7960
parentdb0b22110a900bf2dd8d773559d32e4022f25c64
FastISel needs to remove dead code when it bails out.

When FastISel fails to translate an instruction it hands off code
generation to SelectionDAG. Before it does so, it may have generated
local value instructions to feed phi nodes in successor blocks. These
instructions will then be generated again by SelectionDAG, causing
duplication and less efficient code, including extra spill
instructions.

Patch by Wolfgang Pieb!

Differential Revision: http://reviews.llvm.org/D11768

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255520 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/FastISel.h
lib/CodeGen/SelectionDAG/FastISel.cpp
test/CodeGen/X86/fast-isel-deadcode.ll [new file with mode: 0644]