The isel pattern that selects the memory-register form of VCVTPH2PS
authorRobert Lougher <rob.lougher@gmail.com>
Tue, 12 Jan 2016 11:48:25 +0000 (11:48 +0000)
committerRobert Lougher <rob.lougher@gmail.com>
Tue, 12 Jan 2016 11:48:25 +0000 (11:48 +0000)
commite5716c4e3ac95bb5f204390720af3a186814f2cb
tree677a74ba317bcbf5a5e16de958caa914008109cf
parentd6d9c0e008dcbd9e4efee16c6f6a582d17adeaf8
The isel pattern that selects the memory-register form of VCVTPH2PS
(64 to 128-bit) matches against the pattern fragment 'vzmovl_v2i64'
(a zero-extended 64-bit load).

However, a change in r248784 teaches the instruction combiner that only
the lower 64 bits of the input to a 128-bit vcvtph2ps are used.  This means
the instruction combiner will ordinarily optimize away the upper 64-bit
insertelement instruction in the zero-extension and so we no longer select
the memory-register form.  To fix this a new pattern has been added.

Differential Revision: http://reviews.llvm.org/D16067

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257470 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/f16c-intrinsics.ll