Skip to content
Commit 51b75b8c authored by Owen Anderson's avatar Owen Anderson
Browse files

Fix an infinite loop in InstCombine when an instruction with no users and side...

Fix an infinite loop in InstCombine when an instruction with no users and side effects can be constant folded.

ReplaceInstUsesWith needs to return nullptr when the input has no users,
because in that case it does not mutate the program.  Otherwise, we can
get stuck in an infinite loop of repeatedly attempting to constant fold
and instruction with no users.

llvm-svn: 231755
parent eb26ddf5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment