[Bug c++/118166] New: simple bit operations for __int128 do not use vector operations/registers
gero.peterhoff at gmx dot net
gcc-bugzilla@gcc.gnu.org
Sat Dec 21 15:21:43 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118166
Bug ID: 118166
Summary: simple bit operations for __int128 do not use vector
operations/registers
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gero.peterhoff at gmx dot net
Target Milestone: ---
Example
__int128 bit_blend(const __int128 if_false, const __int128 if_true, const
__int128 mask)
{
return ((if_false ^ if_true) & mask) ^ if_false;
}
generated (-std=gnu++23 -msse2 (or better) -O3)
bit_blend(__int128, __int128, __int128):
xchg rdi, rsi
mov rax, rdx
mov rdx, rcx
xor rax, rsi
xor rdx, rdi
and rax, r8
and rdx, r9
xor rax, rsi
xor rdx, rdi
ret
More information about the Gcc-bugs
mailing list