Consider attached .ll file. Running ./opt -simplify-libcalls will produce "bad" output. Resulting binary just outputs "Bad HeadURL". This breaks Python 2.5
Created attachment 758 [details] .ll File in question
This is a miscompilation of the strchr optimizer: - %tmp9 = call i8* @strchr( i8* getelementptr ([82 x i8]* @headurl, i32 0, i64 52), i32 47 ) ; <i8*> [#uses=3] - %tmp11 = getelementptr i8* %tmp9, i32 1 ; <i8*> [#uses=1] + %.strchr = getelementptr i8* getelementptr ([82 x i8]* @headurl, i32 0, i64 52), i64 18 ; <i8*> [#uses=3] + %tmp11 = getelementptr i8* %.strchr, i32 1 ; <i8*> [#uses=1] it is turning (strchr(x+123, 47)) into strchr(x+4, 47) instead of strchr(x+123+4, 47) This looks like a design flaw in getConstantStringLength, I'm working on it.
Is this done now?
This specific one is, but there are other problems.
This is now fixed, with many patches.