<div dir="ltr">Hi everyone, <div><br></div><div>I am experimenting with LLVM lowering, intrinsics and shufflevector in general. </div><div><br></div><div>Here is an IR that I produce with the objective of emitting some vblendps instructions: <a href="https://gist.github.com/nicolasvasilache/0fe30c83cbfe5b4776ec9f0ee465611a">https://gist.github.com/nicolasvasilache/0fe30c83cbfe5b4776ec9f0ee465611a</a>. </div><div><br></div><div>I compile this further with </div><div><br></div><div>clang -x ir -emit-llvm -S -mcpu=haswell -O3 -o - | llc -O3 -mcpu=haswell - -o -</div><div><br></div><div>to obtain:</div><div><br></div><div><a href="https://gist.github.com/nicolasvasilache/2c773b86fcda01cc28711828a0a9ce0a">https://gist.github.com/nicolasvasilache/2c773b86fcda01cc28711828a0a9ce0a</a><br></div><div><br></div><div>At this point, I would expect to see some vblendps instructions generated for the pieces of IR that produce %48/%49 %51/%52 %54/%55 and %57/%58 to reduce pressure on port 5 (vblendps can also go on ports 0 and 1). However the expected instruction does not get generated and llvm-mca continues to show me high port 5 contention. <br></div><div><br></div><div>Could people suggest some steps / commands to help better understand why my expectation is not met and whether I can do something to make the compiler generate what I want? Thanks in advance! <br><br></div><div>I have verified independently that in isolation, a single such shuffle creates a vblendps. I see them being recombined in the produced assembly and I am looking for experimenting with avoiding that vshufps + vblendps + vblendps get recombined into vunpckxxx + vunpckxxx instructions.<br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">N</div></div></div></div>