https://bugs.llvm.org/show_bug.cgi?id=41770
Bug ID: 41770
Summary: Generated code contains unnecessary movzx
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangb...@nondot.org
Reporter: mv...@google.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
I ran into this playing around with alternative SSO encodings and simplified in
godbolt. https://gcc.godbolt.org/z/n2BNiB
It correctly recognizes the jns opportunity, but then adds an additional movzx
at the end.
GetLength(str const&):
movzx eax, BYTE PTR [rdi+15]
sub al, 15
js .L2
movzx eax, al
ret
.L2:
movabs rax, 9223372036854775807
and rax, QWORD PTR [rdi+8]
ret
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs