Re:Unsigned comparisons in AVX2/SSE: a quick note
by vardump on Friday August 26, 2022 @02:30PM
(#32611056)
That's pretty interesting. So AMD has split traditional ALU to different execution units? I mean, usually same ALU(s) that got an adder has also logical ops.
[ Parent
| on HN ]
Re:Unsigned comparisons in AVX2/SSE: a quick note
by Const-me on Friday August 26, 2022 @04:37PM
(#32612465)
Zen 2 cores have 4 execution units which run arithmetical and logical SIMD instructions: https://en.wikichip.org/wiki/amd/microarchitectures/zen_2#Fl...
Apparently 3 out of 4 units can add integers, but all 4 of them can do bitwise operations. Despite the ISA defines multiple equivalent bitwise instructions like pand / andps / andpd, apparently modern AMD CPUs don’t have a bypass delay so these instructions are 100% equivalent on these CPUs. And with some luck (when not bottlenecked on instruction fetch, decode, or other place in the pipeline) each Zen2 core can run 4 of them every cycle.