Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
1118 Discussions

Machine clears due to a mix of SIMD and non-SIMD instructions

HarshVardhanKumar
New Contributor I
1,078 Views

On analyzing my application using Intel VTune Profiler, I've come across a weird pattern:

Whenever the code changes from a SIMD instruction to a normal instruction or whenever there is a flow of control from a normal instruction to a SIMD instruction, the latter instructions show a very high value of Bad Speculation (which consists of two sub metrics: Branch Misprediction and Machine Clears).

For example, here is a sample code and the associated bad speculation:

mulsd %xmm1, %xmm1      7.7%
add $0x10, %rax                    4.7% 
addsd %xmm5, %xmm3     1.4%
add $0x8, %rdx                     1.1% 
addsd %xmm1, %xmm0     0.8%
cmp %rcx, %rax                    3.1%

I've observed this behaviour across many applications. I just wanted to make sure if this is indeed some machine clear happening. The add operations have no reasons to show any bad speculation otherwise.

0 Kudos
0 Replies
Reply