Commit Graph

19929 Commits

Author SHA1 Message Date
Alexander Timofeev
23db8abf86 Revert "[AMDGPU] Fix for SIMachineScheduler crash. SI Scheduler should track"
This reverts commit ce06d9cb99.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295054 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 14:29:05 +00:00
Simon Pilgrim
10283cd1fa [X86][SSE] Test case showing missed PSHUFB target shuffle constant fold opportunity.
It also shows an unnecessary pshufb/broadcast being used - the original pshufb mask only requested the lowest byte.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295046 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 11:20:11 +00:00
Craig Topper
6383c00b0a [AVX-512] Add PAVGB/PAVGW to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295035 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 06:54:57 +00:00
Andrew Kaylor
a46c278634 [X86] Add MXCSR register
This adds MXCSR to the set of recognized registers for X86 targets and updates the instructions that read or write it. I do not intend for all of the various floating point instructions that implicitly use the control bits or update the status bits of this register to ever have that usage modeled by default. However, when constrained floating point modes (such as strict FP exception status modeling or dynamic rounding modes) are enabled, implicit use/def information for MXCSR will be added to those instructions.

Until those additional updates are made this should cause (almost?) no functional changes. Theoretically, this will prevent instructions like LDMXCSR and STMXCSR from being moved past one another, but that should be prevented anyway and I haven't found a case where it is happening now.

Differential Revision: https://reviews.llvm.org/D29903



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295004 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 23:38:52 +00:00
Amaury Sechet
1cf4c63780 Revert autogenerated check result for test/CodeGen/X86/atomic-minmax-i6432.ll as they don't regenerate cleanly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294996 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 23:00:23 +00:00
Tim Northover
13a4b7e61f GlobalISel: represent atomic loads & stores via the MachineMemOperand.
Also make sure the AArch64 backend doesn't try to convert them into normal
loads and stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294993 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 22:14:16 +00:00
Tim Northover
1a3fe2bfe6 MIR: parse & print the atomic parts of a MachineMemOperand.
We're going to need them very soon for GlobalISel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294992 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 22:14:08 +00:00
Arnold Schwaighofer
db4a46b079 swiftcc: Don't emit tail calls from callers with swifterror parameters
Backends don't support this yet. They would have to move to the swifterror
register before the tail call to make sure it is live-in to the call.

rdar://30495920

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294982 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 19:58:28 +00:00
Taewook Oh
9fdcd96d07 Make MachineBasicBlock::updateTerminator to update DebugLoc as well
Summary:
Currently MachineBasicBlock::updateTerminator simply drops DebugLoc for newly created branch instructions, which may cause incorrect stepping and/or imprecise sample profile data. Below is an example:

```
  1 extern int bar(int x);
  2
  3 int foo(int *begin, int *end) {
  4   int *i;
  5   int ret = 0;
  6   for (
  7       i = begin ;
  8       i != end ;
  9       i++)
 10   {
 11       ret += bar(*i);
 12   }
 13   return ret;
 14 }
```

Below is a bitcode of 'foo' at the end of LLVM-IR level optimizations with -O3:

```
define i32 @foo(i32* readonly %begin, i32* readnone %end) !dbg !4 {
entry:
  %cmp6 = icmp eq i32* %begin, %end, !dbg !9
  br i1 %cmp6, label %for.end, label %for.body.preheader, !dbg !12

for.body.preheader:                               ; preds = %entry
  br label %for.body, !dbg !13

for.body:                                         ; preds = %for.body.preheader, %for.body
  %ret.08 = phi i32 [ %add, %for.body ], [ 0, %for.body.preheader ]
  %i.07 = phi i32* [ %incdec.ptr, %for.body ], [ %begin, %for.body.preheader ]
  %0 = load i32, i32* %i.07, align 4, !dbg !13, !tbaa !15
  %call = tail call i32 @bar(i32 %0), !dbg !19
  %add = add nsw i32 %call, %ret.08, !dbg !20
  %incdec.ptr = getelementptr inbounds i32, i32* %i.07, i64 1, !dbg !21
  %cmp = icmp eq i32* %incdec.ptr, %end, !dbg !9
  br i1 %cmp, label %for.end.loopexit, label %for.body, !dbg !12, !llvm.loop !22

for.end.loopexit:                                 ; preds = %for.body
  br label %for.end, !dbg !24

for.end:                                          ; preds = %for.end.loopexit, %entry
  %ret.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.end.loopexit ]
  ret i32 %ret.0.lcssa, !dbg !24
}
```

where

```
!12 = !DILocation(line: 6, column: 3, scope: !11)
```

