93577 Commits

Author SHA1 Message Date
Dehao Chen
f77a198b62 Remove cold callsite heuristic that is not necessary because of cold callee heuristic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277863 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 20:49:04 +00:00
Dehao Chen
ffccedb490 Replace hot-callsite based heuristic to use its own threshold parameter instead of share inline-hint parameter
Summary: Hot callsites should have higher threshold than inline hints. This patch uses separate threshold parameter for hot callsites.

Reviewers: davidxl, eraman

Subscribers: Prazek, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277860 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 20:28:41 +00:00
Mike Aizatsky
4613003000 [sanitizers] trace buffer API to use user-allocated buffer.
Differential Revision: https://reviews.llvm.org/D23185

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277859 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 20:09:53 +00:00
Ivan Krasin
51ae50fd08 WholeProgramDevirt: print remarks with devirtualized method names.
Summary:
Chrome on Linux uses WholeProgramDevirt for speed ups, and it's
important to detect regressions on both sides: the toolchain,
if fewer methods get devirtualized after an update, and Chrome,
if an innocently looking change caused many hot methods become
virtual again.

The need to track devirtualized methods is not Chrome-specific,
but it's probably the only user of the pass at this time.

Reviewers: kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277856 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 19:45:16 +00:00
David Callahan
853b86f80a [ADCE] Refactoring for new functionality (NFC)
Summary:
This is another refactoring to break up the one function into three logical components functions.
Another non-functional change before we start added in features.

Reviewers: nadav, mehdi_amini, majnemer

Subscribers: twoh, freik, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277855 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 19:38:11 +00:00
Sanjoy Das
c5201e348e [ConstantFolding] Don't create illegal (non-integral) inttoptrs
Reviewers: majnemer, arsenm

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277854 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 19:23:29 +00:00
David Callahan
fcb7a4a31d [AutoFDO] Fix handling of empty profiles
Summary:
If a profile has no samples for a function, then the function "entry count" is set to the value 0. Several places in the code test that if the Function::getEntryCount is defined at all. Here we change to treat a 0 entry count the same as undefined.

In particular, this fixes a problem in getLayoutSuccessorProbThreshold in MachineBlockPlacement.cpp where we use a different and inferior heuristic for laying out basic blocks.

Reviewers: danielcdh, dnovillo

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 18:38:19 +00:00
Sanjoy Das
a2ef5492ed [SCEV] Don't infinitely recurse on unreachable code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277848 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 18:34:14 +00:00
Kevin Enderby
cedb0b6b7e Add the first of what will be a long line of additional error checks for invalid Mach-O files.
This is where an LC_SEGMENT load command has a fileoff field that
extends past the end of the file.

Also fix llvm-nm and llvm-size to remove the errorToErrorCode() call so error messages are printed.
And needed to update a few test cases now that they do print the error messages just a
bit differently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 18:19:40 +00:00
Dehao Chen
9fb630e4f0 Do not assign new discriminator for all intrinsics.
Summary: We do not care about intrinsic calls when assigning discriminators.

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 17:56:49 +00:00
Tim Northover
47dc780f20 GlobalISel: clear pending phis after MachineFunction translated
Test is just reordering the existing functions (it would trigger for any
function after one with a phi).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277841 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 17:50:36 +00:00
Simon Pilgrim
bdea192076 [X86][SSE] Add initial support for 2 input target shuffle combining.
At the moment only the INSERTPS matching can actually use 2 inputs but the plumbing is now in place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 17:36:14 +00:00
Tim Northover
1249b27b0e GlobalISel: IRTranslate PHI instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277835 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 17:16:40 +00:00
Ulrich Weigand
1025a61506 [PowerPC] Wrong fast-isel codegen for VSX floating-point loads
There were two locations where fast-isel would generate a LFD instruction
with a target register class VSFRC instead of F8RC when VSX was enabled.
This can ccause invalid registers to be used in certain cases, like:
   lfd 36, ...
instead of using a VSX load instruction.  The wrong register number gets
silently truncated, causing invalid code to be generated.


The first place is PPCFastISel::PPCEmitLoad, which had multiple problems:

1.) The IsVSSRC and IsVSFRC flags are not initialized correctly, since they
are computed from resultReg, which is still zero at this point in many cases.
Fixed by changing the helper routines to operate on a register class instead
of a register and passing in UseRC.
 
2.) Even with this fixed, Is64VSXLoad is still wrong due to a typo:

bool Is32VSXLoad = IsVSSRC && Opc == PPC::LFS;
bool Is64VSXLoad = IsVSSRC && Opc == PPC::LFD;

The second line needs to use isVSFRC (like PPCEmitStore does).

3.) Once both the above are fixed, we're now generating a VSX instruction --
but an incorrect one, since generation of an indexed instruction with null
index is wrong. Fixed by copying the code handling the same issue in
PPCEmitStore.


The second place is PPCFastISel::PPCMaterializeFP, where we would emit an
LFD to load a constant from the literal pool, and use the wrong result
register class. Fixed by hardcoding a F8RC class even on systems
supporting VSX.


Fixes: https://llvm.org/bugs/show_bug.cgi?id=28630

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277823 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 15:22:05 +00:00
Zhan Jun Liau
348f66dd36 [SystemZ] Add missing classes and instructions
Summary:
Add instruction formats E, RSI, SSd, SSE, and SSF.

Added BRXH, BRXLE, PR, MVCK, STRAG, and ECTG instructions to test out
those formats.

Reviewers: uweigand

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277822 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 15:14:34 +00:00
Benjamin Kramer
904a5364dd [SimplifyCFG] Make range reduction code deterministic.
This generated IR based on the order of evaluation, which is different
between GCC and Clang. With that in mind you get bootstrap miscompares
if you compare a Clang built with GCC-built Clang vs. Clang built with
Clang-built Clang. Diagnosing that made my head hurt.

This also reverts commit r277337, which "fixed" the test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277820 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 14:55:02 +00:00
Simon Pilgrim
4a1befb048 [X86][SSE] Update the the target shuffle matches to use the effective mask's value type directly instead of via the input value type.
Preparation for adding 2 input support so we want to avoid unnecessary references to the input value type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277817 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 14:33:11 +00:00
Simon Pilgrim
0d58c98b16 [X86][SSE] Consistently use the target shuffle root value type for vector size calculations. NFCI.
Preparation for adding 2 input support so we want to avoid unnecessary references to the input value type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277814 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 13:02:53 +00:00
NAKAMURA Takumi
d55759c8bc LLLexer.cpp: Avoid using BitsToDouble() to preserve SNaN like "double 0x7FF4000000000000".
We should not use double (or float) in the LLVM, unless it is really needed. x87 FP register doesn't preserve SNaN to move the value.

FIXME: APFloat() may have the constructor by raw bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277813 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 11:59:49 +00:00
NAKAMURA Takumi
eb34f4453f Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277812 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 11:59:45 +00:00
Simon Pilgrim
319f67f4cc [X86][SSE] Added target shuffle combine binary compute matching function. NFCI.
Added matchBinaryPermuteVectorShuffle and moved the blend+zero and insertps matching code into it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 11:16:53 +00:00
John Brawn
eca7f4535b Reapply r276973 "Adjust Registry interface to not require plugins to export a registry"
This differs from the previous version by being more careful about template
instantiation/specialization in order to prevent errors when building with
clang -Werror. Specifically:
 * begin is not defined in the template and is instead instantiated when Head
   is. I think the warning when we don't do that is wrong (PR28815) but for now
   at least do it this way to avoid the warning.
 * Instead of performing template specializations in LLVM_INSTANTIATE_REGISTRY
   instead provide a template definition then do explicit instantiation. No
   compiler I've tried has problems with doing it the other way, but strictly
   speaking it's not permitted by the C++ standard so better safe than sorry.

Original commit message:

Currently the Registry class contains the vestiges of a previous attempt to
allow plugins to be used on Windows without using BUILD_SHARED_LIBS, where a
plugin would have its own copy of a registry and export it to be imported by
the tool that's loading the plugin. This only works if the plugin is entirely
self-contained with the only interface between the plugin and tool being the
registry, and in particular this conflicts with how IR pass plugins work.

This patch changes things so that instead the add_node function of the registry
is exported by the tool and then imported by the plugin, which solves this
problem and also means that instead of every plugin having to export every
registry they use instead LLVM only has to export the add_node functions. This
allows plugins that use a registry to work on Windows if
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277806 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 11:01:08 +00:00
Strahinja Petrovic
632e6aa28c [PowerPC] fix passing long double arguments to function (soft-float)
This patch fixes passing long double type arguments to function in 
soft float mode. If there is less than 4 argument registers free 
(long double type is mapped in 4 gpr registers in soft float mode) 
long double type argument must be passed through stack.
Differential Revision: https://reviews.llvm.org/D20114.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 08:47:26 +00:00
Nicolai Haehnle
fd14e4374d [InstCombine] try to fold (select C, (sext A), B) into logical ops
Summary:
Turn (select C, (sext A), B) into (sext (select C, A, B')) when A is i1 and
B is a compatible constant, also for zext instead of sext. This will then be
further folded into logical operations.

The transformation would be valid for non-i1 types as well, but other parts of
InstCombine prefer to have sext from non-i1 as an operand of select.

Motivated by the shader compiler frontend in Mesa for AMDGPU, which emits i32
for boolean operations. With this change, the boolean logic is fully
recovered.

Reviewers: majnemer, spatel, tstellarAMD

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 08:22:29 +00:00
Justin Bogner
784afcbf37 InstCombine: Clean up some trailing whitespace. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277793 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 01:09:48 +00:00
Justin Bogner
afba697b6c InstCombine: Replace some never-null pointers with references. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277792 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-05 01:06:44 +00:00
Sebastian Pop
412eaded02 GVN-hoist: enable by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277786 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 23:49:07 +00:00
Sebastian Pop
1fc6fa722b GVN-hoist: fix early exit logic
The patch splits a complex && if condition into easier to read and understand
logic.  That wrong early exit condition was letting some instructions with not
all operands available pass through when HoistingGeps was true.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277785 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 23:49:05 +00:00
Justin Bogner
05d8fd3707 IR: Provide an IRBuilder Inserter that calls a callback after insertion
Add a generalized IRBuilderCallbackInserter, which is just given a
callback to execute after insertion. This can be used to get rid of
the custom inserter in InstCombine, which will in turn allow me to add
target specific InstCombineCalls API for intrinsics without horrible
layering violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 23:41:01 +00:00
Michael Kuperstein
e788186982 [LV, X86] Be more optimistic about vectorizing shifts.
Shifts with a uniform but non-constant count were considered very expensive to
vectorize, because the splat of the uniform count and the shift would tend to
appear in different blocks. That made the splat invisible to ISel, and we'd
scalarize the shift at codegen time.

Since r201655, CodeGenPrepare sinks those splats to be next to their use, and we
are able to select the appropriate vector shifts. This updates the cost model to
to take this into account by making shifts by a uniform cheap again.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277782 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 22:48:03 +00:00
Sanjay Patel
9615dd011e [InstCombine] use m_APInt to allow icmp eq (mul X, C1), C2 folds for splat constant vectors
This concludes the splat vector enhancements for foldICmpEqualityWithConstant().
Other commits in this series:
https://reviews.llvm.org/rL277762
https://reviews.llvm.org/rL277752
https://reviews.llvm.org/rL277738
https://reviews.llvm.org/rL277731
https://reviews.llvm.org/rL277659
https://reviews.llvm.org/rL277638
https://reviews.llvm.org/rL277629



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 22:19:27 +00:00
Kevin Enderby
74bccc3052 Clean up the logic of the Archive::Child::Child() with an assert to know Err is not a nullptr
when we are pointed at real data.

David Blaikie pointed out some odd logic in the case the Err value was a nullptr and
Lang Hames suggested it could be cleaned it up with an assert to know that Err is
not a nullptr when we are pointed at real data.  As only in the case of constructing
the sentinel value by pointing it at null data is Err is permitted to be a nullptr,
since no error could occur in that case.

With this change the testing for “if (Err)” is removed from the constructor’s logic
and *Err is used directly without any check after the assert().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277776 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 21:54:19 +00:00
Tim Northover
df7cecc36b GlobalISel: extend add widening to SUB, MUL, OR, AND and XOR.
These are the operations that are trivially identical. Division is omitted for
now because you need to use the correct sign/zero extension.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277775 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 21:39:49 +00:00
Tim Northover
3ca2c43264 GlobalISel: add support for G_MUL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 21:39:44 +00:00
Tim Northover
6857d7cf47 GlobalISel: implement narrowing for G_ADD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277769 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:54:13 +00:00
Matt Arsenault
ca17b84bf9 GVNHoist: Don't hoist convergent calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277767 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:52:57 +00:00
Lang Hames
6429bcfeba [ExecutionEngine] Refactor - Roll JITSymbolFlags functionality into JITSymbol.h
and remove the JITSymbolFlags header.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:32:37 +00:00
David Majnemer
5964d136e5 [coroutines] Part 4[ab]: Coroutine Devirtualization: Lower coro.resume and coro.destroy.
This is the forth patch in the coroutine series. CoroEaly pass now lowers coro.resume
and coro.destroy intrinsics by replacing them with an indirect call to an address
returned by coro.subfn.addr intrinsic. This is done so that CGPassManager recognizes
devirtualization when CoroElide replaces a call to coro.subfn.addr with an appropriate
function address.

Patch by Gor Nishanov!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277765 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:30:07 +00:00
Sanjay Patel
0d2bdafffd [InstCombine] use m_APInt to allow icmp eq (and X, C1), C2 folds for splat constant vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277762 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:05:02 +00:00
Yaxun Liu
77990e6e79 [OpenCL] Add missing tests for getOCLTypeName
Adding missing tests for OCL type names for half, float, double, char, short, long, and unknown.

Patch by Aaron En Ye Shi.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277759 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 19:45:00 +00:00
Zachary Turner
92cd0ecb7f [CodeView] Use llvm::Error instead of std::error_code.
This eliminates the remnants of std::error_code from the
DebugInfo libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277758 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 19:39:55 +00:00
Tim Northover
837c7975f4 AArch64: don't assume all i128s are BUILD_PAIRs
It leads to a crash when they're not. I'm *sure* I've made this mistake before,
at least once.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277755 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 19:32:28 +00:00
Sanjay Patel
8c8f13e353 [InstCombine] use m_APInt to allow icmp eq (or X, C1), C2 folds for splat constant vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277752 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 19:12:12 +00:00
Tim Northover
75fec5d2d9 GlobalISel: also add G_TRUNC to IRTranslator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277749 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 18:35:17 +00:00
Tim Northover
143570a5a5 GlobalISel: add code to widen scalar G_ADD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277747 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 18:35:11 +00:00
Derek Schuff
1d5ec70571 [WebAssembly] Check return value of getRegForValue in FastISel
Previously, FastISel for WebAssembly wasn't checking the return value of
`getRegForValue` in certain cases, which would generate instructions
referencing NoReg. This patch fixes this behavior.

Patch by Dominic Chen

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277742 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 18:01:52 +00:00
Krzysztof Parzyszek
24c0d9d17f [Hexagon] Validate register class when doing bit simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 17:56:19 +00:00
Sanjay Patel
47b6d6791b [InstCombine] use m_APInt to allow icmp eq (op X, Y), C folds for splat constant vectors
I'm removing a misplaced pair of more specific folds from InstCombine in this patch as well,
so we know where those folds are happening in InstSimplify.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277738 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 17:48:04 +00:00
Simon Pilgrim
dbed1dc732 [X86][SSE] Rename target shuffle unary permute matching function. NFCI.
In preparation for adding a binary permute matching function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 17:16:50 +00:00
Alina Sbirlea
4ebfadfe76 LoadStoreVectorizer: Remove TargetBaseAlign. Keep alignment for stack adjustments.
Summary:
TargetBaseAlign is no longer required since LSV checks if target allows misaligned accesses.
A constant defining a base alignment is still needed for stack accesses where alignment can be adjusted.

Previous patch (D22936) was reverted because tests were failing. This patch also fixes the cause of those failures:
- x86 failing tests either did not have the right target, or the right alignment.
- NVPTX failing tests did not have the right alignment.
- AMDGPU failing test (merge-stores) should allow vectorization with the given alignment but the target info
  considers <3xi32> a non-standard type and gives up early. This patch removes the condition and only checks
  for a maximum size allowed and relies on the next condition checking for %4 for correctness.
  This should be revisited to include 3xi32 as a MVT type (on arsenm's non-immediate todo list).

Note that checking the sizeInBits for a MVT is undefined (leads to an assertion failure),
so we need to create an EVT, hence the interface change in allowsMisaligned to include the Context.

Reviewers: arsenm, jlebar, tstellarAMD

Subscribers: jholewinski, arsenm, mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277735 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 16:38:44 +00:00