VMOVNTDQ in LLVM

Hello, i am using llvm 4.0 i am generating intel avx code. But in code i dont find VMOVNTDQ instruction. Why is that so? When does this instruction generated?

Please clarify.

What code did you write where you expected VMOVNTDQ to be generated?

The x86 MOVNT instructions are something of an attractive nuisance. There are cases where they are beneficial, but those cases are much less common and harder to characterize than you might expect. LLVM is deliberately conservative about using MOVNT (IIRC it’s currently only generated if you explicitly ask for it by using intrinsics).

– Steve

This thread from last year has some additional detail regarding the hazards of aggressive MOVNT generation if you’re interested:

http://lists.llvm.org/pipermail/llvm-dev/2016-May/098980.html

– Steve

We removed the x86/gcc builtin intrinsics sometime ago, and now use __builtin_nontemporal_store/load inside the sse stream intrinsics. But as Steve has said, we don’t otherwise generate non temporal load/stores unless they are explicitly requested.

Simon.