[X86][SSE] Fix memory folding of (v)roundsd / (v)roundss
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 9 Aug 2016 09:32:34 +0000 (09:32 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 9 Aug 2016 09:32:34 +0000 (09:32 +0000)
commit54c32ddf558030dc571ba6809944a1240b663d11
tree71b5c305a1701d6612625b22f4476983c696bd0c
parentadcd01f6cd1bafbab6628516911dc90933e08e80
[X86][SSE] Fix memory folding of (v)roundsd / (v)roundss

We only had partial memory folding support for the intrinsic definitions, and (as noted on PR27481) was causing FR32/FR64/VR128 mismatch errors with the machine verifier.

This patch adds missing memory folding support for both intrinsics and the ffloor/fnearbyint/fceil/frint/ftrunc patterns and in doing so fixes the failing machine verifier stack folding tests from PR27481.

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

llvm-svn: 278106
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/lib/Target/X86/X86InstrSSE.td
llvm/test/CodeGen/X86/stack-folding-fp-avx1.ll
llvm/test/CodeGen/X86/stack-folding-fp-sse42.ll