[PATCH] D38316: [InstCombine] replace bitcast to scalar + insertelement with widening shuffle + vector bitcast
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 27 11:26:25 PDT 2017
spatel added a comment.
In https://reviews.llvm.org/D38316#882443, @efriedma wrote:
> > Right - I thought about that case, but I couldn't justify it if we need another IR instruction.
>
> So how do you plan to fix x86 lowering for this case? If we need a DAGCombine for this anyway, not sure there's much point to handling it in instcombine.
The only thing missing is a load fold. Ie, we'll produce this asm for 32-bit with AVX512f (the motivating target in the bug report) with this patch:
vmovsd 4(%esp), %xmm0 # xmm0 = mem[0],zero
vbroadcastsd %xmm0, %zmm0
I think the ideal code would fuse those into splat of memop:
vbroadcastsd 4(%esp), %zmm0
https://reviews.llvm.org/D38316
More information about the llvm-commits
mailing list