Fix PR12529.  The Vxx family of instructions are only supported by AVX.
Use non-vex instructions for SSE4.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154770 91177308-0d34-0410-b5e6-96231b3b80d8
Fix filename and register numbers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154771 91177308-0d34-0410-b5e6-96231b3b80d8
Do not convert between fp128 <-> ppc_fp128 since there is no legal cast conversion between the two.

Patch by nobled <nobled@dreamwidth.org>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154772 91177308-0d34-0410-b5e6-96231b3b80d8
Fix class name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154773 91177308-0d34-0410-b5e6-96231b3b80d8
Make member variables of AsmToken private. Remove unnecessary forward declarations. Remove an unnecessary include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154775 91177308-0d34-0410-b5e6-96231b3b80d8
Remove AVX2 vpermq and vpermpd intrinsics. These can now be handled with normal shuffle vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154778 91177308-0d34-0410-b5e6-96231b3b80d8
Spacing fixes and 80 column fixes. Use 0 instead of 0x80 for undef indices in vpermps/vpermd. Hardware only looks at lower 3-bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154780 91177308-0d34-0410-b5e6-96231b3b80d8
Fix SDTypeProfile for vpermps. The mask operand should be v8i32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154781 91177308-0d34-0410-b5e6-96231b3b80d8
Merge vpermps/vpermd and vpermpd/vpermq SD nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154782 91177308-0d34-0410-b5e6-96231b3b80d8
Rewrite how machine block placement handles loop rotation.

This is a complex change that resulted from a great deal of
experimentation with several different benchmarks. The one which proved
the most useful is included as a test case, but I don't know that it
captures all of the relevant changes, as I didn't have specific
regression tests for each, they were more the result of reasoning about
what the old algorithm would possibly do wrong. I'm also failing at the
moment to craft more targeted regression tests for these changes, if
anyone has ideas, it would be welcome.

The first big thing broken with the old algorithm is the idea that we
can take a basic block which has a loop-exiting successor and a looping
successor and use the looping successor as the layout top in order to
get that particular block to be the bottom of the loop after layout.
This happens to work in many cases, but not in all.

The second big thing broken was that we didn't try to select the exit
which fell into the nearest enclosing loop (to which we exit at all). As
a consequence, even if the rotation worked perfectly, it would result in
one of two bad layouts. Either the bottom of the loop would get
fallthrough, skipping across a nearer enclosing loop and thereby making
it discontiguous, or it would be forced to take an explicit jump over
the nearest enclosing loop to earch its successor. The point of the
rotation is to get fallthrough, so we need it to fallthrough to the
nearest loop it can.

The fix to the first issue is to actually layout the loop from the loop
header, and then rotate the loop such that the correct exiting edge can
be a fallthrough edge. This is actually much easier than I anticipated
because we can handle all the hard parts of finding a viable rotation
before we do the layout. We just store that, and then rotate after
layout is finished. No inner loops get split across the post-rotation
backedge because we check for them when selecting the rotation.

That fix exposed a latent problem with our exitting block selection --
we should allow the backedge to point into the middle of some inner-loop
chain as there is no real penalty to it, the whole point is that it
*won't* be a fallthrough edge. This may have blocked the rotation at all
in some cases, I have no idea and no test case as I've never seen it in
practice, it was just noticed by inspection.

Finally, all of these fixes, and studying the loops they produce,
highlighted another problem: in rotating loops like this, we sometimes
fail to align the destination of these backwards jumping edges. Fix this
by actually walking the backwards edges rather than relying on loopinfo.

This fixes regressions on heapsort if block placement is enabled as well
as lots of other cases where the previous logic would introduce an
abundance of unnecessary branches into the execution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154783 91177308-0d34-0410-b5e6-96231b3b80d8
Remove dead SD nodes after the combining pass. Fixes PR12201.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154786 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify checking for pointer types in BBVectorize (this change was suggested by Duncan).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154787 91177308-0d34-0410-b5e6-96231b3b80d8
Say something about -vectorize in the release notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154788 91177308-0d34-0410-b5e6-96231b3b80d8
add configure flag --with-default-sysroot

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154791 91177308-0d34-0410-b5e6-96231b3b80d8
Add a Fixme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154793 91177308-0d34-0410-b5e6-96231b3b80d8
Add credit and release notes for r150307. By Kai Nacke.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154796 91177308-0d34-0410-b5e6-96231b3b80d8
Flip the arguments when converting vpermd/vpermps intrinsics into instructions. The intrinsic has the mask as the last operand, but the instruction has it as the second.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154797 91177308-0d34-0410-b5e6-96231b3b80d8
Change type profile for vpermv back to using operand type for the mask argument to match intrinsic behavior. Add a bitcast to the lowering code to convert mask from v8i32 to v8f32 for vpermps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154798 91177308-0d34-0410-b5e6-96231b3b80d8
Add reverseColor to raw_ostream.

To be used in printing unprintable source in clang diagnostics.
Patch by Seth Cantrell!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154800 91177308-0d34-0410-b5e6-96231b3b80d8
Replace vpermd/vpermps intrinic patterns with custom lowering to target specific nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154801 91177308-0d34-0410-b5e6-96231b3b80d8