[InstructionCombining] prepareICWorklistFromFunction halts in infinite loop with...
authorChen Li <meloli87@gmail.com>
Mon, 4 Jan 2016 23:28:57 +0000 (23:28 +0000)
committerChen Li <meloli87@gmail.com>
Mon, 4 Jan 2016 23:28:57 +0000 (23:28 +0000)
commitbee229d85dd6a7d4f707a6b51f9df841a3788a6c
treea75223a340ce6b06bf6e68d9175b53efe2984c63
parent7fdf13ed48a8dfbd6e8561e5ac573cc395ffbf1b
[InstructionCombining] prepareICWorklistFromFunction halts in infinite loop with instructions of token type

Summary: This patch fixes a bug in prepareICWorklistFromFunction, where the loop becomes infinite with instructions of token type. The patch checks if the instruction is token type, and if so it updates EndInst with the current instruction.

Reviewers: reames, majnemer

Subscribers: llvm-commits, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256792 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/token.ll