146370 Commits

Author SHA1 Message Date
Diana Picus
9ce81e13ed [ARM] GlobalISel: Support SP in regbankselect
We used to hit an unreachable in getRegBankFromRegClass when dealing with the
stack pointer. This commit adds support for the GPRsp reg class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297621 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 14:28:34 +00:00
Aaron Ballman
61d9d49df6 Reverting r297617 because it broke some bots:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/49970

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297618 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 12:24:51 +00:00
Aaron Ballman
565edc0441 Add support for getting file system permissions and implement sys::fs::permissions to set them.
Patch by James Henderson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297617 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 12:17:14 +00:00
Balaram Makam
61b914021f [AArch64] Map Sched Read/Write resources for Falkor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297611 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 10:42:17 +00:00
Gil Rapaport
710c3a271b [LV] Set memcheck metadata also for VF==1
This commit is a follow-up on r297580. It fixes the FIXME added temporarily
by that commit to keep the removal of Unroller's specialized version of
scalarizeInstruction() an NFC. See https://reviews.llvm.org/D30715 for details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297610 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 10:23:46 +00:00
Sjoerd Meijer
f106d176a5 ARMDisassembler: loop over ARM decode tables
Loop over the ARM decode tables; this is a clean-up to reduce some code
duplication.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297608 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 09:41:10 +00:00
Konstantin Zhuravlyov
cc6885fb95 AMDGPU/RelocVisitor: Handle R_AMDGPU_ABS64
Test is in the separate patch.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297604 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 06:03:11 +00:00
Craig Topper
04b36a711b [AVX-512] Add EVEX2VEX test cases for the cvt instructions fixed in r297599 and r297600.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297603 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 05:47:56 +00:00
Craig Topper
760a31890d Revert "[AVX-512] EVEX2VEX, don't reject intrinsic instructions when both have a memory operand. We should just continue to check other operands instead."
This reverts r297596.

There were other issues that were making this not work that have been fixed now. Reverting this results in a more accurate table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 05:34:03 +00:00
Craig Topper
4d3597d1aa [AVX-512] Add VEX_WIG to VEX vcvtsd2ss/vcvtss2sd intrinsic instructions so they can be correctly matched by EVEX2VEX table generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297601 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 05:14:47 +00:00
Craig Topper
3fd02da39f [AVX-512] Use sse_loadf32/f64 for vcvtss2sd and vcvtsd2ss intrinsic patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297600 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 05:14:44 +00:00
Craig Topper
8f5c391837 [AVX-512] Use sse_load_f64/f32 in VCVTSS2SI/VCVTSD2SI patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297599 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 03:59:06 +00:00
Craig Topper
c68171ad8f [AVX-512] EVEX2VEX, don't reject intrinsic instructions when both have a memory operand. We should just continue to check other operands instead.
This exposed that we have several intrinsic instructions that have identical TSFlags to other instructions. We should merge their patterns and kill of the duplicate. I'll fix that in a follow up patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297596 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 00:36:49 +00:00
Craig Topper
026472f7e8 [X86] Minor formatting tweaks in EVEX to VEX tables. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297595 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 00:36:46 +00:00
Craig Topper
0b63a31597 [X86] Remove unused SDTypeProfile. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297594 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 23:05:03 +00:00
Craig Topper
b853c36a90 [X86] Lower SSE/AVX cmpps/pd intrinsics directly to X86ISD::CMPP SDNodes.
This allows us to remove a duplicate set of patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297593 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 23:05:00 +00:00
Craig Topper
acde888274 [AVX-512] Fix the valid immediates for the scatter/gather prefetch intrinsics.
The immediate should be 1 or 2, not 0 or 1. This was found while adding bounds checking to clang. In fact the existing clang builtin test failed if we ran it all the way to assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297591 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 22:29:12 +00:00
Sanjay Patel
cc9614d291 [x86] don't blindly transform SETB into SBB
I noticed unnecessary 'sbb' instructions in D30472 and while looking at 'ptest' codegen recently. 
This happens because we were transforming any 'setb' - even when we only wanted a single-bit result.

This patch moves those transforms under visitAdd/visitSub, so we we're only creating sbb/adc when it
is a win. I don't know why we need a SETCC_CARRY node type, but I'm not proposing to change that
existing behavior in this patch.

Also, I'm skeptical that sbb/adc are a win for all micro-arches, so I added comments to the test files
where this transform still fires.

The test changes here are all cases where we no longer produce sbb/adc. Avoiding partial register
stalls (generating an xor to clear a register) is not handled in some cases, but that's a separate
issue.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297586 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 18:28:48 +00:00
Anna Thomas
5596b4146c [LVI] Add Datalayout to the class LazyValueInfo since all its Impls require it. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297583 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 14:06:41 +00:00
Azharuddin Mohammed
beaedd7463 Remove CRC32 instructions from AArch64InstrInfo::hasShiftedReg
Summary:
A53 scheduler causes an assertion failure on all CRC instructions:
include/llvm/CodeGen/MachineInstr.h:280: const llvm::MachineOperand
&llvm::MachineInstr::getOperand(unsigned int) const: Assertion `i <
getNumOperands() && "getOperand() out of range!"' failed.

The case statements corresponding to CRC instructions are incorrect and should
be removed.

Also adding a testcase while on this.

Reviewers: t.p.northover, javed.absar, apazos, rengolin

Reviewed By: rengolin

Subscribers: evandro, aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297582 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 14:02:32 +00:00
Igor Breger
fbb692e572 [X86] Add vector zext tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297581 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 13:20:10 +00:00
Gil Rapaport
dd86c5c182 [LV] A unified scalarizeInstruction() for Vectorizer and Unroller; NFC
Unroller's specialized scalarizeInstruction() is mostly duplicating Vectorizer's
variant. OTOH Vectorizer's scalarizeInstruction() already supports the special
case of VF==1 except for avoiding mask-bit extraction in that case. This patch
removes Unroller's specialized version in favor of a unified method.

The only functional difference between the two variants seems to be setting
memcheck metadata for loads and stores only in Vectorizer's variant, which is a
bug in Unroller. To keep this patch an NFC the unified method doesn't set
memcheck metadata for VF==1.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297580 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 12:31:38 +00:00
Ayal Zaks
33175e7038 Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297579 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 09:48:06 +00:00
Daniel Berlin
6b544010f4 Split NewGVN class into a legacy pass and an impl, instead of a merged class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297576 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 04:46:45 +00:00
Daniel Berlin
b9513eac4a Add documentation on debug counters to Programmers Manual.
Reviewers: mehdi_amini

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297575 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 04:46:41 +00:00
Craig Topper
2e124a6c7c [AVX-512] Fix a bad use of a high GR8 register after copying from a mask register during fast isel. This ends up extracting from bits 15:8 instead of the lower bits of the mask.
I'm pretty sure there are more problems lurking here. But I think this fixes PR32241.

I've added the test case from that bug and added asserts that will fail if we ever try to copy between high registers and mask registers again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297574 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 03:37:37 +00:00
Craig Topper
a168e94d13 [AVX-512] Add test case for PR32241. Fix coming in another commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297573 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 03:37:34 +00:00
Craig Topper
dc5289bce8 [AVX-512] Remove unused field in X86VectorVTInfo tablegen class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297572 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 03:37:32 +00:00
Simon Pilgrim
c856889d16 [X86][SSE] Improve extraction of elements from v16i8 (pre-SSE41)
Without SSE41 (pextrb) we currently extract byte elements from a vector by spilling to stack and reloading the byte.

This patch is an initial attempt at using MOVD/PEXTRW to extract the relevant DWORD/WORD from the vector and then shift+truncate to collect the correct byte.

Extraction of multiple bytes this way would result in code bloat, but as explained in the patch we could probably afford to be more aggressive with the supported extractions before again falling back on spilling - possibly through counting the number of extracts and which DWORD/WORD they originate?

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297568 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 20:42:31 +00:00
Simon Pilgrim
b19519ea3a Remove unnecessary whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297567 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 20:23:59 +00:00
Simon Pilgrim
892d11dc78 Fix signed/unsigned comparison warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297565 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 19:38:22 +00:00
Craig Topper
39936dcadb [X86] Add avx2 gather tests cases that show a failure to remove zeroing of the source when the mask is all ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297564 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 18:26:00 +00:00
Craig Topper
912d6f2d9c [X86] Remove unnecessary commented out code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297563 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 18:25:56 +00:00
Simon Pilgrim
6665df9d6e Fix signed/unsigned comparison warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297561 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 13:02:31 +00:00
Simon Pilgrim
391cb79344 Fix -Wsentinel warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 12:56:02 +00:00
Amaury Sechet
ff2afbf7d8 Use setBits in SelectionDAG
Summary: As per title.

Reviewers: RKSimon

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297559 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 11:24:03 +00:00
Matt Arsenault
a8ffe4b37c AMDGPU: Remove packf16 intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297557 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 05:51:16 +00:00
Matt Arsenault
dbe625a311 AMDGPU: Keep track of modifiers when converting v_mac to v_mad
Since v_max_f32_e64/v_max_f16_e64 can be folded if the target
instruction supports the clamp bit, we also need to maintain
modifiers when converting v_mac to v_mad.

This fixes a rendering issue with Dirt Rally because a v_mac
instruction with the clamp bit set was converted to a v_mad
but that bit was lost during the conversion.

Fixes: e184e01dd79 ("AMDGPU: Fold FP clamp as modifier bit")

Patch by Samuel Pitoiset <samuel.pitoiset@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297556 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 05:40:40 +00:00
Kostya Serebryany
cef724571c [libFuzzer] add more iterations to LLVMFuzzer-Memcmp64BytesTest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297554 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 05:14:49 +00:00
Zachary Turner
0c00564027 [ADT] Add a DenseMapInfo<T> for shorts.
Differential Revision: https://reviews.llvm.org/D30857

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297552 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 02:52:48 +00:00
Kostya Serebryany
fbfddad6eb [libFuzzer] reduce the number of vector resizes during merge (https://github.com/google/oss-fuzz/issues/445)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297551 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 02:50:47 +00:00
Zachary Turner
3789291c4f Fix line endings of DenseMapInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297550 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 02:50:18 +00:00
Zachary Turner
cd7ec33c9e Remove eol-style:native from DenseMapInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297549 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 02:47:59 +00:00
Zachary Turner
9c4a13d7e8 [Support] Add a formatv provider for Twine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297548 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 02:45:50 +00:00
Kostya Serebryany
3bc8c19932 [libFuzzer] print how much memory is consumed by the outer merge process (https://github.com/google/oss-fuzz/issues/445)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297546 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 02:26:20 +00:00
Eric Fiselier
700231444c Revert r297516 - Respect CMAKE_INSTALL_MANDIR for sphinx generated manpages
When CMAKE_INSTALL_MANDIR isn't defined it ends up attempting to install
the man pages under "/man1" and we really don't want to accidentally install
stuff at the filesystem root.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297545 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 02:24:13 +00:00
Kostya Serebryany
47ec3386d2 [libFuzzer] add test/LargeTest.cpp, mostly for manual experiments with large number of edges, not yet suitable for unit testing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297544 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 01:54:06 +00:00
Kostya Serebryany
f0f231aaf9 [libFuzzer] remove fuzzer-jobs.test which is flaky and not very useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297543 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 01:48:54 +00:00
Daniel Berlin
57bd1ea8eb Remove opt-bisect support for "cases" in favor of debug counters
Summary:
Ths "cases" support was not quite finished, is unused, and is really just debug counters.
(well, almost, debug counters are slightly more powerful, in that they can skip things at the start, too).
Note, opt-bisect itself could also be implemented as a wrapper around
debug counters, but not sure it's worth it ATM.

I'll shove it on a todo list if we think it is.

Reviewers: MatzeB, chandlerc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297542 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 01:41:03 +00:00
Jordan Rose
621f2c2cdd [unittest] Explicitly specify alignment when using BumpPtrAllocator.
r297310 began inserting red zones around allocations under ASan, which
perturbs the alignment of subsequent allocations. Deliberately specify
this in two places where it matters.

Fixes failures when these tests are run under ASan and UBSan together.
Reviewed by Duncan Exon Smith.

rdar://problem/30980047

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297540 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 01:24:56 +00:00