summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2014-06-26 10:45:21 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2014-06-26 10:45:21 +0000
commit817812f61caa50ba3ce67ceb5a033cb69a3eea5c (patch)
tree3246ef4217ca3ed21a10573b856cc18a085035d4 /lib/Bitcode/Reader/BitcodeReader.cpp
parentc2b11baf5fdb26c2bf2c9b02dae9f0f0f61e9f1b (diff)
downloadllvm-817812f61caa50ba3ce67ceb5a033cb69a3eea5c.tar.gz
llvm-817812f61caa50ba3ce67ceb5a033cb69a3eea5c.tar.bz2
llvm-817812f61caa50ba3ce67ceb5a033cb69a3eea5c.tar.xz
[X86] Improve the selection of SSE3/AVX addsub instructions.
This patch teaches the backend how to canonicalize a shuffle vectors according to the rule: - (shuffle (FADD A, B), (FSUB A, B), Mask) -> (shuffle (FSUB A, -B), (FADD A, -B), Mask) Where 'Mask' is: <0,5,2,7> ;; for v4f32 and v4f64 shuffles. <0,3> ;; for v2f64 shuffles. <0,9,2,11,4,13,6,15> ;; for v8f32 shuffles. In general, ISel only knows how to pattern-match a canonical 'fadd + fsub + blendi' dag node sequence into an ADDSUB instruction. This new rule allows to convert a non-canonical dag sequence into a canonical one that will be matched by a single ADDSUB at ISel stage. The idea of converting a non-canonical ADDSUB into a canonical one by swapping the first two operands of the shuffle, and then negating the second operand of the FADD and FSUB, was originally proposed by Hal Finkel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions