diff options
author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2015-05-08 15:11:07 +0000 |
---|---|---|
committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2015-05-08 15:11:07 +0000 |
commit | 84e22b90967d8f1b36d4254cc500493c7d0d7e41 (patch) | |
tree | 038efc6e9bafc46e2ca7b518c1ca162d732ffcfe /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 9e36fb4c1875dfc02485f9e9657f028f00d78bfb (diff) | |
download | llvm-84e22b90967d8f1b36d4254cc500493c7d0d7e41.zip llvm-84e22b90967d8f1b36d4254cc500493c7d0d7e41.tar.gz llvm-84e22b90967d8f1b36d4254cc500493c7d0d7e41.tar.bz2 |
[X86] Teach 'getTargetShuffleMask' how to look through ISD::WrapperRIP when decoding a PSHUFB mask.
The function 'getTargetShuffleMask' already knows how to deal with PSHUFB nodes
where the mask node is a load from constant pool, and the constant pool node
is wrapped by a X86ISD::Wrapper node. This patch extends that logic by teaching
it how to also look through X86ISD::WrapperRIP.
This helps function combineX86ShufflesRecusively to combine more shuffle
sequences containing PSHUFB nodes if we are in RIPRel PIC mode.
Before this change, llc (with -relocation-model=pic -march=x86-64) was unable
to decode a pshufb where the mask was loaded from a constant pool. For example,
the no-op shuffle from test 'x86-fold-pshufb.ll' was not folded into its
operand, so instead of generating a single 'movaps' the backend always
generated a sub-optimal 'movdqa + pshufb' sequence.
Added test x86-fold-pshufb.ll.
llvm-svn: 236863
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions