4 Commits

Author SHA1 Message Date
Matthias Braun
79519fecc3 VirtRegMap: Replace some identity copies with KILL instructions.
An identity COPY like this:
   %AL = COPY %AL, %EAX<imp-def>
has no semantic effect, but encodes liveness information: Further users
of %EAX only depend on this instruction even though it does not define
the full register.

Replace the COPY with a KILL instruction in those cases to maintain this
liveness information. (This reverts a small part of r238588 but this
time adds a comment explaining why a KILL instruction is useful).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-09 00:19:07 +00:00
Simon Pilgrim
1f4a5003d2 [DAGCombiner] Fold xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B)) anytime before LegalizeVectorOprs
xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B)) was only being combined at the AfterLegalizeTypes stage, this patch permits the combine to occur anytime before then as well.

The main aim with this to improve the ability to recognise bitmasks that can be converted to shuffles.

I had to modify a number of AVX512 mask tests as the basic bitcast to/from scalar pattern was being stripped out, preventing testing of the mmask bitops. By replacing the bitcasts with loads we can get almost the same result.

Differential Revision: http://reviews.llvm.org/D18944

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265998 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 21:10:33 +00:00
Simon Pilgrim
c1307b1146 [X86] Added extra widening tests for and/xor/or bit operations
To make sure we're dealing with both cases of legal/illegal number of vector elements and legal/illegal vector element types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265929 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 10:58:52 +00:00
Simon Pilgrim
6e01efbf2d [X86] Added widening tests for and/xor/or bit operations
Part of additional tests requested for D18944

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265925 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 10:16:27 +00:00