llvm-6502/lib
Meador Inge a241b58f8d instcombine: Don't replace all uses for instructions with no uses
My commit to migrate the printf simplifiers from the simplify-libcalls
in r168604 introduced a regression reported by Duncan [1].  The problem
is that in some cases the library call simplifier can return a new value
that has no uses and the new value's type is different than the old value's
type (which is fine because there are no uses).  The specific case that
triggered the bug looked something like:

   declare void @printf(i8*, ...)
   ...
   call void (i8*, ...)* @printf(i8* %fmt)

Which we want to optimized into:

   call i32 @putchar(i32 104)

However, the code was attempting to replace all uses of the printf with
the putchar and the types differ, hence a crash.  This is fixed by *just*
deleting the original instruction when there are no uses.  The old
simplify-libcalls pass is already doing something similar.

[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/056338.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168716 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-27 18:52:49 +00:00
..
Analysis SCEV: Even if the latch terminator is foldable we can't deduce the result of an unrelated condition with it. 2012-11-27 18:16:32 +00:00
Archive Mark checkSignature const, and in turn stop casting away const from 2012-09-05 22:09:23 +00:00
AsmParser Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
Bitcode Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
CodeGen Remove duplicated #includes. 2012-11-27 18:27:14 +00:00
DebugInfo The section is .debug_line. 2012-11-27 01:40:36 +00:00
ExecutionEngine IntelJITEventsWrapper.h: Prune two members, FinalizeThreadFunc and FinalizeProcessFunc, for now. [-Wunused-private-field] 2012-11-22 13:18:37 +00:00
Linker Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
MC This patch implements medium code model support for 64-bit PowerPC. 2012-11-27 17:35:46 +00:00
Object s/assert/llvm_unreachable/ 2012-11-14 17:58:11 +00:00
Support Allow using MemoryBuffers with yaml::Stream directly. 2012-11-19 23:21:47 +00:00
TableGen Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
Target X86: do not fold load instructions such as [V]MOVS[S|D] to other instructions 2012-11-27 18:09:26 +00:00
Transforms instcombine: Don't replace all uses for instructions with no uses 2012-11-27 18:52:49 +00:00
VMCore Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile