Commit Graph

133443 Commits

Author SHA1 Message Date
Sanjay Patel
8858190401 [x86] add missing tests for fcmp ueq/one
Somehow, the codegen logic for these sequences has gone completely untested
until now (note the 2 compare instructions generated per test).

There's also an *Intel* AVX optimization opportunity exposed in these cases
and the existing tests. Intel's (but not AMD's) AVX spec shows that extra FP
predicates were added, so a single comparison should always be sufficient,
and operand commutation should never be necessary.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272397 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 15:17:54 +00:00
Sanjay Patel
7564bb471e [x86] regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272396 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 14:48:50 +00:00
Matthew Simpson
570bf9da46 Reapply "[TTI] Refine default cost for interleaved load groups with gaps"
This reapplies commit r272385 with a fix. The build was failing when compiled
with gcc, but not with clang. With the fix, we now get the data layout from the
current TTI implementation, which will hopefully solve the issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 14:33:30 +00:00
Roman Shirokiy
fb61c4384c Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 13:12:48 +00:00
Simon Pilgrim
d6d608f9e8 [X86][SSE] Added target shuffle combine tests for byte shift/rotates (PSLLDQ/PSRLDQ/PALIGNR)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272392 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 13:03:22 +00:00
Matthew Simpson
f8ad75dbd3 Revert "[TTI] Refine default cost for interleaved load groups with gaps"
This reverts commit r272385. This commit broke the build. I'm temporarily
reverting to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 12:41:33 +00:00
Matthew Simpson
8f626cdbc5 [TTI] Refine default cost for interleaved load groups with gaps
This patch refines the default cost for interleaved load groups having gaps. If
a load group has gaps, the legalized instructions corresponding to the unused
elements will be dead. Thus, we don't need to account for them in the cost
model. Instead, we only need to account for the fraction of legalized loads
that will actually be used.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272385 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 11:27:51 +00:00
Sam Kolton
bc0e31263e [AMDGPU] AsmParser: Support for sext() modifier in SDWA. Some code cleaning in AMDGPUOperand.
Summary:
sext() modifier is supported in SDWA instructions only for integer operands. Spec is unclear should integer operands support abs and neg modifiers with sext - for now they are not supported.
Renamed InputModsWithNoDefault to FloatInputMods. Added SextInputMods for operands that support sext() modifier.
Added AMDGPUOperand::Modifier struct to handle register and immediate modifiers.
Code cleaning in AMDGPUOperand class: organize method in groups (render-, predicate-methods...).

Reviewers: vpykhtin, artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 09:57:59 +00:00
Simon Pilgrim
0d0f696346 [X86][AVX512] Added VPSLLDQ/VPSRLDQ memory fold tests
Memory operand is new for AVX512 (SSE/AVX2 didn't support it).

Also dropped the 'mask' from the tests (VPSLLDQ/VPSRLDQ don't support masked operations).

Regenerated VPALIGNR test now that the shuffle comments work

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 09:56:20 +00:00
Sean Silva
7627608849 Fix stale name in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272382 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 08:48:49 +00:00
Roger Ferrer Ibanez
cd22fc50f9 test commit: remove trailing whitespaces in README.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 08:19:58 +00:00
Xinliang David Li
f4c13256d7 Bug fix remove another illegal char from prof symbol name
End-end test with no integrated assembly should be added 
at some point (not done now because some bots are not properly configured to
support -no-integrated-as)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272376 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 06:32:26 +00:00
Dan Liew
bb05836e33 [LibFuzzer] Fix some unit test crashes on OSX.
This fixes the following unit tests:

FuzzerDictionary.ParseOneDictionaryEntry
FuzzerDictionary.ParseDictionaryFile

The issue appears to be mixing non-ASan-ified code (LibFuzzer) and
ASan-ified code (the unittest) as the tests would pass fine if
everything was built with ASan enabled.

I believe the issue is that different implementations of std::vector<>
are being used in LibFuzzer and outside LibFuzzer (in the unittests).
For Libcxx (I've not seen the issue manifest for libstdc++) we can disable
the ASanified std::vector<> by definining the ``_LIBCPP_HAS_NO_ASAN`` macro.
Doing this fixes the tests on OSX.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 05:33:07 +00:00
Craig Topper
93d64262da Add missing include for r272369
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272373 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 05:19:42 +00:00
Craig Topper
e041e2676c [AVX512] Add shuffle comment printing for masked VPERMPD/VPERMQ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272371 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 05:12:40 +00:00
Zachary Turner
90005b6d83 Make PDBFile take a StreamInterface instead of a MemBuffer.
This is the next step towards being able to write PDBs.
MemoryBuffer is immutable, and StreamInterface is our replacement
which can be any combination of read-only, read-write, or write-only
depending on the particular implementation.

The one place where we were creating a PDBFile (in RawSession) is
updated to subclass ByteStream with a simple adapter that holds
a MemoryBuffer, and initializes the superclass with the buffer's
array, so that all the functionality of ByteStream works
transparently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 05:10:19 +00:00
Zachary Turner
579bef0ca2 Add support for writing through StreamInterface.
This adds method and tests for writing to a PDB stream.  With
this, even a PDB stream which is discontiguous can be treated
as a sequential stream of bytes for the purposes of writing.

Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21157

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 05:09:12 +00:00
Craig Topper
0e4bc86c7c [AVX512] Fix shuffle comment printing to handle the masked versions of some shuffles. Previously we were printing the mask operands as the register names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272367 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 04:48:05 +00:00
Daniel Dunbar
434c834954 [lit] Only gather redirected files for command failures.
- The intended use of this was just in diagnostics, so we shouldn't pay the
   cost of reading these all the time.

 - This will avoid including the full output of each command in tests which
   fail, but the most important use case for this was to gather the output of
   the specific command which failed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272365 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 04:17:30 +00:00
Matt Arsenault
f67ce497e1 AMDGPU: Fix trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 02:18:02 +00:00
Qin Zhao
6eba425a2f [esan|cfrag] Add the struct field offset array in StructInfo
Summary:
Adds the struct field offset array in struct StructInfo.

Updates test struct_field_count_basic.ll.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 02:10:06 +00:00
Quentin Colombet
47535581c8 [LiveRangeEdit] Add a test case for r272314.
The test case is not great espicially because it is still cumbersome to
run the regalloc pass with run-pass. (We miss a bunch of initiliazier to
be properly implemented.)

Related to llvm.org/PR27983

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 01:57:48 +00:00
Richard Trieu
fc34cc4521 Add null checks before using a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272359 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 01:42:05 +00:00
Quentin Colombet
7f8e1c60de [llc] Do not create the pass config several times for run-pass.
Thanks to Matthias Braun for spotting this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272358 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 01:12:06 +00:00
Quentin Colombet
aef5f640f7 [llc] Add support for several run-pass options.
Previously we could run only one machine pass with the run-pass option.
With that patch, we can now specify several passes with several run-pass
options (or just one option with a list of comma separated passes) and
llc will build the related pipeline.
This is great to test the interaction of two passes that are not
necessarily next to each other in the pipeline, or play with pass
ordering.
Now, we should be at parity with opt for the flexibility of running
passes.

Note: I also moved the run pass option from CommandFlags.h to llc.cpp
because, really, this is needed only there!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272356 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 00:52:10 +00:00
Qin Zhao
01724b2e65 [esan|cfrag] Disable load/store instrumentation for cfrag
Summary:
Adds ClInstrumentFastpath option to control fastpath instrumentation.

Avoids the load/store instrumentation for the cache fragmentation tool.

Renames cache_frag_basic.ll to working_set_slow.ll for slowpath
instrumentation test.

Adds the __esan_init check in struct_field_count_basic.ll.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272355 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 00:48:53 +00:00
Matt Arsenault
f6a6d012bf Update call site attribute documentation
convergent is also accepted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 00:36:57 +00:00
Tom Stellard
81027a2126 docs: Add AMDGPU relocation information
Summary:
This documents the various relocation types that are supported by the
Radeon Open Compute (ROC) runtime (which is essentially the dynamic
linker for AMDGPU).

Only R_AMDGPU_32 is not currently supported by the ROC runtime, but
it will usually be resolved at link time by lld.

Patch by: Konstantin Zhuravlyov

Reviewers: kzhuravl, rafael

Subscribers: rafael, arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272352 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 00:31:13 +00:00
Matt Arsenault
dbaa4b4486 AMDGPU: v_cndmask_b32 does not def vcc
Fixes verifier errors after SIShrinkInstructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272351 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 00:18:41 +00:00
Tom Stellard
60f588f570 AMDGPU/SI: Make sure to emit TargetConstant nodes when matching ds_*permute
Summary:
This fixes a bug with ds_*permute instructions where if it was passed a
constant address, then the offset operand would get assigned a register
operand instead of an immediate.

Reviewers: scchan, arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10 00:01:04 +00:00
Chris Bieneman
6c347f62cf [CMake] Removing fallback code for CMake versions before 3.1
This code is dead code now. Out with the old, in with the new!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272347 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:53:22 +00:00
Tom Stellard
aeca746050 AMDGPU/SI: Use common topological sort algorithm in SIScheduleDAGMI
Reviewers: arsenm, axeldavy

Subscribers: MatzeB, arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272346 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:48:02 +00:00
Matt Arsenault
4080a06a24 AMDGPU: Fix flat atomics
The flat atomics could already be selected, but only
when using flat instructions for global memory. Add
patterns for flat addresses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272345 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:42:54 +00:00
Matt Arsenault
bada556f73 AMDGPU: Fix i64 global cmpxchg
This was using extract_subreg sub0 to extract the low register
of the result instead of sub0_sub1, producing an invalid copy.

There doesn't seem to be a way to use the compound subreg indices
in tablegen since those are generated, so manually select it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:42:48 +00:00
Matt Arsenault
003d842e7f AMDGPU: Fix missing and broken check lines in atomic tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272343 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:42:44 +00:00
Vitaly Buka
e330b7d89a Make sure that not interesting allocas are not instrumented.
Summary:
We failed to unpoison uninteresting allocas on return as unpoisoning is part of
main instrumentation which skips such allocas.

Added check -asan-instrument-allocas for dynamic allocas. If instrumentation of
dynamic allocas is disabled it will not will not be unpoisoned.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272341 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:31:59 +00:00
Matt Arsenault
dcd25f4149 CodeGen: Allow verifier to run after MachineBlockPlacement
No tests break with this enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272340 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:31:55 +00:00
Eric Christopher
7da58e6313 Add aliases for mfvrsave/mtvrsave.
Update a test as we're now going to emit it for easier reading of
generated assembly as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:27:48 +00:00
Matt Arsenault
b8aff5533e AMDGPU: Run verifer after insert waits pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272338 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:19:14 +00:00
Matt Arsenault
3b52126962 AMDGPU: Remove incorrect assertion
I'm still not sure under what circumstances the offset here is non-0,
but private memory is not limited to 27-bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:19:08 +00:00
Matt Arsenault
dad6f6f388 AMDGPU: Properly initialize SIShrinkInstructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272336 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:18:47 +00:00
George Burgess IV
bec2df684f [CFLAA] Handle global/arg attrs more sanely.
Prior to this patch, we used argument/global stratified attributes in
order to note that a value could have come from either dereferencing a
global/arg, or from the assignment from a global/arg.

Now, AttrUnknown is placed on sets when we see a dereference, instead of
the global/arg attributes. This allows us to be more aggressive in the
future when we see global/arg attributes without AttrUnknown.

Patch by Jia Chen.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272335 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:15:04 +00:00
Vitaly Buka
af4c28d141 Unpoison stack memory in use-after-return + use-after-scope mode
Summary:
We still want to unpoison full stack even in use-after-return as it can be disabled at runtime.

PR27453

Reviewers: eugenis, kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:05:35 +00:00
Alina Sbirlea
337c62e99d Reapply 272328 and 272329 as a single patch.
[cpu-detection] [amdfam10] Return barcelona, and amdfam10 for all other
subtypes. Address Bug 28067.

Along with the refactoring of Host.cpp, getHostCPUName() was modified to
return more precise types for CPUs in amdfam10.
However, callers of getHostCPUName() do string matching on type, so this
cannot be modified.
Currently there is support in the x86 backend for barcelona.
For all other subtypes the assumed return value is amdfam10.

Fix: getHostCPUName() returns barcelona subtype and amdfam10 for all
others. This can be extended further when support for the other subtypes
is added.

Differential revision: http://reviews.llvm.org/D21193

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272333 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:04:15 +00:00
Alina Sbirlea
3bd97ac17f Revert 272328 and 272329 to recommit as a single patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272332 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:04:05 +00:00
Alina Sbirlea
05161061c3 Keep barcelona subtype for amdfam10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:47:36 +00:00
Alina Sbirlea
539e7710fb [cpu-detection] Return amdfam10 for all subtypes. Address Bug 28067.
Summary: Remove architecture subtype from the string returned by getHostCPUName(). String matching done on type.

Reviewers: llvm-commits, echristo

Subscribers: mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:47:12 +00:00
Chris Bieneman
22f7a63da6 [CMake] Cleanup ExternalProject usage of CMake 3.x features
All the ExternalProject features in use here are supported by CMake 3.4.3, so we don't need these version checks anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272327 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:41:36 +00:00
Easwaran Raman
f8bdcad7be Use ProfileSummaryInfo in inline cost analysis.
Instead of directly using MaxFunctionCount and function entry count to determine callee hotness, use the isHotFunction/isColdFunction methods provided by ProfileSummaryInfo.

Differential revision: http://reviews.llvm.org/D21045


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:23:21 +00:00
Simon Pilgrim
8f579ce1a6 [X86][AVX512] Added avx512 VPSLLDQ/VPSRLDQ instruction comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272319 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:03:15 +00:00