Commit Graph

123146 Commits

Author SHA1 Message Date
David Majnemer
434302d503 [MC] Add support for GNU as-compatible binary operator precedence
GNU as and Darwin give the various binary operators different
precedence.  LLVM's MC supported the Darwin semantics but not the GNU
semantics.

This fixes PR25311.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251271 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 03:15:34 +00:00
David Majnemer
7e2b51ddb0 [MC] Don't crash when .word is given bogus values
We didn't validate that the .word directive was given a sane value,
leading to crashes when we attempt to write out the object file.

Instead, perform some validation and issue a diagnostic pointing at the
start of the diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251270 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 02:45:50 +00:00
Tobias Grosser
aaf72bc7c6 RegionInfo: Correctly expand regions
Instead of playing around with dominance to verify if the possible expansion of
a scop region is indeed a single entry single exit region, we now distinguish
two cases. In case we only append a basic block, all edges entering this basic
block need to have come from within the region that is expanded. In case we join
two regions, the source basic blocks of the edges that end at the entry node of
the region that is appended most be part of either the original region or the
region that is appended.

This change will be tested through Polly.

This fixes llvm.org/PR25242

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 22:55:59 +00:00
Benjamin Kramer
165b4f4e46 Convert assert(false) into llvm_unreachable where it makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251266 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 22:28:27 +00:00
Simon Pilgrim
28c3d642ad [X86][AVX] Regenerate tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251263 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 21:47:09 +00:00
Saleem Abdulrasool
e368f9477a docs: document x mangling in LangRef
Windows has two different mangling specifiers.  `x` is used on x86 for the `_`
UserLabelPrefix.  Others use `w` for the no UserLabelPrefix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251260 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 20:39:35 +00:00
Davide Italiano
d4e4715f54 [ScalarEvolution] Throw away dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251256 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 20:00:49 +00:00
Davide Italiano
94c5c1d096 [ScalarEvolution] Get rid of NDEBUG in header (correctly this time).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251255 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:55:24 +00:00
Sanjoy Das
dd4f44833e [LCSSA] Unbreak build, don't reuse L; NFC
The build broke in r251248.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251251 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:27:17 +00:00
Davide Italiano
33624191af [ScalarEvolution] Get rid of NDEBUG in header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251249 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:13:36 +00:00
Sanjoy Das
f04aae61fa [LCSSA] Use range for loops; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251248 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:08:32 +00:00
Simon Pilgrim
49cf761925 [X86][SSE4A] Fix for EXTRQI shuffle lowering.
Incorrect range test - found during fuzz testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251245 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 17:40:54 +00:00
Simon Pilgrim
1415da8392 [X86][SSE] Refreshed tests (missing AVX512 patterns)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251238 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 15:39:22 +00:00
Elena Demikhovsky
16ed8780c7 Scalarizer for masked.gather and masked.scatter intrinsics.
When the target does not support these intrinsics they should be converted to a chain of scalar load or store operations.
If the mask is not constant, the scalarizer will build a chain of conditional basic blocks.
I added isLegalMaskedGather() isLegalMaskedScatter() APIs.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251237 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 15:37:55 +00:00
Simon Pilgrim
aa2b60f016 [X86][SSE] Added tests for shuffling through bitcasts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251236 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 15:32:04 +00:00
Simon Pilgrim
fc0eed896e [X86][SSE] vector sext/zext tests - remove unnecessary mcpu arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251233 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 12:15:00 +00:00
Simon Pilgrim
696e2f7d49 [X86][SSE] shift/rotate tests - remove unnecessary mcpu arguments and regenerate/cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251232 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 12:07:45 +00:00
Simon Pilgrim
6bd9ab9c64 [X86] PMOV*X* tests - remove unnecessary mcpu arguments and regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251230 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 11:55:10 +00:00
Simon Pilgrim
1487603333 [X86] Stack folding tests - just use mtriple - no need for mcpu in these tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251229 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 11:42:46 +00:00
Michael Kuperstein
8052f4541d [X86] Use correct calling convention for MCU psABI libcalls
When using the MCU psABI, compiler-generated library calls should pass
some parameters in-register. However, since inreg marking for x86 is currently
done by the front end, it will not be applied to backend-generated calls.

This is a workaround for PR3997, which describes a similar issue for -mregparm.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251223 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 08:14:05 +00:00
Michael Kuperstein
c50c6907aa [X86] Add support for elfiamcu triple
This adds support for the i?86-*-elfiamcu triple, which indicates the IAMCU psABI is used.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251222 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 08:07:37 +00:00
Craig Topper
30a1e5aa96 Remove two unnecessary conversions from MVT to EVT. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251219 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 03:15:29 +00:00
Craig Topper
e4745a7931 Use MVT::SimpleValueType instead of MVT in template parameter. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251217 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 00:27:14 +00:00
Rafael Espindola
ef85994685 Simplify boolean conditional return statements in tools/llvm-symbolizer.
Patch by Richard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251216 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 23:23:25 +00:00
Rafael Espindola
51c6afaf85 Simplify boolean expressions in tools/llvm-objdump.
Patch by Richard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251215 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 23:19:10 +00:00
Rafael Espindola
2fe94b6b08 Refactor: Simplify boolean conditional return statements in lib/CodeGen.
Patch by Richard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251213 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 23:11:13 +00:00
Simon Pilgrim
878eaf48c1 [X86][SSE] Use lowerVectorShuffleWithUNPCK instead of custom matches.
Most 128-bit and 256-bit shuffles were manually matching UNPCK patterns - use lowerVectorShuffleWithUNPCK to be more thorough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251211 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 22:45:04 +00:00
Davide Italiano
764129822f [Support] Add comment to explain why we can't drop NDEBUG.
Discussed with: Benjamin Kramer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251210 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 22:15:32 +00:00
Davide Italiano
548219a599 [CodeGen] Get rid of NDEBUG to ensure structure stability.
I think it's fine to keep this fields around in terms of overhead,
I wasn't able to measure any substantial regression while running the
test suite, but, in case this causes some regression I'm ready to revert
and work on an alternative solution.
This was tested building with clang/gcc both in Debug and Release mode
and passes the test-suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251209 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 22:09:54 +00:00
Simon Pilgrim
f811b16da3 [X86][SSE] lowerVectorShuffleWithUNPCK - use equivalent shuffle mask test.
Use isShuffleEquivalent to match UNPCK shuffles - better support for build vector inputs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251207 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 20:48:08 +00:00
Michael Zolotukhin
df43fcd565 Refactor: Simplify boolean conditional return statements in lib/Transforms/Vectorize (NFC).
Summary: Use clang-tidy to simplify boolean conditional return statements

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

Patch by Richard<legalize@xmission.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251206 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 20:16:42 +00:00
Simon Pilgrim
5dbc03472b Removed old FIXME - we do generate movddup for SSE3 and higher
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251205 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 20:15:43 +00:00
Simon Pilgrim
c0bfd317a3 [DAGCombiner] Tidy up ConstantFP commutation. NFCI
Move ConstantFP canonicalization of commutative instructions to start of 2-op node creation (matches integer) - simplifies constant folding code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 20:06:18 +00:00
Benjamin Kramer
ba3f3a65e6 Use all_of to simplify control flow. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251202 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 19:30:37 +00:00
Yaron Keren
bf4fbb2909 Add libuuid to required system libraries list for mingw.
This list is produced by llvm-config --system-libs to be used
by external programs using the llvm libraries, such as creduce.
In r250501 llvm/Support/Windows/Path.inc started to use the constant
FOLDERID_Profile from libuuid.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251201 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 19:27:28 +00:00
Benjamin Kramer
ff0edf02b3 Use find_if to simplify control flow. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251200 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 19:03:15 +00:00
Simon Pilgrim
2bc87a6f42 [DAGCombiner] Generalize masking of constant rotates.
We don't need a mask of a rotation result to be a constant splat - any constant scalar/vector can be usefully folded.

Followup to D13851.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251197 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 18:44:52 +00:00
Craig Topper
75af6938b2 Call the version of ConvertCostTableLookup that takes a statically sized array rather than pointer and size. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251196 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 18:40:22 +00:00
Hans Wennborg
76da85d572 X86ISelLowering: Support tail calls to/from callee pop functions
This enables tail calls with thiscall, stdcall, vectorcall and
fastcall functions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251190 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 16:47:10 +00:00
Simon Pilgrim
3f3f65ad5f Fix unused variable warning. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251189 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 13:41:45 +00:00
Simon Pilgrim
d0ca754540 [X86][XOP] Add support for lowering vector rotations
This patch adds support for lowering to the XOP VPROT / VPROTI vector bit rotation instructions.

This has required changes to the DAGCombiner rotation pattern matching to support vector types - so far I've only changed it to support splat vectors, but generalising this further is feasible in the future.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251188 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 13:17:26 +00:00
Benjamin Kramer
109f9e6f71 [TblGen] ArrayRefize CodeGenSchedule. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251187 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 12:46:49 +00:00
Benjamin Kramer
55cb91eee9 [TblGen] ArrayRefize TGParser. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251186 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 12:46:45 +00:00
Benjamin Kramer
d2c7e761d2 [BasicAliasAnalysis] Simplify expression, no functional change.
(-1) - x + 1 is the same as -x.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251185 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 11:38:01 +00:00
NAKAMURA Takumi
a6f34a57ce ScalarReplAggregates.cpp: Try to appease clash of anonymous::SROA in modules build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251181 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 06:42:42 +00:00
Sanjoy Das
5dacfa466d Extract out getConstantRangeFromMetadata; NFC
The loop idiom creating a ConstantRange is repeated twice in the
codebase, time to give it a name and a home.

The loop is also repeated in `rangeMetadataExcludesValue`, but using
`getConstantRangeFromMetadata` there would not be an NFC -- the range
returned by `getConstantRangeFromMetadata` may contain a value that none
of the subranges did.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251180 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 05:37:35 +00:00
Sanjoy Das
b4c96f7993 Fix whitespace issues in two places; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251179 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 05:37:28 +00:00
NAKAMURA Takumi
614bd35c79 llvm/Transforms/Utils/LoopVersioning.h requires llvm/Analysis/LoopAccessAnalysis.h for RuntimePointerChecking::PointerCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251178 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 05:26:02 +00:00
Kostya Serebryany
242325ad98 [libFuzzer] add -merge flag to merge corpora
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251168 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 01:16:40 +00:00
NAKAMURA Takumi
4a000fe340 Fix ADT/UniqueVector.h to resolve implicit dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251165 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 00:27:22 +00:00