Commit Graph

110692 Commits

Author SHA1 Message Date
Marek Olsak
7eeb607497 R600/SI: Add VI instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223603 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-07 12:18:57 +00:00
Marek Olsak
9ecb1217e4 R600/SI: Add SCC Defs/Uses to SOP1 and SOP2 opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223602 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-07 12:18:45 +00:00
Benjamin Kramer
2991725fe2 Turn some DenseMaps that are only used for set operations into DenseSets.
DenseSet has better memory efficiency now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223589 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 19:22:54 +00:00
Benjamin Kramer
2cd5836249 Make the DenseMap bucket type configurable and use a smaller bucket for DenseSet.
DenseSet used to be implemented as DenseMap<Key, char>, which usually doubled
the memory footprint of the map. Now we use a compressed set so the second
element uses no memory at all. This required some surgery on DenseMap as
all accesses to the bucket now have to go through methods; this should
have no impact on the behavior of DenseMap though. The new default bucket
type for DenseMap is a slightly extended std::pair as we expose it through
DenseMap's iterator and don't want to break any existing users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223588 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 19:22:44 +00:00
Benjamin Kramer
51df2c2a10 Reapply "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."
This reapplies r223478 with a fix for 32 bit targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223586 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 13:12:56 +00:00
David Majnemer
278bbacd27 ConstantFold: Don't optimize comparisons with weak linkage objects
Consider:
void f() {}
void __attribute__((weak)) g() {}
bool b = &f != &g;

It's possble for g to resolve to f if --defsym=g=f is passed on to the
linker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223585 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 11:58:33 +00:00
David Majnemer
d34c5a921f I didn't intend to commit this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223584 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 10:52:32 +00:00
David Majnemer
620e8763ec InstSimplify: Optimize away useless unsigned comparisons
Code like X < Y && Y == 0 should always be folded away to false.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223583 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 10:51:40 +00:00
NAKAMURA Takumi
c589098319 Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223580 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 05:57:06 +00:00
Tom Stellard
1ba81462d0 R600/SI: Restore PrivateGlobalPrefix to the default ELF value of ".L"
This was changed in r223323.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223579 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 05:34:34 +00:00
NAKAMURA Takumi
0ce423356d Avoid angle brackets in comment. [-Wdocumentation-html]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223576 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 03:11:46 +00:00
Duncan P. N. Exon Smith
09ba28c27c IR: Disallow function-local metadata attachments
Metadata attachments to instructions cannot be function-local.

This is part of PR21532.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223574 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 02:29:44 +00:00
NAKAMURA Takumi
e1d7711d2f LLVMInstrumentation requires MC since r223532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223573 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 02:22:11 +00:00
Matt Arsenault
9b646185ed Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223572 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 02:14:41 +00:00
Hans Wennborg
d7c9f76cee Add a proper triple to switch-jump-table.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223571 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 02:08:16 +00:00
NAKAMURA Takumi
2dd9af9feb llvm/test/CodeGen/X86/switch-jump-table.ll: Add explicit triple. Local labels have a prefix "." for targeting i686-cygming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223570 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 02:03:49 +00:00
Ahmed Bougacha
3b9ac8c7c3 [X86] Refactor PMOV[SZ]Xrm to add missing AVX2 patterns.
Most patterns will go away once the extload legalization changes land.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223567 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 01:31:07 +00:00
Hans Wennborg
a421ac689f SelectionDAG switch lowering: Replace unreachable default with most popular case.
This can significantly reduce the size of the switch, allowing for more
efficient lowering.

I also worked with the idea of exploiting unreachable defaults by
omitting the range check for jump tables, but always ended up with a
non-neglible binary size increase. It might be worth looking into some more.

