summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorMeador Inge <meadori@codesourcery.com>2012-11-11 07:10:25 +0000
committerMeador Inge <meadori@codesourcery.com>2012-11-11 07:10:25 +0000
commit9493eb9bc40b235c629ad7fecdbec1e792f58879 (patch)
tree73381608d1868d813616515c01e6cbab78218f2c /clang/lib/Basic/IdentifierTable.cpp
parent158a31abe2c25f35cdc13ce0b6d090235b7697c8 (diff)
downloadbcm5719-llvm-9493eb9bc40b235c629ad7fecdbec1e792f58879.tar.gz
bcm5719-llvm-9493eb9bc40b235c629ad7fecdbec1e792f58879.zip
Remove hard-coded constant in Transforms/InstCombine/memcmp-1.ll
Transforms/InstCombine/memcmp-1.ll has a test case that looks like: @foo = constant [4 x i8] c"foo\00" @hel = constant [4 x i8] c"hel\00" ... %mem1 = getelementptr [4 x i8]* @hel, i32 0, i32 0 %mem2 = getelementptr [4 x i8]* @foo, i32 0, i32 0 %ret = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 3) ret i32 %ret ; CHECK: ret i32 2 The folded return value (2 above) is computed using the system memcmp that the compiler is linked with. This can return different values on different systems. The test was originally written on an OS X 10.7.5 x86-64 box and passed. However, it failed on one of the x86-64 FreeBSD buildbots because the system memcpy on that machine returned a different value (1 instead of 2). I fixed the test by checking the folding constants with regexes. llvm-svn: 167691
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud