Go to file
Chandler Carruth e7e9c04ddf [x86] Teach the instruction lowering to add comments describing constant
pool data being loaded into a vector register.

The comments take the form of:

  # ymm0 = [a,b,c,d,...]
  # xmm1 = <x,y,z...>

The []s are used for generic sequential data and the <>s are used for
specifically ConstantVector loads. Undef elements are printed as the
letter 'u', integers in decimal, and floating point values as floating
point values. Suggestions on improving the formatting or other aspects
of the display are very welcome.

My primary use case for this is to be able to FileCheck test masks
passed to vector shuffle instructions in-register. It isn't fantastic
for that (no decoding special zeroing semantics or other tricks), but it
at least puts the mask onto an instruction line that could reasonably be
checked. I've updated many of the new vector shuffle lowering tests to
leverage this in their test cases so that we're actually checking the
shuffle masks remain as expected.

Before implementing this, I tried a *bunch* of different approaches.
I looked into teaching the MCInstLower code to scan up the basic block
and find a definition of a register used in a shuffle instruction and
then decode that, but this seems incredibly brittle and complex.
I talked to Hal a lot about the "right" way to do this: attach the raw
shuffle mask to the instruction itself in some form of unencoded
operands, and then use that to emit the comments. I still think that's
the optimal solution here, but it proved to be beyond what I'm up for
here. In particular, it seems likely best done by completing the
plumbing of metadata through these layers and attaching the shuffle mask
in metadata which could have fully automatic dropping when encoding an
actual instruction.

llvm-svn: 218377
2014-09-24 09:39:41 +00:00
clang [x86] Fixed argument types in intrinsics: 2014-09-24 06:45:23 +00:00
clang-tools-extra Drop superfluous semicolon. GCC's -pedantic warns about this. 2014-09-23 14:46:55 +00:00
compiler-rt [asan] Fix one test on Android-L. 2014-09-23 15:42:04 +00:00
debuginfo-tests relax testcase for LLDB output format compatibility. 2014-03-19 23:06:18 +00:00
libclc Remove more redundant semi-colons 2014-09-18 09:23:40 +00:00
libcxx Mark module atomic as cplusplus11. 2014-09-24 04:44:54 +00:00
libcxxabi Adding ABI support for __cxa_throw_bad_array_new_length. 2014-09-11 17:26:43 +00:00
lld [PECOFF] Exported name should match C++ mangled name 2014-09-24 02:01:10 +00:00
lldb Fix up the HostThread interface, making the interface simpler. 2014-09-23 18:32:09 +00:00
llvm [x86] Teach the instruction lowering to add comments describing constant 2014-09-24 09:39:41 +00:00
openmp Fix a crash that occurred under obscure circumstances during library shutdown 2014-09-03 11:34:33 +00:00
polly [www] Update formatting of news feed 2014-09-22 07:37:12 +00:00