[llvm-bugs] [Bug 47420] New: [SystemZ] '0 == memcmp(...)' not optimized anymore

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 4 09:40:48 PDT 2020


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

            Bug ID: 47420
           Summary: [SystemZ] '0 == memcmp(...)' not optimized anymore
           Product: libraries
           Version: trunk
          Hardware: PC
               URL: https://godbolt.org/z/q45ocv
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: SystemZ
          Assignee: unassignedbugs at nondot.org
          Reporter: slavomir.kucera at broadcom.com
                CC: llvm-bugs at lists.llvm.org, uweigand at de.ibm.com

Starting with LLVM 9, the following code

int test1(const char* l, const char* r) {
    return memcmp(l,r,2) == 0;
}

is basically transformed into 

int test1(const char* l, const char* r) {
    return bcmp(l,r,2) == 0;
}

which is not optimized by the SystemZ backend anymore - an actual function call
is generated.

https://godbolt.org/z/q45ocv

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200904/6c4b63e8/attachment.html>


More information about the llvm-bugs mailing list