]> granicus.if.org Git - llvm/commit
[Cloner] Re-map simplfied cloned instructions.
authorDavide Italiano <davide@freebsd.org>
Sat, 1 Jul 2017 03:29:33 +0000 (03:29 +0000)
committerDavide Italiano <davide@freebsd.org>
Sat, 1 Jul 2017 03:29:33 +0000 (03:29 +0000)
commitb7a280badb5e2889ea845b4196f8d3f90f8032d7
treee235d871c51da3f2ff743568208b7a19e9554638
parent4da9193a6561b1a0f539ad8ef8c496e7b6bc0b14
[Cloner] Re-map simplfied cloned instructions.

This commit pretty much rolls back the logic added in r306495
as in the testcase provided we simplify an `icmp` looking through
a PHI that hasn't been mapped yet.

I think instsimplify shouldn't do threading over select/phis or
just looking through phis in general, but this is what we have
now. Also, add a test to prevent this from happening in case somebody
wants to modify this code again.

Briefly discussed with Kyle Butt (thanks Kyle!).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306938 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/CloneFunction.cpp
test/Transforms/Inline/pr33637.ll [new file with mode: 0644]