part of PR4405: disable a contentious optimization for

strcmp -> memcmp when the lengths of the strings are unknown.

Patch by Nick Lewycky!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-06-19 04:17:36 +00:00
parent 10382fb71d
commit 849832c0fb
2 changed files with 3 additions and 15 deletions
@@ -1,10 +0,0 @@
; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep call.*memcmp
@.str = internal constant [2 x i8] c"x\00"
declare i32 @strcmp(i8* %dest, i8* %src)
define i32 @foo(i8* %x, i8* %y) {
%A = call i32 @strcmp(i8* %x, i8* getelementptr ([2 x i8]* @.str, i32 0, i32 0))
ret i32 %A
}