Commit Graph

32553 Commits

Author SHA1 Message Date
Craig Topper
9bb36ed8d8 [X86] Add assembly parser support for mnemonic aliases for AVX-512 vpcmp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229287 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-15 07:13:48 +00:00
Craig Topper
09ea4e976b [X86] Add assembler predicates for the rest of the AVX512 feature flags. This makes the assembly matching consistent across all AVX512 instructions. Without this we were allowing some AVX512 instructions to be parsed always, but not the foundation instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229280 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-15 04:54:55 +00:00
Craig Topper
e2f7231e45 [X86] Add the remaining 11 possible exact ModRM formats. This makes their encodings linear which can then be used to simplify some other code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229279 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-15 04:16:44 +00:00
Simon Pilgrim
6d5ee8a8b5 [X86][XOP] Enable commutation for XOP instructions
Patch to allow XOP instructions (integer comparison and integer multiply-add) to be commuted. The comparison instructions sometimes require the compare mode to be flipped but the remaining instructions can use default commutation modes.

This patch also sets the SSE domains of all the XOP instructions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 22:40:46 +00:00
Craig Topper
32f60795f5 [X86] Improve parsing support AVX/SSE floating point compare instruction mnemonic aliases. They'll now print with the alias the parser received instead of converting to the explicit immediate form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229266 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 21:54:03 +00:00
Duncan P. N. Exon Smith
c7fe1ab250 Target: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229261 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 15:36:52 +00:00
Duncan P. N. Exon Smith
8cfbff509e NVPTX: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229260 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 15:35:43 +00:00
Simon Pilgrim
ee03ed8187 Line ending fix. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229256 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 13:27:53 +00:00
Chandler Carruth
96db150cec Remove a variable only used in an assert and sink its initializer into
the assert. Fixes -Wunused-variable on non-asserts builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229250 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 09:14:44 +00:00
Matt Arsenault
8a44761afe R600/SI: Implement correct f64 fdiv
This version passes the OpenCL conformance test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229239 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 04:30:08 +00:00
Matt Arsenault
fd31a769ce R600/SI: Use complex operand folding for div_scale
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229238 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 04:24:28 +00:00
Matt Arsenault
9295d69bea R600/SI: Fix implicit vcc operand to v_div_fmas_*
This should allow finally fixing the f64 fdiv implementation.

Test is disabled for VI since there seems to be a problem with one
of the buffer load instructions on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229236 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 04:22:00 +00:00
Matt Arsenault
f1b6c1f287 R600/SI: Fix schedule model for v_div_scale_{f32|f64}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229235 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 04:03:18 +00:00
Matt Arsenault
958cf585ce R600/SI: Really fix size of VReg_1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229234 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 03:54:32 +00:00
Matt Arsenault
b79a67d967 R600/SI: Rename encoding field to match docs for VOP3b
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229233 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 03:54:29 +00:00
Matt Arsenault
abcfb2b907 R600/SI: Fix not encoding src2 for v_div_scale_{f32|f64}
This apparently got lost in the VI changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229230 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 03:40:35 +00:00
Matt Arsenault
124991cc67 R600/SI: Fix VOP3b encoding on VI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229228 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 03:02:23 +00:00
Matt Arsenault
e7ff4c1321 R600/SI: Fix phys reg copies in SIFoldOperands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229227 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 02:55:57 +00:00
Matt Arsenault
9b6d620f89 R600/SI: Fix copies from SGPR to VCC
This shows up without optimizations when vcc is required
to be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229226 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 02:55:56 +00:00
Matt Arsenault
582d603f17 R600/SI: Add hack to copy from a VGPR to VCC
This hopefully should be fixed when VReg_1 is removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229225 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 02:55:54 +00:00
Duncan P. N. Exon Smith
4eba62d6c2 PowerPC: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229224 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 02:54:07 +00:00
Matt Arsenault
2d925cbe10 R600/SI: Fix size of VReg_1
This is really a 32-bit register, if we try to check the size of it,
we want 32-bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229223 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 02:51:44 +00:00
Duncan P. N. Exon Smith
20d6ad9de2 R600: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229222 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 02:45:45 +00:00
Duncan P. N. Exon Smith
39127e77ae Mips: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229221 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 02:37:48 +00:00
Duncan P. N. Exon Smith
f38384bcf1 ARM: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229220 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 02:24:44 +00:00
Duncan P. N. Exon Smith
6a1927d2c1 AArch64: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229218 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 02:09:06 +00:00
Duncan P. N. Exon Smith
894c8c514a X86: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229214 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 01:59:52 +00:00
Ahmed Bougacha
6a50342499 [X86] Factor out the CMOV pseudo definitions. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229206 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 01:36:53 +00:00
Matthias Braun
821ec14add Revert "On ELF, put PIC jump tables in a non executable section."
This reverts commit r228939.

