llvm-6502/lib
Dan Gohman 8ca83b4111 Remove the folding rule
getelementptr (i8* inttoptr (i64 1 to i8*), i32 -1) 
  to
  inttoptr (i64 0 to i8*)
from the VMCore constant folder. It didn't handle sign-extension properly
in the case where the source integer is smaller than a pointer size. And,
it relied on an assumption about sizeof(i8).

The Analysis constant folder still folds these kinds of things; it has
access to TargetData, so it can do them right.

Add a testcase which tests that the VMCore constant folder doesn't
miscompile this, and that the Analysis folder does fold it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 18:08:26 +00:00
..
Analysis Check Type::isSized before calling ScalarEvolution::getAllocSizeExpr, 2010-01-28 06:32:46 +00:00
Archive Kill ModuleProvider and ghost linkage by inverting the relationship between 2010-01-27 20:34:15 +00:00
AsmParser Kill ModuleProvider and ghost linkage by inverting the relationship between 2010-01-27 20:34:15 +00:00
Bitcode Kill ModuleProvider and ghost linkage by inverting the relationship between 2010-01-27 20:34:15 +00:00
CodeGen add target hooks for emitting random gunk before and after the function body. 2010-01-28 01:58:58 +00:00
CompilerDriver Better error message. 2010-01-26 14:55:16 +00:00
ExecutionEngine Replace strcpy with memcpy when we have the length around anyway. 2010-01-28 18:04:38 +00:00
Linker Need to recurse for all operands of function-local metadata; and handle Instructions (which map to themselves) 2010-01-27 22:03:03 +00:00
MC use EmitLinkage for functions as well as globals. One output 2010-01-26 23:51:52 +00:00
Support Replace strcpy with memcpy when we have the length around anyway. 2010-01-28 18:04:38 +00:00
System Add llvm::Program::ChangeStderrToBinary(). 2010-01-28 06:42:08 +00:00
Target Replace strcpy with memcpy when we have the length around anyway. 2010-01-28 18:04:38 +00:00
Transforms Fix PR6165. The bug was that LHSKnownZero was being and'd with DemandedMask 2010-01-28 17:22:42 +00:00
VMCore Remove the folding rule 2010-01-28 18:08:26 +00:00
Makefile remove llvm-db: it is completely broken and if anyone wants to do a debugger, 2009-10-05 02:29:51 +00:00