[X86] Remove some intrinsic instructions from hasPartialRegUpdate
authorCraig Topper <craig.topper@gmail.com>
Mon, 12 Dec 2016 05:07:17 +0000 (05:07 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 12 Dec 2016 05:07:17 +0000 (05:07 +0000)
commit081c0e2864419b07a7c843cbc839b4882baa3c9c
tree9be88624bcb82ebfaec96b58d80042681e56b48f
parent2a452ebf76833379f8217531b5027457e11d9dd5
[X86] Remove some intrinsic instructions from hasPartialRegUpdate

Summary:
These intrinsic instructions are all selected from intrinsics that have well defined behavior for where the upper bits come from. It's not the same place as the lower bits.

As you can see we were suppressing load folding for these instructions in some cases. In none of the cases was the separate load helping avoid a partial dependency on the destination register. So we should just go ahead and allow the load to be folded.

Only foldMemoryOperand was suppressing folding for these. They all have patterns for folding sse_load_f32/f64 that aren't gated with OptForSize, but sse_load_f32/f64 doesn't allow 128-bit vector loads. It only allows scalar_to_vector and vzmovl of scalar loads to match. There's no reason we can't allow a 128-bit vector load to be narrowed so I would like to fix sse_load_f32/f64 to allow that. And if I do that it changes some of these same test cases to fold the load too.

Reviewers: spatel, zvi, RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D27611

llvm-svn: 289419
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
llvm/test/CodeGen/X86/sse2-intrinsics-x86.ll
llvm/test/CodeGen/X86/sse41-intrinsics-x86.ll
llvm/test/CodeGen/X86/sse_partial_update.ll
llvm/test/CodeGen/X86/vec_ss_load_fold.ll