Commit Graph

143464 Commits

Author SHA1 Message Date
Lang Hames
d7472fa68e [Orc][RPC] Return unsupported rpc function errors from the non-retry cases in
negotiateFunction.

These cases were accidentally left out of r292055, resulting in a less
descriptive ECError being returned on these paths.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292193 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 04:07:48 +00:00
Ahmed Bougacha
ce7126af56 Revert "[TLI] Robustize SDAG proto checking by merging it into TLI."
This reverts commit r292189, as it causes issues on SystemZ bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292191 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 03:31:00 +00:00
Ahmed Bougacha
f42a59313b [TLI] Robustize SDAG proto checking by merging it into TLI.
SelectionDAGBuilder recognizes libfuncs using some homegrown
parameter type-checking.

Use TLI instead, removing another heap of redundant code.

This isn't strictly NFC, as the SDAG code was too lax.
Concretely, this means changes are required to two tests:
- calling a non-variadic function via a variadic prototype isn't OK;
  it just happens to work on x86_64 (but not on, e.g., aarch64).
- mempcpy has a size_t parameter;  the SDAG code accepts any integer
  type, which meant using i32 on x86_64 worked.

I don't think it's worth supporting either of these (IMO) broken
testcases.  Instead, fix them to be more correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292189 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 03:10:06 +00:00
Ahmed Bougacha
be550d0c30 [TLI] Add prototype checking for all remaining LibFuncs.
This is another step towards unifying all LibFunc prototype checks.
This work started in r267758 (D19469);  add the remaining checks.

Also add a unittest that checks each libfunc declared with a known-valid
and known-invalid prototype.  New libfuncs added in the future are
required to have prototype checking in place; the known-valid test will
fail otherwise.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292188 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 03:10:02 +00:00
Ahmed Bougacha
70b9507f8a [TLI] Alphabetize some of the prototype check switch. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292187 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 03:10:00 +00:00
Ahmed Bougacha
9f3881a339 [unittests] Alphabetize cmake file list. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292186 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 03:09:55 +00:00
Alexei Starovoitov
de21301ed7 [bpf] error when BPF stack size exceeds 512 bytes
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292180 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 01:05:17 +00:00
David Majnemer
4b66daa8cc [InstCombine] Fold ((C1-zext(X)) & C2) -> zext((C1-X) & C2)
This is valid if C2 fits within the bitwidth of X thanks to two's
complement modulo arithmetic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292179 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 00:45:57 +00:00
Matt Arsenault
3802a656d3 Add comment to test file I forgot to save
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292178 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 00:35:28 +00:00
Matt Arsenault
3bd79e8a80 SimplifyLibCalls: Remove checks for fabs
Use the intrinsic instead of emitting the libcall which
will be replaced by the intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292176 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 00:30:31 +00:00
Matt Arsenault
d4ac29ff29 AMDGPU: Remove dead pattern
This is the unsafe conversion pattern, but not guarded by
an unsafe math check. It is also already done in LegalizeDAG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292173 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 00:10:43 +00:00
Matt Arsenault
5276f9a934 SimplifyLibCalls: Replace fabs libcalls with intrinsics
Add missing fabs(fpext) optimzation that worked with the call,
and also fixes it creating a second fpext when there were multiple
uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292172 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 00:10:40 +00:00
Davide Italiano
1fb192ef5a [Object] Fixup permissions of input files.
They just need to be read/dumped, so no need to set the exec
bit on any of them. NFCI, I guess.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292171 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 23:28:58 +00:00
Davide Italiano
d97e73205c [llvm-objdump] Dump PT_NOTE as part of -p.
PR: 31641

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292170 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 23:13:46 +00:00
Davide Italiano
d871b20cb5 [llvm-objdump] Dump PT_GNU_RELRO as part of -p.
PR: 31641

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292169 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 22:58:26 +00:00
Davide Italiano
91010967e3 [llvm-objdump] Dump PT_OPENBSD_{BOOTDATA,RANDOMIZE,WXNEEDED}.
PR: 31641

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292167 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 22:01:41 +00:00
David Blaikie
1854d25176 Add missing header to see if that clears up the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292166 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 21:40:08 +00:00
Simon Pilgrim
663d71421c [InstCombine][AVX] Tests showing missed opportunities to pass demanded elts through a permilpd/permilps shuffle mask
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292165 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 21:34:22 +00:00
Sanjay Patel
4ee9281ee4 [InstCombine] use m_APInt instead of faking it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292164 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 21:24:41 +00:00
David Blaikie
aab72f0669 Attempt to fix the MSVC build by using llvm::errc instead of std::errc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292163 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 21:20:51 +00:00
Jan Vesely
6d821c2f7c ADMGPU/EG,CM: Implement _noret global atomics
_RTN versions will be a lot more complicated

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292162 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 21:20:13 +00:00
David Blaikie
061ca191c0 [XRay] Implement the llvm-xray graph subcommand
Here we define the `graph` subcommand which generates a graph from the function
call information and uses it to present the call information graphically with
additional annotations.

