[X86] Make memcmp vector lowering handle arbitrary expansions
authorDavid Zarzycki <dave@znu.io>
Mon, 28 Oct 2019 12:39:40 +0000 (14:39 +0200)
committerDavid Zarzycki <dave@znu.io>
Wed, 30 Oct 2019 07:12:57 +0000 (09:12 +0200)
commitf68925d45083407e6bf322a7ee18d85c83c001ce
tree9511b8e26bca526b9ef5dc24df8dba35858d9e25
parent1e589f67ef726ecfa1135750c557d4c8f95b71cd
[X86] Make memcmp vector lowering handle arbitrary expansions

Teach combineVectorSizedSetCCEquality() to handle arbitrary memcmp
expansions but do not change any default policy for now.

This also fixes a bug in the memcmp expansion itself when large
displacements are needed.

https://reviews.llvm.org/D69507
llvm/lib/CodeGen/ExpandMemCmp.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/PowerPC/memcmpIR.ll
llvm/test/CodeGen/X86/memcmp-more-load-pairs.ll [new file with mode: 0644]
llvm/test/Transforms/ExpandMemCmp/X86/memcmp.ll