[PATCH] D48877: [X86][BtVer2][MCA] Recognize CMPEQ one-idioms
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 4 03:13:56 PDT 2018
lebedev.ri added a comment.
In https://reviews.llvm.org/D48877#1151974, @RKSimon wrote:
> In https://reviews.llvm.org/D48877#1151042, @lebedev.ri wrote:
>
> > Hmm, so if they still consume resources, does this mean it is the lack of latency is what making them special?
>
>
> The PCMPEQ 'all ones' idiom is a regular instruction - it consumes resources and has a latency before its result is available for any instructions that depend on it.
>
> What it doesn't have to do is wait for its source resisters to be available:
>
> VDIVPS %xmm1, %xmm0, %xmm0 <---- Big latency
> VPCMPEQB %xmm1, %xmm0, %xmm0 <---- Must wait a loooooong time until VDIVPS has completed
>
>
> vs
>
> VDIVPS %xmm1, %xmm0, %xmm0 <---- Big latency
> VPCMPEQB %xmm0, %xmm0, %xmm0 <---- 'Ones Idiom' - can execute immediately, doesn't wait for VDIVPS
>
Ok, well, i guess what i was trying to ask/understand is, is that already properly represented https://godbolt.org/g/9rYPYA, or not?
Repository:
rL LLVM
https://reviews.llvm.org/D48877
More information about the llvm-commits
mailing list