diff options
| author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2013-12-28 11:11:52 +0000 |
|---|---|---|
| committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2013-12-28 11:11:52 +0000 |
| commit | eaceba0ed062ee9dd53921020f47b6dd8b406ab5 (patch) | |
| tree | 311faa06f6b5ae930e27996016e04d56399d3f1c /clang/lib/Rewrite/Core/Rewriter.cpp | |
| parent | 93f760468e318c1cd391d6772f2a04749a67befd (diff) | |
| download | bcm5719-llvm-eaceba0ed062ee9dd53921020f47b6dd8b406ab5.tar.gz bcm5719-llvm-eaceba0ed062ee9dd53921020f47b6dd8b406ab5.zip | |
[X86] Teach the backend how to fold target specific dag node for packed
vector shift by immedate count (VSHLI/VSRLI/VSRAI) into a build_vector when
the vector in input to the shift is a build_vector of all constants or UNDEFs.
Target specific nodes for packed shifts by immediate count are in
general introduced by function 'getTargetVShiftByConstNode' (in
X86ISelLowering.cpp) when lowering shift operations, SSE/AVX immediate
shift intrinsics and (only in very few cases) SIGN_EXTEND_INREG dag
nodes.
This patch adds extra rules for simplifying vector shifts inside
function 'getTargetVShiftByConstNode'.
Added file test/CodeGen/X86/vec_shift5.ll to verify that packed
shifts by immediate are correctly folded into a build_vector when the
input vector to the shift dag node is a vector of constants or undefs.
llvm-svn: 198113
Diffstat (limited to 'clang/lib/Rewrite/Core/Rewriter.cpp')
0 files changed, 0 insertions, 0 deletions