. As you can see, the terminator of 'entry' block, which is a loop control branch, has a DebugLoc of line 6, column 3. Howerver, after the execution of 'MachineBlock::updateTerminator' function, which is triggered by MachineSinking pass, the DebugLoc info is dropped as below (see there's no debug-location for JNE_1):

```
  bb.0.entry:
    successors: %bb.4(0x30000000), %bb.1.for.body.preheader(0x50000000)
    liveins: %rdi, %rsi

    %6 = COPY %rsi
    %5 = COPY %rdi
    %8 = SUB64rr %5, %6, implicit-def %eflags, debug-location !9
    JNE_1 %bb.1.for.body.preheader, implicit %eflags
```

This patch addresses this issue and make newly created branch instructions to keep debug-location info.

Reviewers: aprantl, MatzeB, craig.topper, qcolombet

Reviewed By: qcolombet

Subscribers: qcolombet, llvm-commits

Differential Revision: https://reviews.llvm.org/D29596

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294976 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 18:15:31 +00:00
Quentin Colombet
58a124bd02 [FastISel] Add a diagnostic to warm on fallback.
This is consistent with what we do for GlobalISel. That way, it is easy
to see whether or not FastISel is able to fully select a function.
At some point we may want to switch that to an optimization remark.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294970 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 17:38:59 +00:00
James Molloy
eef9539b00 [ARM] Fix crash caused by r294945
I'd missed a creator of FCMP nodes - duplicateCmp().

Kindly and promptly reported by Gabor Ballabas, due to his CSiBE test suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294968 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 17:18:00 +00:00
Simon Pilgrim
2aaf4be982 [X86][SSE] Add v4f32 and v2f64 extract to store tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294952 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 14:20:13 +00:00
Sanne Wouda
7a9d6eeb90 [CodeGen] fix alignment of JUMPTABLE_INSTS on v8M.base
Summary:
The attached test case fails with "fatal error: error in backend:
misaligned pc-relative fixup value" as the jump table is misaligned.
The EmitAlignment existed already for ARM and Thumb-1 code, but was
missing for Thumb-2.

The test checks that the fatal error disappears when generating an obj
file, as well as checking the align directive is there when producing an
asm file.


Reviewers: rengolin, grosbach, t.p.northover, jmolloy, SjoerdMeijer, samparker

Reviewed By: samparker

Subscribers: samparker, aemerson, llvm-commits

Differential Revision: https://reviews.llvm.org/D29650


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294950 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 14:07:45 +00:00
James Molloy
6ede5aa716 [Thumb-1] TBB generation: spot redefinitions of index register
We match a sequence of 3-4 instructions into a tTBB pseudo. One of our checks is that
a particular register in that sequence is killed (so it can be clobbered by the pseudo).

We weren't noticing if an errant MOV or other instruction had infiltrated the
sequence we were walking. If it had, and it defined the register we've already
identified as killed, it makes it live across the tBR_JT and thus unclobberable.

Notice this case and bail out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294949 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 14:07:39 +00:00
Simon Pilgrim
43efaf2951 [X86][SSE] Add more thorough extract to store tests
Added v4i32 and v2i64 tests and test on i686 as well as x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294946 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 13:40:12 +00:00
James Molloy
9b264f7915 [ARM] Use VCMP, not VCMPE, for floating point equality comparisons
When generating a floating point comparison we currently unconditionally
generate VCMPE. This has the sideeffect of setting the cumulative Invalid
bit in FPSCR if any of the operands are QNaN.

It is expected that use of a relational predicate on a QNaN value should
raise Invalid. Quoting from the C standard:

  The relational and equality operators support the usual mathematical
  relationships between numeric values. For any ordered pair of numeric
  values exactly one of relationships the less, greater, equal and is true.
  Relational operators may raise the floating-point exception when argument
  values are NaNs.

The standard doesn't explicitly state the expectation for equality operators,
but the implication and obvious expectation is that equality operators
should not raise Invalid on a QNaN input, as those predicates are wholly
defined on unordered inputs (to return not equal).

Therefore, add a new operand to ARMISD::FPCMP and FPCMPZ indicating if
QNaN should raise Invalid, and pipe that through to TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294945 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 12:32:47 +00:00
Pierre Gousseau
e67936fcbf [X86] Improve readability of test/CodeGen/X86/lzcnt-zext-cmp.ll by adding a common check prefix ALL. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294938 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 09:57:17 +00:00
Craig Topper
5b7ece9f05 [DAGCombiner] Teach DAG combine that inserting an extract_subvector result into the same location of a an undef vector can just use the original input to the extract.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294932 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 04:53:33 +00:00
Craig Topper
d46db47633 [X86] Genericize the handling of INSERT_SUBVECTOR from an EXTRACT_SUBVECTOR to support 512-bit vectors with 128-bit or 256-bit subvectors.
We now detect that both the extract and insert indices are non-zero and convert to a shuffle. This will be lowered as a blend for 256-bit vectors or as a vshuf operations for 512-bit vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294931 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-13 04:53:29 +00:00
Craig Topper
220d93f415 [DAGCombiner] Remove the half vector width check for the combine of EXTRACT_SUBVECTOR from an INSERT_SUBVECTOR.
This gives more parallelism opportunities for AVX-512 when dealing with 128-bit extracts from 512-bit vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294930 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12 23:49:49 +00:00
Sanjay Patel
771a901cd4 [TargetLowering] fix SETCC SETLT folding with FP types
The bug was introduced with:
https://reviews.llvm.org/rL294863

...and manifests as a selection failure in x86, but that's actually
another bug. This fix prevents wrong codegen with -0.0, but in the
more common case when we have NSZ and NNAN (-ffast-math), we should 
still be able to fold this setcc/compare.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294924 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12 23:07:52 +00:00
Craig Topper
82c3f60cd8 [AVX-512] Add VPEXTRD/Q to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294905 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12 18:47:37 +00:00
Simon Pilgrim
211b30744a [X86][AVX2] Add support for combining target shuffles to VPMOVZX
Initial 256-bit vector support - 512-bit support requires extra checks for AVX512BW support (PMOVZXBW) that will be handled in a future patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294896 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12 14:31:23 +00:00
Craig Topper
6f54ad393b [X86] Update test case I missed in r294876.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294878 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 23:23:11 +00:00
Craig Topper
fe892ae261 [X86] Move code for using blendi for insert_subvector out to an isel pattern. This gives the DAG combiner more opportunity to optimize without needing to dig through the blend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294876 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 22:57:12 +00:00
Simon Pilgrim
04a335bf92 [X86][SSE] Use VSEXT/VZEXT constant folding for SIGN_EXTEND_VECTOR_INREG/ZERO_EXTEND_VECTOR_INREG
Preparatory step for PR31712

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294874 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 22:47:06 +00:00
Simon Pilgrim
796f9e5e57 [X86][SSE] Improve VSEXT/VZEXT constant folding.
Generalize VSEXT/VZEXT constant folding to work with any target constant bits source not just BUILD_VECTOR .

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294873 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 21:55:24 +00:00
Amaury Sechet
c0358c4bfe Fix atomic-minmax-i6432.ll .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294867 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 19:34:11 +00:00
Amaury Sechet
021167a86e Regen expected tests result. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294866 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 19:27:15 +00:00
Sanjay Patel
57101fca7a [TargetLowering] check for sign-bit comparisons in SimplifyDemandedBits
I don't know if anything other than x86 vectors is affected by this change, but this may allow 
us to remove target-specific intrinsics for blendv* (vector selects). The simplification arises
from the fact that blendv* instructions only use the sign-bit when deciding which vector element
to choose for the destination vector. The mechanism to fold VSELECT into SHRUNKBLEND nodes already
exists in x86 lowering; this demanded bits change just enables the transform to fire more often.

The original motivation starts with a bug for DSE of masked stores that seems completely unrelated, 
but I've explained the likely steps in this series here:
https://llvm.org/bugs/show_bug.cgi?id=11210

Differential Revision: https://reviews.llvm.org/D29687


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294863 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 18:01:55 +00:00
Amaury Sechet
561536223d Fix typo in test filename. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294860 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 17:48:49 +00:00
Craig Topper
5bb68b46d1 [AVX-512] Add VPMINS/MINU/MAXS/MAXU instructions to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294858 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 17:35:28 +00:00
Simon Pilgrim
ec8a2fa14d [X86][3DNow!] Add tests to ensure PFMAX/PFMIN are not commuted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 14:01:37 +00:00
Simon Pilgrim
bff8d8792a [X86][3DNow!] Enable PFSUB<->PFSUBR commutation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294847 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 13:51:14 +00:00
Simon Pilgrim
0b45ed990b [X86][3DNow!] Enable commutation for PFADD/PFMUL/PFCMPEQ/PAVGUSB/PMULHRW
All commutations confirmed to give identical results - note PFMAX/PFMIN do not

PFSUB<->PFSUBR should be commutable as well

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294846 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 13:32:55 +00:00
Simon Pilgrim
1b593317d1 [X86][3DNow!] Add tests showing missed commutation opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294845 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 13:00:32 +00:00
Simon Pilgrim
fec1e4fec7 [X86][XOP] Regenerate XOP commutation tests.
Added 32-bit tests as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294841 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 12:30:59 +00:00
Simon Pilgrim
53b6da2428 [X86][SSE] Regenerate float comparison commutation tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294840 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 12:29:56 +00:00
Simon Pilgrim
b50a97818a [X86] Regenerate CLMUL commutation tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294839 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 12:23:22 +00:00
Craig Topper
02524a88e4 [AVX-512] Add VPINSRB/W/D/Q instructions to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294830 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 07:01:40 +00:00
Craig Topper
7334434419 [AVX-512] Add VPSADBW instructions to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294827 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 06:24:03 +00:00
Craig Topper
ff0f1ca865 [X86] Don't base domain decisions on VEXTRACTF128/VINSERTF128 if only AVX1 is available.
Seems the execution dependency pass likes to use FP instructions when most of the consuming code is integer if a vextractf128 instruction produced the register. Without AVX2 we don't have the corresponding integer instruction available.

This patch suppresses the domain on these instructions to GenericDomain if AVX2 is not supported so that they are ignored by domain fixing. If AVX2 is supported we'll report the correct domain and allow them to switch between integer and fp.

Overall I think this produces better results in the modified test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294824 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 05:32:57 +00:00
Wei Mi
8b345aabb9 [LSR] Recommit: Allow formula containing Reg for SCEVAddRecExpr related with outerloop.
The recommit includes some changes of testcases. No functional change to the patch.

In RateRegister of existing LSR, if a formula contains a Reg which is a SCEVAddRecExpr,
and this SCEVAddRecExpr's loop is an outerloop, the formula will be marked as Loser
and dropped.

Suppose we have an IR that %for.body is outerloop and %for.body2 is innerloop. LSR only
handle inner loop now so only %for.body2 will be handled.

Using the logic above, formula like
reg(%array) + reg({1,+, %size}<%for.body>) + 1*reg({0,+,1}<%for.body2>) will be dropped
no matter what because reg({1,+, %size}<%for.body>) is a SCEVAddRecExpr type reg related
with outerloop. Only formula like
reg(%array) + 1*reg({{1,+, %size}<%for.body>,+,1}<nuw><nsw><%for.body2>) will be kept
because the SCEVAddRecExpr related with outerloop is folded into the initial value of the
SCEVAddRecExpr related with current loop.

But in some cases, we do need to share the basic induction variable
reg{0 ,+, 1}<%for.body2> among LSR Uses to reduce the final total number of induction
variables used by LSR, so we don't want to drop the formula like
reg(%array) + reg({1,+, %size}<%for.body>) + 1*reg({0,+,1}<%for.body2>) unconditionally.

From the existing comment, it tries to avoid considering multiple level loops at the same time.
However, existing LSR only handles innermost loop, so for any SCEVAddRecExpr with a loop other
than current loop, it is an invariant and will be simple to handle, and the formula doesn't have
to be dropped.

Differential Revision: https://reviews.llvm.org/D26429


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294814 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 00:50:23 +00:00
Ahmed Bougacha
d0491a6b56 [X86] Bitcast subvector before broadcasting it.
Since r274013, we've been looking through bitcasts on broadcast inputs.
In the scalar-folding case (from a load, build_vector, or sc2vec),
the input type didn't matter, as we'd simply bitcast the resulting
scalar back.

However, when broadcasting a 128-bit-lane-aligned element, we create an
EXTRACT_SUBVECTOR.  Use proper types, by creating an extract_subvector
of the original input type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294774 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 19:51:47 +00:00
Tim Northover
10fde8b13b GlobalISel: drop lifetime intrinsics during translation.
We don't use them yet and they just cause problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294770 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 19:10:38 +00:00
Simon Pilgrim
b5a88e2e66 [X86][AVX512] Add vector rotate tests for AVX512 targets
AVX512 does have vector rotate instructions, but we don't lower to them yet

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294766 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 18:06:11 +00:00
Amaury Sechet
863a782973 Autogenerate results for test/CodeGen/X86/peep-test-4.ll . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294765 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 17:57:48 +00:00
Amaury Sechet
ab097ffb48 Autogenerate results for test/CodeGen/X86/pr14314.ll . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 17:57:46 +00:00
John Brawn
b0221e3835 [ARM] Fix incorrect mask bits in MSR encoding for write_register intrinsic
In the encoding of system registers in the M-class MSR instruction the mask bits
should be 2 for registers that don't take a _<bits> qualifier (the instruction
is unpredictable otherwise), and should also be 2 if the register takes a
_<bits> qualifier but it's not present as no _<bits> is an alias for _nzcvq.

Differential Revision: https://reviews.llvm.org/D29828


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294762 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 17:41:08 +00:00
Amaury Sechet
4bf44e4313 Use autogenerate check in CodeGen/X86/pr16031.ll . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294761 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10 17:26:21 +00:00