https://bugs.llvm.org/show_bug.cgi?id=39091

            Bug ID: 39091
           Summary: Missed strlen(globalconststr) fold
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedb...@nondot.org
          Reporter: david.bolvan...@gmail.com
                CC: llvm-bugs@lists.llvm.org

Currently, LLVM refuses to fold:

const char *key = "data"; // folded if key[]

int key_len(void) {
    return strlen(key);
}


Probably we need to support it in GetStringLength in ValueTracking.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to