aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorMeador Inge <meadori@codesourcery.com>2012-11-12 14:00:45 +0000
committerMeador Inge <meadori@codesourcery.com>2012-11-12 14:00:45 +0000
commitb3e91f6ae075ca04a8f7862782d595c363496ac7 (patch)
treea7e330e876a0254fc0e8006c5034c5b9e8768842 /llvm/lib/CodeGen/MachineScheduler.cpp
parent582d7de7093e9d9609036dd6905f1fbdcec703e4 (diff)
downloadllvm-b3e91f6ae075ca04a8f7862782d595c363496ac7.zip
llvm-b3e91f6ae075ca04a8f7862782d595c363496ac7.tar.gz
llvm-b3e91f6ae075ca04a8f7862782d595c363496ac7.tar.bz2
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. llvm-svn: 167726
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
0 files changed, 0 insertions, 0 deletions