diff options
| author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2014-06-26 10:45:21 +0000 |
|---|---|---|
| committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2014-06-26 10:45:21 +0000 |
| commit | 7fb85256bc2d828136ef3b69da9ffd0ca7e07d8b (patch) | |
| tree | 35d26b6f69ed479118ad3dfc20f5cc45e107b454 /llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp | |
| parent | e2c924366c9f3ed78bd813a37b9298549c72bbf2 (diff) | |
| download | bcm5719-llvm-7fb85256bc2d828136ef3b69da9ffd0ca7e07d8b.tar.gz bcm5719-llvm-7fb85256bc2d828136ef3b69da9ffd0ca7e07d8b.zip | |
[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.
llvm-svn: 211771
Diffstat (limited to 'llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp')
0 files changed, 0 insertions, 0 deletions

