Rafael Espindola [Mon, 8 Dec 2014 18:05:48 +0000 (18:05 +0000)]
Don't crash when the key of a comdat is lazily linked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223673
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 8 Dec 2014 18:02:35 +0000 (18:02 +0000)]
InstrProf: An intrinsic and lowering for instrumentation based profiling
Introduce the ``llvm.instrprof_increment`` intrinsic and the
``-instrprof`` pass. These provide the infrastructure for writing
counters for profiling, as in clang's ``-fprofile-instr-generate``.
The implementation of the instrprof pass is ported directly out of the
CodeGenPGO classes in clang, and with the followup in clang that rips
that code out to use these new intrinsics this ends up being NFC.
Doing the instrumentation this way opens some doors in terms of
improving the counter performance. For example, this will make it
simple to experiment with alternate lowering strategies, and allows us
to try handling profiling specially in some optimizations if we want
to.
Finally, this drastically simplifies the frontend and puts all of the
lowering logic in one place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223672
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 8 Dec 2014 18:00:47 +0000 (18:00 +0000)]
Add Chapter 8 to the Kaleidoscope tutorial. This chapter adds
a description of how to add debug information using DWARF and
DIBuilder to the language.
Thanks to David Blaikie for his assistance with this tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223671
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 8 Dec 2014 18:00:38 +0000 (18:00 +0000)]
Fix the JIT code for the Kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223670
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 8 Dec 2014 17:54:58 +0000 (17:54 +0000)]
AArch64: treat HFAs containing "half" types as blocks too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223669
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Mon, 8 Dec 2014 17:47:18 +0000 (17:47 +0000)]
[X86] Improved tablegen patters for matching TZCNT/LZCNT.
Teach ISel how to match a TZCNT/LZCNT from a conditional move if the
condition code is X86_COND_NE.
Existing tablegen patterns only allowed to match TZCNT/LZCNT from a
X86cond with condition code equal to X86_COND_E. To avoid introducing
extra rules, I added an 'ImmLeaf' definition that checks if the
condition code is COND_E or COND_NE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223668
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 8 Dec 2014 17:33:06 +0000 (17:33 +0000)]
[Hexagon] Adding combine reg, reg with predicated forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223667
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Dec 2014 17:22:06 +0000 (17:22 +0000)]
Simplify the test. NFC.
Since the main file was empty, we can just copy the content of the Input file
into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223666
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Dec 2014 17:02:50 +0000 (17:02 +0000)]
Simplify test. NFC.
This is just testing the largest merge mode for comdats. No need to use
hard to read names and fancy types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223665
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 8 Dec 2014 17:01:18 +0000 (17:01 +0000)]
[Hexagon] Adding packhl instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223664
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Dec 2014 16:46:52 +0000 (16:46 +0000)]
Use CHECK-DAG to reduce the noise in an upcoming patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223663
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 8 Dec 2014 15:40:09 +0000 (15:40 +0000)]
[mips] Add Mips-specific CCIf's for accessing the MipsCCState. NFC.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6213
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223662
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Mon, 8 Dec 2014 14:36:51 +0000 (14:36 +0000)]
[X86] Improved lowering of packed v8i16 vector shifts by non-constant count.
Before this patch, the backend sub-optimally expanded the non-constant shift
count of a v8i16 shift into a sequence of two 'movd' plus 'movzwl'.
With this patch the backend checks if the target features sse4.1. If so, then
it lets the shuffle legalizer deal with the expansion of the shift amount.
Example:
;;
define <8 x i16> @test(<8 x i16> %A, <8 x i16> %B) {
%shamt = shufflevector <8 x i16> %B, <8 x i16> undef, <8 x i32> zeroinitializer
%shl = shl <8 x i16> %A, %shamt
ret <8 x i16> %shl
}
;;
Before (with -mattr=+avx):
vmovd %xmm1, %eax
movzwl %ax, %eax
vmovd %eax, %xmm1
vpsllw %xmm1, %xmm0, %xmm0
retq
Now:
vpxor %xmm2, %xmm2, %xmm2
vpblendw $1, %xmm1, %xmm2, %xmm1
vpsllw %xmm1, %xmm0, %xmm0
retq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223660
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Dec 2014 14:25:26 +0000 (14:25 +0000)]
Move the ValueMap lookup inside linkFunctionBody. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223659
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Dec 2014 14:20:10 +0000 (14:20 +0000)]
Use range loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223658
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Dec 2014 14:05:33 +0000 (14:05 +0000)]
Use range loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223657
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Dec 2014 13:44:38 +0000 (13:44 +0000)]
Fix linking of prologue data.
It would crash when the function was lazy linked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223656
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 8 Dec 2014 13:43:38 +0000 (13:43 +0000)]
[CMake] Fix installation of llvm-ranlib on multiconfig builder.
Introduce install_symlink.cmake from clang/tools/driver/clang_symlink.cmake.
FIXME: Would it be generalized?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223655
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Dec 2014 13:35:09 +0000 (13:35 +0000)]
Simple style fixes.
* Use a range loop.
* Move simple continue checks earlier.
* clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223654
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 8 Dec 2014 13:29:33 +0000 (13:29 +0000)]
Move materialize/Dematerialize calls to linkFunctionBody. NFC.
Just less code duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223653
91177308-0d34-0410-b5e6-
96231b3b80d8
Sonam Kumari [Mon, 8 Dec 2014 09:40:43 +0000 (09:40 +0000)]
Removal Of Duplicate Test Case from shift.ll file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223648
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 8 Dec 2014 09:03:08 +0000 (09:03 +0000)]
X86 intrinsics moved form X86ISelLowering.cpp to X86IntrinsicsInfo.h
X86ISelLowering.cpp has a long switch for intrinsics. I moved a part of
this long switch to the new intrinsics table in X86IntrinsicsInfo.h.
No functional changes, just code and compile time optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223641
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 8 Dec 2014 08:33:30 +0000 (08:33 +0000)]
lit: Don't use python 2.6 features
LLVM supports python 2.5, this fixes a (somewhat) recent regression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223626
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 8 Dec 2014 02:07:22 +0000 (02:07 +0000)]
Revert a part of r223583, for now. It seems causing different emission between stage2(gcc-clang) and stage3 clang. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223624
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 8 Dec 2014 00:41:39 +0000 (00:41 +0000)]
IR: Fix bitcode compatability filenames
As a fixup to r223616, follow the convention of naming the files after
the LLVM release whose bitcode they're maintaining compatability with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223623
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 7 Dec 2014 20:32:11 +0000 (20:32 +0000)]
IR: Revert r223618 behaviour of MDNode::concatenate()
r223618 including special handling of `MDNode::intersect()`: if the
first operand is a self-reference with the same operands you're trying
to return, return it instead.
Reuse that handling in `MDNode::concatenate()` in the hopes that it
fixes a polly test that seems to rely on the old behaviour [1].
[1]: http://lab.llvm.org:8011/builders/polly-amd64-linux/builds/25167
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223619
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 7 Dec 2014 19:52:06 +0000 (19:52 +0000)]
IR: Drop uniquing for self-referencing MDNodes
It doesn't make sense to unique self-referencing nodes. Drop uniquing
for them.
Note that `MDNode::intersect()` occasionally returns self-referencing
nodes. Previously these would be returned by `MDNode::get()`. I'm not
convinced this was intended behaviour -- to me it seems it should return
a node whose only operand is the self-reference -- but I don't know much
about alias scopes so I'm preserving it for now.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223618
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 7 Dec 2014 19:02:48 +0000 (19:02 +0000)]
IR: Remove reference to ENABLE_MDNODE_UNIQUING
Apparently `MDNode` uniquing used to be optional. I suppose the
configure flag must have disappeared at some point. Change the test so
it actually tests uniquing, and remove the check for
`ENABLE_MDNODE_UNIQUING`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223617
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sun, 7 Dec 2014 17:56:16 +0000 (17:56 +0000)]
IR: Add missing tests for function-local metadata
Add assembly and bitcode tests that I neglected to add in r223564 (IR:
Disallow complicated function-local metadata) and r223574 (IR: Disallow
function-local metadata attachments).
Found a couple of bugs:
- The error message for function-local attachments gave the wrong line
number -- it indicated the next token (typically on the next line)
instead of the token that started the attachment. Fixed.
- Metadata arguments of the form `!{i32 0, i32 %v}` (or with the
arguments reversed) fired an assertion in `ValueEnumerator` in LLVM
v3.5, so I suppose this never really worked. I suppose this was
"fixed" by r223564.
(Thanks to dblaikie for pointing out my omission.)
Part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223616
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Sun, 7 Dec 2014 17:17:43 +0000 (17:17 +0000)]
R600/SI: Disable VMEM and SMEM clauses by breaking them with S_NOP
This is only a workaround.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223615
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Sun, 7 Dec 2014 17:17:38 +0000 (17:17 +0000)]
R600/SI: Set 20-bit immediate byte offset for SMRD on VI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223614
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 7 Dec 2014 17:16:00 +0000 (17:16 +0000)]
[x86] Clean up the SSE1 test to use a slightly different pattern for
matching offsets. I don't expect this to really matter, but its what the
latest incarnation of my script for maintaining these tests happens to
produce, and so its simpler for me if everything matches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223613
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 7 Dec 2014 17:15:58 +0000 (17:15 +0000)]
[x86] Switch a constant selection test to use positive assertions and to
store to real pointers so that its clear that the right code is in fact
being generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223612
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 7 Dec 2014 17:15:56 +0000 (17:15 +0000)]
[x86] Cleanup the combining vector shuffle tests a bit by merging
identical checks for different SSE variants into a single block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223611
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 7 Dec 2014 17:15:53 +0000 (17:15 +0000)]
[x86] Clean up the shift lowering vector shuffle tests a bit using my
script. Notably this folds all the SSE cases together into a single
FileCheck block. It also adds a vex prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223610
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Sun, 7 Dec 2014 12:19:03 +0000 (12:19 +0000)]
R600/SI: Update instruction conversions for VI
There are 3 changes:
- Convert 32-bit S_LSHL/LSHR/ASHR to their V_*REV variants for VI
- Lower RSQ_CLAMP for VI
- Don't generate MIN/MAX_LEGACY on VI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223604
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Sun, 7 Dec 2014 12:18:57 +0000 (12:18 +0000)]
R600/SI: Add VI instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223603
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Sun, 7 Dec 2014 12:18:45 +0000 (12:18 +0000)]
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
Benjamin Kramer [Sat, 6 Dec 2014 19:22:54 +0000 (19:22 +0000)]
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
Benjamin Kramer [Sat, 6 Dec 2014 19:22:44 +0000 (19:22 +0000)]
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
Benjamin Kramer [Sat, 6 Dec 2014 13:12:56 +0000 (13:12 +0000)]
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
David Majnemer [Sat, 6 Dec 2014 11:58:33 +0000 (11:58 +0000)]
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
David Majnemer [Sat, 6 Dec 2014 10:52:32 +0000 (10:52 +0000)]
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
David Majnemer [Sat, 6 Dec 2014 10:51:40 +0000 (10:51 +0000)]
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
NAKAMURA Takumi [Sat, 6 Dec 2014 05:57:06 +0000 (05:57 +0000)]
Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223580
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 6 Dec 2014 05:34:34 +0000 (05:34 +0000)]
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
NAKAMURA Takumi [Sat, 6 Dec 2014 03:11:46 +0000 (03:11 +0000)]
Avoid angle brackets in comment. [-Wdocumentation-html]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223576
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 6 Dec 2014 02:29:44 +0000 (02:29 +0000)]
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
NAKAMURA Takumi [Sat, 6 Dec 2014 02:22:11 +0000 (02:22 +0000)]
LLVMInstrumentation requires MC since r223532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223573
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 6 Dec 2014 02:14:41 +0000 (02:14 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223572
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 6 Dec 2014 02:08:16 +0000 (02:08 +0000)]
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
NAKAMURA Takumi [Sat, 6 Dec 2014 02:03:49 +0000 (02:03 +0000)]
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
Ahmed Bougacha [Sat, 6 Dec 2014 01:31:07 +0000 (01:31 +0000)]
[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
Hans Wennborg [Sat, 6 Dec 2014 01:28:50 +0000 (01:28 +0000)]
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
Duncan P. N. Exon Smith [Sat, 6 Dec 2014 01:26:49 +0000 (01:26 +0000)]
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
Chris Matthews [Sat, 6 Dec 2014 01:13:49 +0000 (01:13 +0000)]
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
Duncan P. N. Exon Smith [Sat, 6 Dec 2014 00:48:17 +0000 (00:48 +0000)]
Utils: Style cleanups, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223556
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 6 Dec 2014 00:48:13 +0000 (00:48 +0000)]
Utils: Avoid RAUW on metadata in CloneFunction()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223555
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 6 Dec 2014 00:45:50 +0000 (00:45 +0000)]
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
Neeraj Badlani [Sat, 6 Dec 2014 00:38:39 +0000 (00:38 +0000)]
[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
Tim Northover [Sat, 6 Dec 2014 00:33:37 +0000 (00:33 +0000)]
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
Chris Matthews [Sat, 6 Dec 2014 00:21:08 +0000 (00:21 +0000)]
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
Benjamin Kramer [Sat, 6 Dec 2014 00:02:31 +0000 (00:02 +0000)]
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
Ahmed Bougacha [Fri, 5 Dec 2014 23:11:36 +0000 (23:11 +0000)]
[X86] Cleanup FCOPYSIGN lowering. NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223542
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 5 Dec 2014 22:32:30 +0000 (22:32 +0000)]
Add target triples to all dfsan tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223536
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Brecka [Fri, 5 Dec 2014 22:19:18 +0000 (22:19 +0000)]
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
Colin LeMahieu [Fri, 5 Dec 2014 21:51:12 +0000 (21:51 +0000)]
[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
Colin LeMahieu [Fri, 5 Dec 2014 21:38:29 +0000 (21:38 +0000)]
[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
Rafael Espindola [Fri, 5 Dec 2014 21:36:06 +0000 (21:36 +0000)]
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
Kuba Brecka [Fri, 5 Dec 2014 21:32:46 +0000 (21:32 +0000)]
Reverting r223513 and r223514.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223520
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 5 Dec 2014 21:28:14 +0000 (21:28 +0000)]
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
Peter Collingbourne [Fri, 5 Dec 2014 21:22:32 +0000 (21:22 +0000)]
[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
Colin LeMahieu [Fri, 5 Dec 2014 21:09:27 +0000 (21:09 +0000)]
[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
Kuba Brecka [Fri, 5 Dec 2014 21:04:43 +0000 (21:04 +0000)]
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
Rafael Espindola [Fri, 5 Dec 2014 21:04:36 +0000 (21:04 +0000)]
Simplify the loop linking function bodies. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223512
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Wen Voung [Fri, 5 Dec 2014 20:55:53 +0000 (20:55 +0000)]
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
Bill Seurer [Fri, 5 Dec 2014 20:32:05 +0000 (20:32 +0000)]
[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
Bill Seurer [Fri, 5 Dec 2014 20:15:56 +0000 (20:15 +0000)]
[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
Colin LeMahieu [Fri, 5 Dec 2014 20:07:19 +0000 (20:07 +0000)]
[Hexagon] Adding tfrih/l instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223506
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 5 Dec 2014 20:02:22 +0000 (20:02 +0000)]
[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
Colin LeMahieu [Fri, 5 Dec 2014 19:51:23 +0000 (19:51 +0000)]
[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
Rafael Espindola [Fri, 5 Dec 2014 19:35:07 +0000 (19:35 +0000)]
Remove unused arguments. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223503
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 5 Dec 2014 19:23:55 +0000 (19:23 +0000)]
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
Duncan P. N. Exon Smith [Fri, 5 Dec 2014 19:13:42 +0000 (19:13 +0000)]
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
Colin LeMahieu [Fri, 5 Dec 2014 18:24:06 +0000 (18:24 +0000)]
[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
Adrian Prantl [Fri, 5 Dec 2014 18:19:38 +0000 (18:19 +0000)]
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
Adrian Prantl [Fri, 5 Dec 2014 18:19:32 +0000 (18:19 +0000)]
Regenerate this stale testcase from source.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223492
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 5 Dec 2014 18:04:40 +0000 (18:04 +0000)]
[CodeGenPrepare] Use variables for reused values. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223491
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 5 Dec 2014 17:58:06 +0000 (17:58 +0000)]
[Hexagon] [NFC] Rearranging patterns and mux instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223488
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 5 Dec 2014 17:55:51 +0000 (17:55 +0000)]
[Hexagon] [NFC] Rearranging def order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223487
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 5 Dec 2014 17:53:15 +0000 (17:53 +0000)]
Refactor duplicated code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223486
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 5 Dec 2014 17:38:36 +0000 (17:38 +0000)]
[Hexagon] Adding combine reg-reg forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223485
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 5 Dec 2014 17:27:39 +0000 (17:27 +0000)]
[Hexagon] Marking several instructions as isCodeGenOnly=0 and adding direct disassembly tests for many instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223482
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 5 Dec 2014 17:25:52 +0000 (17:25 +0000)]
Be less conservative about when we build the gold plugin.
It is only build if LLVM_BINUTILS_INCDIR is explicitly given, so there is
no point in having extra restrictions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223481
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 5 Dec 2014 17:03:01 +0000 (17:03 +0000)]
LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps.
Required some APInt massaging to get proper empty/tombstone values. Apart
from making the code a bit simpler this also reduces the bucket size of
the ConstantInt map from 32 to 24 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223478
91177308-0d34-0410-b5e6-
96231b3b80d8
Asiri Rathnayake [Fri, 5 Dec 2014 16:33:56 +0000 (16:33 +0000)]
Improvements to ARM assembler tests
No functional changes. Got myself bitten in r223113 when adding support for
modified immediate syntax (regressions reported by joerg@britannica.bec.de,
fixes in r223366 and r223381). Our assembler tests did not cover serveral
different syntax variants. This patch expands the test coverage to check for
the following cases:
1. Modified immediate operands may be expressed with expressions, as in #(4 * 2)
instead of #8.
2. Modified immediate operands may be _optionally_ prefixed by a '#' symbol or a
'$' symbol.
3. Certain instructions (e.g. ADD) support single input register variants;
[ADD r0, #mod_imm] is same as [ADD r0, r0, #mod_imm].
4. Certain instructions have aliases which convert plain immediates to modified
immediates. For an example, [ADD r0, -10] is not valid because -10 (in two's
complement) cannot be encoded as a modified immediate, but ARMInstrInfo.td
defines an alias which can transform this into a [SUB r0, 10].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223475
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 5 Dec 2014 16:05:19 +0000 (16:05 +0000)]
Small cleanup on how we clear constant variables. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223474
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 5 Dec 2014 16:05:14 +0000 (16:05 +0000)]
Update TargetTriple format info.
Phabricator revision: http://reviews.llvm.org/D6543
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223473
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 5 Dec 2014 16:02:06 +0000 (16:02 +0000)]
Fix typos in llvm/IR/Module.h
Phabricator revision: http://reviews.llvm.org/D6535
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223472
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 5 Dec 2014 15:42:30 +0000 (15:42 +0000)]
Use an early return. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223470
91177308-0d34-0410-b5e6-
96231b3b80d8