SimplifyCFG currently does this transformation, but I'm working towards changing
that so we can optimize harder based on unreachable defaults.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223566 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 01:28:50 +00:00
Duncan P. N. Exon Smith
30596886ed IR: Disallow complicated function-local metadata
Disallow complex types of function-local metadata.  The only valid
function-local metadata is an `MDNode` whose sole argument is a
non-metadata function-local value.

Part of PR21532.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223564 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 01:26:49 +00:00
Chris Matthews
ab1837aef3 Fix for xunit output to work around issue in Jenkins when tests are at the root level
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223562 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 01:13:49 +00:00
Duncan P. N. Exon Smith
e70779ec53 Utils: Style cleanups, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223556 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 00:48:17 +00:00
Duncan P. N. Exon Smith
fe10a1117a Utils: Avoid RAUW on metadata in CloneFunction()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223555 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 00:48:13 +00:00
Nick Lewycky
8a51f8e8ce Canonicalize multiplies by looking at whether the operands have any constants themselves. Patch by Tim Murray!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223554 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 00:45:50 +00:00
Neeraj Badlani
d9999a4337 [TEST-COMMIT] As per Developer Policy, Added a blank line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223553 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 00:38:39 +00:00
Tim Northover
4e54b5db81 AArch64: use explicit MVT::i64 when creating EXTRACT_SUBVECTOR nodes.
All our patterns use MVT::i64, but the ISelLowering nodes were inconsistent in
their choice.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223551 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 00:33:37 +00:00
Chris Matthews
689f10d1b5 Fix corner cases in lit xunit for paths with dots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223549 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 00:21:08 +00:00
Benjamin Kramer
d46a8180c0 Revert "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."
Somehow made DenseMap probe on forever on 32 bit machines.
This reverts commit r223478.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223546 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 00:02:31 +00:00
Ahmed Bougacha
f5e810be25 [X86] Cleanup FCOPYSIGN lowering. NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223542 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 23:11:36 +00:00
Peter Collingbourne
a1d9932027 Add target triples to all dfsan tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223536 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 22:32:30 +00:00
Kuba Brecka
0a12d8211e Recommit of r223513 and r223514.
Reviewed at http://reviews.llvm.org/D6488



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223532 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 22:19:18 +00:00
Colin LeMahieu
d2f12fd27a [Hexagon] Relocating logical instructions and templates later in the td file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223523 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 21:51:12 +00:00
Colin LeMahieu
ec51bc6f3a [Hexagon] Adding sub/and/or reg, imm forms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223522 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 21:38:29 +00:00
Rafael Espindola
9423af6b70 Remove dead code. We are only lazy about functions with bodies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223521 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 21:36:06 +00:00
Kuba Brecka
05c096b953 Reverting r223513 and r223514.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223520 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 21:32:46 +00:00
Sanjay Patel
ab4ad4f98e Optimize merging of scalar loads for 32-byte vectors [X86, AVX]
Fix the poor codegen seen in PR21710 ( http://llvm.org/bugs/show_bug.cgi?id=21710 ).
Before we crack 32-byte build vectors into smaller chunks (and then subsequently
glue them back together), we should look for the easy case where we can just load
all elements in a single op.

An example of the codegen change is:

From:

vmovss  16(%rdi), %xmm1
vmovups (%rdi), %xmm0
vinsertps       $16, 20(%rdi), %xmm1, %xmm1
vinsertps       $32, 24(%rdi), %xmm1, %xmm1
vinsertps       $48, 28(%rdi), %xmm1, %xmm1
vinsertf128     $1, %xmm1, %ymm0, %ymm0
retq

To:

vmovups (%rdi), %ymm0
retq

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223518 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 21:28:14 +00:00
Peter Collingbourne
93712874d8 [DFSAN][MIPS][LLVM] Defining ShadowPtrMask variable for MIPS64
Patch by Kumar Sukhani!

corresponding compiler-rt patch: http://reviews.llvm.org/D6437
clang patch: http://reviews.llvm.org/D6147

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223516 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 21:22:32 +00:00
Colin LeMahieu
5db47f1376 [Hexagon] Updating mux_ir/ri/ii/rr with encoding bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223515 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 21:09:27 +00:00
Kuba Brecka
86af53ecf0 AddressSanitizer - Don't instrument globals from cstring_literals sections. (llvm part)
Reviewed at http://reviews.llvm.org/D6488



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223513 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 21:04:43 +00:00
Rafael Espindola
f117c8ae03 Simplify the loop linking function bodies. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223512 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 21:04:36 +00:00
Jan Wen Voung
a44126f432 Use 32-bit ebp for NaCl64 in a limited case: llvm.frameaddress.
Summary:
Follow up to [x32] "Use ebp/esp as frame and stack pointer":
http://reviews.llvm.org/D4617

In that earlier patch, NaCl64 was made to always use rbp.
That's needed for most cases because rbp should hold a full
64-bit address within the NaCl sandbox so that load/stores
off of rbp don't require sandbox adjustment (zeroing the top
32-bits, then filling those by adding r15).