Reviewers: dblaikie, dberris

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292156 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 20:36:26 +00:00
David Blaikie
758377052d Attempt to workaround MSVC build issue where I suspect an enum class constant 0 is considered a possible null pointer
I can't reproduce this so far with web compilers, so throwing this at
the bots to see if it sticks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292155 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 20:28:59 +00:00
Tony Jiang
758e067345 [PowerPC] Expand ISEL instruction into if-then-else sequence.
Generally, the ISEL is expanded into if-then-else sequence, in some
cases (like when the destination register is the same with the true
or false value register), it may just be expanded into just the if
or else sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292154 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 20:12:26 +00:00
Sanjay Patel
627c8074e7 [InstCombine] fix names in canEvaluateShiftedShift(); NFC
It's not clear what 'First' and 'Second' mean, so use 'Inner' and 'Outer'
to match foldShiftedShift() and add comments with formulas, so it's easier
to see what's going on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292153 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 20:05:26 +00:00
Sanjay Patel
2222ec4bc9 [InstCombine] use m_APInt to allow shift-shift folds for vectors with splat constants
Some existing 'FIXME' tests are still not folded because of splat holes in value tracking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292151 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 19:35:45 +00:00
Sanjay Patel
63bb8f30ce [InstCombine] add tests to show missed vector folds; NFC
The shift-shift possibilities became easier to see after:
https://reviews.llvm.org/rL292145



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292150 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 19:23:34 +00:00
David Blaikie
cf890beb7e PR31650: Refer to enum constant when initializing llvm::None constant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292149 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 18:48:52 +00:00
Justin Lebar
289cd40b51 [NVPTX] Add blank line to NVPTXUsage.rst to appease the Sphinx.
Fixes:

  Warning, treated as error:
  /home/buildbot/llvm-build-dir/llvm-sphinx-docs/llvm/src/docs/NVPTXUsage.rst:333:
  ERROR: Error in "code-block" directive:
  maximum 1 argument(s) allowed, 17 supplied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292148 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 18:39:15 +00:00
Sanjay Patel
0f258723e9 [InstCombine] refactor shift-of-shift folds; NFCI
Reduces code duplication and makes it easier to extend these folds for vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292145 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 17:27:50 +00:00
Simon Pilgrim
50d76a80ed [InstCombine][SSE] Tests showing missed opportunities to pass demanded elts through a packss/packus truncation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292144 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 17:26:23 +00:00
Pavel Labath
8a1006b50d [llvm-xray] Fix android build
std::to_string is not available in the android ndk. Using llvm::to_string
instead.

