llvm-project/clang/utils/TableGen
Jim Grosbach d10f1c04aa ARM: Improve codegen for vget_low_* and vget_high_ intrinsics.
These intrinsics use the __builtin_shuffle() function to extract the
low and high half, respectively, of a 128-bit NEON vector. Currently,
they're defined to use bitcasts to simplify the emitter, so we get code
like:
uint16x4_t vget_low_u32(uint16x8_t __a) {
  return (uint32x2_t) __builtin_shufflevector((int64x2_t) __a,
                                              (int64x2_t) __a,
                                              0);
}

While this works, it results in those bitcasts going all the way through
to the IR, resulting in code like:
  %1 = bitcast <8 x i16> %in to <2 x i64>
  %2 = shufflevector <2 x i64> %1, <2 x i64> undef, <1 x i32>
  %zeroinitializer
  %3 = bitcast <1 x i64> %2 to <4 x i16>

We can instead easily perform the operation directly on the input vector
like:

uint16x4_t vget_low_u16(uint16x8_t __a) {
  return __builtin_shufflevector(__a, __a, 0, 1, 2, 3);
}

Not only is that much easier to read on its own, it also results in
cleaner IR like:

  %1 = shufflevector <8 x i16> %in, <8 x i16> undef,
                     <4 x i32> <i32 0, i32 1, i32 2, i32 3>

This is both easier to read and easier for the back end to reason
about effectively since the operation is obfuscating the source with
bitcasts.

rdar://13894163

llvm-svn: 181865
2013-05-15 02:40:04 +00:00
..
CMakeLists.txt Comment parsing: resolve more named character references 2013-01-30 14:29:28 +00:00
ClangASTNodesEmitter.cpp TableGen backends: use emitSourceFileHeader() to emit the warning about 2013-01-30 21:54:20 +00:00
ClangAttrEmitter.cpp Fix copy-pasto in naming of LAST_MS_INHERITANCE[_ATTR] 2013-05-14 20:55:49 +00:00
ClangCommentCommandInfoEmitter.cpp doce parsing: adding few more headerdoc tags. 2013-04-05 19:40:53 +00:00
ClangCommentHTMLNamedCharacterReferenceEmitter.cpp TableGen backends: use emitSourceFileHeader() to emit the warning about 2013-01-30 21:54:20 +00:00
ClangCommentHTMLTagsEmitter.cpp TableGen backends: use emitSourceFileHeader() to emit the warning about 2013-01-30 21:54:20 +00:00
ClangDiagnosticsEmitter.cpp ArrayRef<T>() -> None cleanup 2013-05-05 01:03:47 +00:00
ClangSACheckersEmitter.cpp Don't throw exceptions in clang-tblgen by switching to PrintFatalError. 2012-10-25 16:37:08 +00:00
Makefile Don't require exception handling for clang-tblgen. 2012-10-25 20:34:00 +00:00
NeonEmitter.cpp ARM: Improve codegen for vget_low_* and vget_high_ intrinsics. 2013-05-15 02:40:04 +00:00
OptParserEmitter.cpp Sort the #include lines under utils/... 2012-12-04 09:53:39 +00:00
TableGen.cpp Use attribute argument information to determine when to parse attribute arguments as expressions. 2013-05-02 23:25:32 +00:00
TableGenBackends.h Use attribute argument information to determine when to parse attribute arguments as expressions. 2013-05-02 23:25:32 +00:00