[X86] Remove another weird scalar sqrt/rcp/rsqrt pattern.
authorCraig Topper <craig.topper@gmail.com>
Tue, 6 Dec 2016 08:08:12 +0000 (08:08 +0000)
committerCraig Topper <craig.topper@gmail.com>
Tue, 6 Dec 2016 08:08:12 +0000 (08:08 +0000)
commitb34eef7b4139f6bee2f5b5c1b740bf2ad51627d4
tree1377f9de0cbee43b0f001131508a9f1e9382fdf8
parent26ce4267ef3023ac3d97f93c1f205f91d018ff40
[X86] Remove another weird scalar sqrt/rcp/rsqrt pattern.

This pattern turned a vector sqrt/rcp/rsqrt operation of sse_load_f32/f64 into the the scalar instruction for the operation and put undef into the upper bits. For correctness, the resulting code should still perform the sqrt/rcp/rsqrt on the upper bits after the load is extended since that's what the operation asked for. Particularly in the case where the upper bits are 0, in that case we need calculate the sqrt/rcp/rsqrt of the zeroes and keep the result in the upper-bits. This implies we should be using the packed instruction still.

The only test case for this pattern is one I just added so there was no coverage of this.

llvm-svn: 288784
llvm/lib/Target/X86/X86InstrSSE.td
llvm/test/CodeGen/X86/avx-arith.ll