Committing as obvious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292143 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 16:38:23 +00:00
Chad Rosier
a7959e565a [AArch64] Falkor supports Rounding Double Multiply Add/Subtract instructions.
Falkor only partially implements the ARMv8.1a extensions, so this patch
refactors the support for the SQRDML[A|S]H instruction into a separate
feature.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292142 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 16:28:43 +00:00
Daniel Sanders
064b91fd98 Revert r292132: [globalisel] Tablegen-erate current Register Bank Information'...
Several buildbots encountered a crash in tablegen when building this commit.
Reverting while I investigate the cause.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292136 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 15:34:43 +00:00
Hal Finkel
b1c51125dd Fix use-after-free bug in AffectedValueCallbackVH::allUsesReplacedWith
When transferring affected values in the cache from an old value, identified by
the value of the current callback, to the specified new value we might need to
insert a new entry into the DenseMap which constitutes the cache. Doing so
might delete the current callback object. Move the copying logic into a new
function, a member of the assumption cache itself, so that we don't run into UB
should the callback handle itself be removed mid-copy.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292133 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 15:22:01 +00:00
Daniel Sanders
ca24065b98 [globalisel] Tablegen-erate current Register Bank Information
Summary:
Adds a RegisterBank tablegen class that can be used to declare the register
banks and an associated tablegen pass to generate the necessary code.

Reviewers: t.p.northover, ab, rovka, qcolombet

Subscribers: aditya_nandakumar, rengolin, kristof.beyls, vkalintiris, mgorny, dberris, llvm-commits, rovka

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292132 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 15:20:43 +00:00
Tony Jiang
748e859f36 Revert "[PowerPC] Expand ISEL instruction into if-then-else sequence."
This reverts commit 1d0e0374438ca6e153844c683826ba9b82486bb1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292131 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 15:01:07 +00:00
Simon Pilgrim
1f7c0c9364 [SelectionDAG] Add knownbits support for BITREVERSE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292130 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 14:49:26 +00:00
Tony Jiang
541103a1c6 [PowerPC] Expand ISEL instruction into if-then-else sequence.
Generally, the ISEL is expanded into if-then-else sequence, in some
cases (like when the destination register is the same with the true
or false value register), it may just be expanded into just the if
or else sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292128 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 14:43:12 +00:00
NAKAMURA Takumi
3157d2b8a6 DWARFDebugInfoTest.cpp: Don't use ArrayRef with initializer. It was allocated locally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292127 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 14:33:37 +00:00
Simon Pilgrim
2abcd78f2b [X86][SSE] Test showing missing BITREVERSE knownbits support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292118 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 13:59:42 +00:00
Simon Dardis
dcca2bf437 [mips] Correct c.cond.fmt instruction definition.
Permit explicit $fcc<X> operand in c.cond.fmt instruction.

Add c.cond.fmt to the MIPS to microMIPS instruction mapping table.

Check that $fcc1 - $fcc7 are unusable for MIPS-I to MIPS-III for
c.cond.fmt, bc1t, bc1f.

Reviewers: seanbruno, zoran.jovanovic, vkalintiris

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292117 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 13:55:58 +00:00
Simon Pilgrim
b648fac5ca [SelectionDAG] Add support for BITREVERSE constant folding
We were relying on constant folding of the legalized instructions to do what constant folding we had previously

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292114 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 13:39:00 +00:00
Simon Pilgrim
e6bbb863e1 [X86][SSE] Tests showing missing BITREVERSE constant folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292111 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 13:18:07 +00:00
Simon Pilgrim
07d3c0f01c [InstCombine][SSE] Add DemandedElts support for PSHUFB instructions
Simplify a pshufb shuffle mask based on the elements of the mask that are actually demanded.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292101 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 11:30:41 +00:00
Craig Topper
f031545412 [X86] Merge the disassemblers handling of the different TYPE_RELs by getting the size information from the ENCODING field. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292096 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 06:49:09 +00:00
Craig Topper
14d16cc514 [X86] Reduce the number of operand 'types' the disassembler needs to deal with. NFCI
We were frequently checking for a list of types and the different types
conveyed no real information. So lump them together explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292095 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 06:49:03 +00:00
Craig Topper
d925138fc6 [AVX-512] Teach the disassembler about all of the EVEX gather and scatter instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292094 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 05:44:33 +00:00
Craig Topper
75deb64c6f [AVX-512] Begin giving the disassembler a way to recognize that VSIB is a different encoding than regular addressing modes.
This part first teaches it not to check error if EVEX.V2 is used by a VSIB instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292093 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 05:44:25 +00:00
Xin Tong
37b9de5028 Fix typos. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292092 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 03:41:09 +00:00