[PATCH] D42935: [X86] Use min/max for vector ult/ugt compares if avoids a sign flip.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 11 08:12:09 PST 2018


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM, with a couple of minor thoughts.

Having looked through, I think the PSUBUS regressions can be blamed on PR31293 and shouldn't block this patch.



================
Comment at: test/CodeGen/X86/avx512vl-vec-masked-cmp.ll:16301
 ; NoVLX-NEXT:    vpmovsxbd %xmm0, %zmm0
+; NoVLX-NEXT:    vpslld $31, %zmm0, %zmm0
 ; NoVLX-NEXT:    vptestmd %zmm0, %zmm0, %k0
----------------
Is this necessary? Is there anyway that ComputeKnownBits/NumSignBits + SimplifyDemandedBits could be used to remove it?


https://reviews.llvm.org/D42935





More information about the llvm-commits mailing list