[llvm-bugs] [Bug 48555] New: Poor codegen for char loads/compares on arm64
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Dec 18 13:09:33 PST 2020
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: unassignedclangbugs at nondot.org
Reporter: per.vognsen at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201218/c0cd901a/attachment.html>
More information about the llvm-bugs
mailing list