llvm-6502/lib
Meador Inge 30d8f0e977 Normalize memcmp constant folding results.
The library call simplifier folds memcmp calls with all constant arguments
to a constant.  For example:

  memcmp("foo", "foo", 3) ->  0
  memcmp("hel", "foo", 3) ->  1
  memcmp("foo", "hel", 3) -> -1

The folding is implemented in terms of the system memcmp that LLVM gets
linked with.  It currently just blindly uses the value returned from
the system memcmp as the folded constant.

This patch normalizes the values returned from the system memcmp to
(-1, 0, 1) so that we get consistent results across multiple platforms.
The test cases were adjusted accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167726 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-12 14:00:45 +00:00
..
Analysis llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware. 2012-11-08 20:34:25 +00:00
Archive Mark checkSignature const, and in turn stop casting away const from 2012-09-05 22:09:23 +00:00
AsmParser Change ForceSizeOpt attribute into MinSize attribute 2012-10-30 16:32:52 +00:00
Bitcode Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change. 2012-10-15 20:35:56 +00:00
CodeGen Fix assertions in updateRegMaskSlots(). 2012-11-09 19:18:49 +00:00
DebugInfo Add a relocation visitor to lib object. This works via caching relocated 2012-11-07 23:22:07 +00:00
ExecutionEngine Fix build error from previous commit. 2012-11-06 19:06:46 +00:00
Linker Move the "findUsedStructTypes" functionality outside of the Module class. 2012-08-03 00:30:35 +00:00
MC Add ARM TARGET2 relocation. The testcase will follow with actualy use-case. 2012-11-09 20:20:12 +00:00
Object Add interface for querying object files for symbol values. 2012-10-29 10:47:00 +00:00
Support Drop the limitation to IEEE floating point types from the fdiv of pow2 -> fmul transform. 2012-11-08 13:58:10 +00:00
TableGen Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
Target Remove unused field. 2012-11-12 07:35:12 +00:00
Transforms Normalize memcmp constant folding results. 2012-11-12 14:00:45 +00:00
VMCore Include all the fields so we can correctly emit DW_TAG_structure_type for C++ structs. 2012-11-02 23:33:23 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile