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

            Bug ID: 48555
           Summary: Poor codegen for char loads/compares on arm64
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

Here is a repro with a .c file and the corresponding .s file built with clang
-O3 -c -S: https://gist.github.com/pervognsen/e1a5ba99ede4b630ed08df8ded87f27e

These redundant instructions are the issue:

and w9, w9, #0xff

The defs for w9 are ldrb instructions, so there is no need for these masking
operations before the compares.

(This issue was first discovered with Apple's build of clang that ships in the
latest Xcode toolchain, but I reproduced it with a self-built version from
trunk.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to