OSDN Git Service

[SCCP] Manually fold branches on undef.
authorDavide Italiano <davide@freebsd.org>
Sat, 23 Dec 2017 15:06:30 +0000 (15:06 +0000)
committerDavide Italiano <davide@freebsd.org>
Sat, 23 Dec 2017 15:06:30 +0000 (15:06 +0000)
commit9693df320d8ade3a0346e0f6b6311767d68953d4
treeaf8b4b2e50c89ce4c532a2e360097f88fc4d986f
parent15a5e03350f3d576a0c3dce4bf0300cfb7f87f2d
[SCCP] Manually fold branches on undef.

This code was originally removed and replace with an assertion
because believed unnecessary. It turns out there was simply
no test coverage for this case, and the constant folder doesn't
yet know about patterns like `br undef %label1, %label2`.
Presumably at some point the constant folder might learn about
these patterns, but it's a broader change.
A testcase will be added to make sure this doesn't regress again
in the future.

Fixes PR35723.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321402 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SCCP.cpp