InstCombine: Fix another infinite loop caused by visitFPTrunc
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 18 Nov 2014 22:06:45 +0000 (22:06 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 18 Nov 2014 22:06:45 +0000 (22:06 +0000)
commitc6b8e20a5c59d8635ecf7141e700dafae782602e
tree9d8154a5c5ba5095ee6229301002792ab7c58c76
parentef202d96c79f4a3c3f0ed15de073be9a012de92e
InstCombine: Fix another infinite loop caused by visitFPTrunc

We would attempt to replace an frem's operand with the same operand.
This would cause InstCombine to think real work was done, causing
InstCombine to enter an infinite loop.

This fixes the second part of PR21576.

llvm-svn: 222265
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/fpcast.ll