[PATCH] D37446: [x86] eliminate unnecessary vector compare for AVX masked store
Ayman Musa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 5 01:11:55 PDT 2017
aymanmus added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:33185
+ SDValue Mask = Mst->getMask();
+ if (Mask.getOpcode() == X86ISD::PCMPGT &&
+ ISD::isBuildVectorAllZeros(Mask.getOperand(0).getNode())) {
----------------
Is there any canonical form of compare-with-all-zeros that can be guaranteed here? Or should the pattern with (pcmplt X, 0) be added also?
================
Comment at: test/CodeGen/X86/masked_memop.ll:1158
; SKX-LABEL: trunc_mask:
; SKX: ## BB#0:
; SKX-NEXT: vpxor %xmm1, %xmm1, %xmm1
----------------
I think the optimal code for SKX is:
vpmovd2m %xmm2, %k1
vmovups %xmm0, (%rdi) {%k1}
https://reviews.llvm.org/D37446
More information about the llvm-commits
mailing list