However, llvm.frameaddress returns a pointer and pointers
are 32-bit for NaCl64. In this case, use ebp instead, which
will make the register copy type check. A similar mechanism
may be needed for llvm.eh.return, but is not added in this change.

Test Plan: test/CodeGen/X86/frameaddr.ll

Reviewers: dschuff, nadav

Subscribers: jfb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223510 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 20:55:53 +00:00
Bill Seurer
8dcc5c0996 [PowerPC]Update Power VSX test cases to also test fast-isel
Update of some of the VSX test cases for Power to check fast-isel codegen as well as the regular codegen.

http://reviews.llvm.org/D6357


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223509 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 20:32:05 +00:00
Bill Seurer
dfa6293b55 [PowerPC]Add VSX loads/stores to fastisel for PPC target
This patch adds VSX floating point loads and stores to fastisel.

Along with the change to tablegen (D6220), VSX instructions are now fully supported in fastisel.

http://reviews.llvm.org/D6274


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223507 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 20:15:56 +00:00
Colin LeMahieu
4fda99f866 [Hexagon] Adding tfrih/l instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223506 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 20:07:19 +00:00
Andrea Di Biagio
6a9a49d7ab [X86] Improved lowering of packed vector shifts to vpsllq/vpsrlq.
SSE2/AVX non-constant packed shift instructions only use the lower 64-bit of
the shift count. 

This patch teaches function 'getTargetVShiftNode' how to deal with shifts
where the shift count node is of type MVT::i64.

Before this patch, function 'getTargetVShiftNode' only knew how to deal with
shift count nodes of type MVT::i32. This forced the backend to wrongly
truncate the shift count to MVT::i32, and then zero-extend it back to MVT::i64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223505 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 20:02:22 +00:00
Colin LeMahieu
189606dbfe [Hexagon] Adding add reg, imm form with encoding bits and test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223504 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 19:51:23 +00:00
Rafael Espindola
98821ee350 Remove unused arguments. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223503 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 19:35:07 +00:00
Eric Christopher
7a76d76e0c These two calls were grabbing the same register info. Unify them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223502 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 19:23:55 +00:00
Duncan P. N. Exon Smith
1a283409bc BFI: Saturate when combining edges to a successor
When a loop gets bundled up, its outgoing edges are quite large, and can
just barely overflow 64-bits.  If one successor has multiple incoming
edges -- and that successor is getting all the incoming mass --
combining just its edges can overflow.  Handle that by saturating rather
than asserting.

This fixes PR21622.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223500 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 19:13:42 +00:00
Colin LeMahieu
78ec9010c5 [Hexagon] Adding DoubleRegs decoder. Moving C2_mux and A2_nop. Adding combine imm-imm form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223494 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 18:24:06 +00:00
Adrian Prantl
33ada85735 Fix a bug when pretty-printing DW_OP_deref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223493 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 18:19:38 +00:00