The commit broke something in the output of exception handling tables on
darwin x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 01:16:54 +00:00
Eric Christopher
c21d153388 Use the template method to grab the target specific subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229191 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-14 00:09:46 +00:00
Eric Christopher
40ccb77781 The base pointer save offset can be computed at initialization time,
do so and fix up the calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229169 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 22:48:53 +00:00
Eric Christopher
f7f32530e0 Move the target machine variable so that it's initialized early
enough we can use it to initialize frame lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229168 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 22:48:51 +00:00
Eric Christopher
7b93acde32 Stash the TargetMachine on the subtarget so we can access it later.
Clean up a subtarget function that has it passed in while we're at it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229164 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 22:23:04 +00:00
Eric Christopher
4015892a84 PPC LinkageSize can be computed at initialization time, do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229163 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 22:22:57 +00:00
Sanjay Patel
fa1b3ba1f0 [SSE/AVX] Use multiclasses to reduce the mass of scalar math patterns; NFCI
This takes the preposterous number of patterns in this section
that were last added to in r219033 down to just plain obnoxious.

With a little more work, we might get this down to just comical.

I've added more test cases to the existing file that checks these
patterns, but it seems that some of these patterns simply don't
exist with today's shuffle lowering.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229158 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 21:52:42 +00:00
Sanjay Patel
b7458cc63a fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229155 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 21:07:22 +00:00
Tom Stellard
193679b6ae R600/SI: Refactor SOP1 classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229152 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 21:02:37 +00:00
Tom Stellard
ad4bb96a12 R600/SI: Lowercase register names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229151 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 21:02:36 +00:00
Tom Stellard
1f85e3b090 R600/SI: Remove some unused TableGen classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229150 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 21:02:33 +00:00
Vasileios Kalintiris
a4e58223cb [mips] Refactor and simplify MipsSEDAGToDAGISel::selectIntAddrLSL2MM(). NFC.
Reviewers: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229140 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 19:14:22 +00:00
Vasileios Kalintiris
00c4738c11 [mips] Use isa<> instead of dyn_cast<> with unused value. NFC.
Reviewers: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229138 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 19:12:16 +00:00
Matt Arsenault
941454f17f R600/SI: Remove handling of fpimm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229136 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 19:05:07 +00:00
Matt Arsenault
1751616522 R600/SI: Allow f64 inline immediates in i64 operands
This requires considering the size of the operand when
checking immediate legality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229135 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 19:05:03 +00:00
Jozef Kolek
85e08ed8a4 [mips][microMIPS] Delay slot filler: Replace the microMIPS JR with the JRC
This patch adds functionality in MIPS delay slot filler such as if delay slot
filler have to put NOP instruction into the delay slot of microMIPS JR
instruction, then instead of emitting NOP this instruction is replaced by
compact jump instruction JRC.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229128 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 17:51:27 +00:00
Toma Tabacu
94b64060af [mips] Improve support for the .set at/noat assembler directives.
Summary:
Made the following changes:
  Added calls to emitDirectiveSetNoAt() and emitDirectiveSetAt().
  Added special emit function for .set at=$reg, emitDirectiveSetAtWithArg(unsigned RegNo).
  Improved parsing error checks for .set at.
  Refactored parser code for .set at.
  Improved testing of both directives.
  Improved code readability and comments.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229097 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 10:30:57 +00:00
Chandler Carruth
417c5c172c [PM] Remove the old 'PassManager.h' header file at the top level of
LLVM's include tree and the use of using declarations to hide the
'legacy' namespace for the old pass manager.

This undoes the primary modules-hostile change I made to keep
out-of-tree targets building. I sent an email inquiring about whether
this would be reasonable to do at this phase and people seemed fine with
it, so making it a reality. This should allow us to start bootstrapping
with modules to a certain extent along with making it easier to mix and
match headers in general.

The updates to any code for users of LLVM are very mechanical. Switch
from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h".
Qualify the types which now produce compile errors with "legacy::". The
most common ones are "PassManager", "PassManagerBase", and
"FunctionPassManager".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229094 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 10:01:29 +00:00
Chandler Carruth
02d6288667 Re-sort #include lines using my handy dandy ./utils/sort_includes.py
script. This is in preparation for changes to lots of include lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229088 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 09:09:03 +00:00
Craig Topper
f3455f13a2 [X86] Add support for parsing and printing the mnemonic aliases for the XOP VPCOM instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229078 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 07:42:25 +00:00
Craig Topper
c5222f156f Fix a typo in a comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229071 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 06:07:29 +00:00
Craig Topper
db9343fb40 [X86] Remove int_x86_sse2_psll_dq_bs and int_x86_sse2_psrl_dq_bs intrinsics. The builtins aren't used by clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229069 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 06:07:24 +00:00