div/rem by zero and div/rem overflow are both undefined according to
authorChris Lattner <sabre@nondot.org>
Mon, 19 Jan 2009 21:55:26 +0000 (21:55 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 19 Jan 2009 21:55:26 +0000 (21:55 +0000)
commitc9a005807ab46d03a3b24f84220542c6eb84e9d1
treef32a38e134ade7125ca0ded5c4377b4da147f57b
parentdbe664adcddd8610952968d86791478c874cf1cd
div/rem by zero and div/rem overflow are both undefined according to
langref.  Constant fold them to undef instead of trying to preserve
the trap.  This fixes PR3354.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62534 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/ConstantFold.cpp