[PATCH] D60256: [InstCombine][X86] Expand MOVMSK to generic IR (PR39927)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 03:25:58 PDT 2019


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, andreadb.
Herald added a project: LLVM.

First step towards removing the MOVMSK intrinsics completely - this patch expands MOVMSK to the pattern:

e.g. PMOVMSKB(v16i8 x):
%cmp = icmp slt <16 x i8> %x, zeroinitializer
%int = bitcast <16 x i8> %cmp to i16
%res = zext i16 %int to i32

Which is correctly handled by ISel and FastIsel (give or take an annoying movzx move....): https://godbolt.org/z/rkrSFW


Repository:
  rL LLVM

https://reviews.llvm.org/D60256

Files:
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/Transforms/InstCombine/X86/x86-movmsk.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60256.193680.patch
Type: text/x-patch
Size: 8914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190404/92e8f22b/attachment.bin>


More information about the llvm-commits mailing list