Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P283
Clang 8.0.0 -O3 -msse -mavx -mavx2 -mssse3 -msse2, static inline variants
Active
Public
Actions
Authored by
cem
on Aug 1 2019, 3:09 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F4951023: raw.txt
Aug 1 2019, 3:09 PM
2019-08-01 15:09:26 (UTC+0)
Subscribers
None
When explicit -mavx etc are added, Clang generates vectorized ADDs as well:
(gdb) disas /m foo2
Dump of assembler code for function foo2:
23 return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == 0);
0x0000000000000054 <+4>: vpmovzxbd (%rdi),%xmm0
0x0000000000000059 <+9>: movzbl 0x4(%rdi),%eax
0x000000000000005d <+13>: vpshufd $0x4e,%xmm0,%xmm1
0x0000000000000062 <+18>: vpaddd %xmm0,%xmm1,%xmm0
0x0000000000000066 <+22>: vpshufd $0xe5,%xmm0,%xmm1
0x000000000000006b <+27>: vpaddd %xmm1,%xmm0,%xmm0
0x000000000000006f <+31>: vmovd %xmm0,%ecx
0x0000000000000073 <+35>: add %eax,%ecx
0x0000000000000075 <+37>: movzbl 0x5(%rdi),%edx
0x0000000000000079 <+41>: add %ecx,%edx
Event Timeline
cem
created this paste.
Aug 1 2019, 3:09 PM
2019-08-01 15:09:26 (UTC+0)
cem
created this object in space
S1 Global
.
cem
mentioned this in
D21037: linuxpki: correct is_{zero,broadcast}_ether_addr
.
Log In to Comment