[PATCH] D38732: [X86][AVX512] Improve lowering of AVX512 test intrinsics

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 05:47:03 PDT 2017


RKSimon added inline comments.


================
Comment at: test/CodeGen/X86/setcc-lowering.ll:28
+; KNL-32-NEXT:    vbroadcastss {{.*#+}} ymm1 = [8388607,8388607,8388607,8388607,8388607,8388607,8388607,8388607]
+; KNL-32-NEXT:    vptestnmd %zmm1, %zmm0, %k0
 ; KNL-32-NEXT:    movb $15, %al
----------------
uriel.k wrote:
> RKSimon wrote:
> > Should the vptest instructions be in the Integer domain? That should force a vpbroadcastd.
> > 
> > Kind of a pity that the broadcast doesn't fold, but since you're messing with subregs it's not that surprising.
> care to explain more what do you mean by messing with subregs? Isn't the vpbroadcast here is essential to create a <8 x i23> vector?
> 
> and yes, vptest is considered to be in the integer domain so I don't know why it chose vbroadcastss.
The vptest is being performed on the zmm register, not just the ymm we care about. I guess because KNL doesn't support the VL variants? So usually this means there is ymm <-> zmm subreg manipulations going on that will interfere with other patterns such as broadcast folding (which we should be safe to do, although naturally full size load folding would be a no-no).


https://reviews.llvm.org/D38732





More information about the llvm-commits mailing list