http://llvm.org/bugs/show_bug.cgi?id=11181

           Summary: suboptimal code generation in strlen constant folding
           Product: new-bugs
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


target datalayout =
"e-p:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-f80:32:32-v64:64:64-v128:128:128-a0:0:64"

declare i32 @strlen(i8* noalias nocapture) nounwind readonly
@nullstring = internal constant i8 0

define i32 @main() {
  %len = tail call i32 @strlen(i8* @nullstring) nounwind
  ret i32 %len
}

strlen does not seem to look at the data behind @nullstring when it does not
have a specific format

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to