https://bugs.llvm.org/show_bug.cgi?id=45650
Bug ID: 45650
Summary: Inefficient codegen for postincrement of _ExtInt(256)
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: arthur.j.odw...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
The following source code:
// https://wide.godbolt.org/z/t6j6Z-
using uint256 = unsigned _ExtInt(256);
extern auto inc2(uint256& a)
{
return a++;
}
produces the following x86-64 assembly at -O3:
inc2(unsigned int _ExtInt<256>&): # @inc2(unsigned int _ExtInt<256>&)
pushq %rbx
movq %rdi, %rax
movq 24(%rsi), %r8
movq 16(%rsi), %r11
movq (%rsi), %r9
movq 8(%rsi), %r10
movq %r9, %rdi
addq $1, %rdi
movq %r10, %rcx
adcq $0, %rcx
movq %r11, %rdx
adcq $0, %rdx
movq %r8, %rbx
adcq $0, %rbx
movq %rdi, (%rsi)
movq %rcx, 8(%rsi)
movq %rdx, 16(%rsi)
movq %rbx, 24(%rsi)
movq %r11, 16(%rax)
movq %r8, 24(%rax)
movq %r9, (%rax)
movq %r10, 8(%rax)
popq %rbx
retq
Also, completely tangential, I notice that the demangler thinks the spelling is
`ExtInt<256>`, but the real syntax is supposed to be `_ExtInt(256)`.
--
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