oota-llvm.git
9 years agoRevert a part of r223583, for now. It seems causing different emission between stage2...
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

9 years agoIR: Fix bitcode compatability filenames
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

9 years agoIR: Revert r223618 behaviour of MDNode::concatenate()
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

9 years agoIR: Drop uniquing for self-referencing MDNodes
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

9 years agoIR: Remove reference to ENABLE_MDNODE_UNIQUING
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

9 years agoIR: Add missing tests for function-local metadata
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

9 years agoR600/SI: Disable VMEM and SMEM clauses by breaking them with S_NOP
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

9 years agoR600/SI: Set 20-bit immediate byte offset for SMRD on VI
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

9 years ago[x86] Clean up the SSE1 test to use a slightly different pattern for
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

9 years ago[x86] Switch a constant selection test to use positive assertions and to
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

9 years ago[x86] Cleanup the combining vector shuffle tests a bit by merging
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

9 years ago[x86] Clean up the shift lowering vector shuffle tests a bit using my
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

9 years agoR600/SI: Update instruction conversions for VI
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

9 years agoR600/SI: Add VI instructions
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

9 years agoR600/SI: Add SCC Defs/Uses to SOP1 and SOP2 opcodes
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

9 years agoTurn some DenseMaps that are only used for set operations into DenseSets.
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

9 years agoMake the DenseMap bucket type configurable and use a smaller bucket for DenseSet.
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

9 years agoReapply "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."
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

9 years agoConstantFold: Don't optimize comparisons with weak linkage objects
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

9 years agoI didn't intend to commit this change.
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

9 years agoInstSimplify: Optimize away useless unsigned comparisons
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

9 years agoReformat.
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

9 years agoR600/SI: Restore PrivateGlobalPrefix to the default ELF value of ".L"
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

9 years agoAvoid angle brackets in comment. [-Wdocumentation-html]
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

9 years agoIR: Disallow function-local metadata attachments
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

9 years agoLLVMInstrumentation requires MC since r223532.
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

9 years agoFix typo
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

9 years agoAdd a proper triple to switch-jump-table.ll
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

9 years agollvm/test/CodeGen/X86/switch-jump-table.ll: Add explicit triple. Local labels have...
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

9 years ago[X86] Refactor PMOV[SZ]Xrm to add missing AVX2 patterns.
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

9 years agoSelectionDAG switch lowering: Replace unreachable default with most popular case.
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

9 years agoIR: Disallow complicated function-local metadata
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

9 years agoFix for xunit output to work around issue in Jenkins when tests are at the root level
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

9 years agoUtils: Style cleanups, NFC
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

9 years agoUtils: Avoid RAUW on metadata in CloneFunction()
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

9 years agoCanonicalize multiplies by looking at whether the operands have any constants themsel...
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

9 years ago[TEST-COMMIT] As per Developer Policy, Added a blank line.
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

9 years agoAArch64: use explicit MVT::i64 when creating EXTRACT_SUBVECTOR nodes.
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

9 years agoFix corner cases in lit xunit for paths with dots
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

9 years agoRevert "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."
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

9 years ago[X86] Cleanup FCOPYSIGN lowering. NFC intended.
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

9 years agoAdd target triples to all dfsan tests.
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

9 years agoRecommit of r223513 and r223514.
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

9 years ago[Hexagon] Relocating logical instructions and templates later in the td file.
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

9 years ago[Hexagon] Adding sub/and/or reg, imm forms
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

9 years agoRemove dead code. We are only lazy about functions with bodies.
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

9 years agoReverting r223513 and r223514.
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

9 years agoOptimize merging of scalar loads for 32-byte vectors [X86, AVX]
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

9 years ago[DFSAN][MIPS][LLVM] Defining ShadowPtrMask variable for MIPS64
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

9 years ago[Hexagon] Updating mux_ir/ri/ii/rr with encoding bits
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

9 years agoAddressSanitizer - Don't instrument globals from cstring_literals sections. (llvm...
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

9 years agoSimplify the loop linking function bodies. NFC.
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

9 years agoUse 32-bit ebp for NaCl64 in a limited case: llvm.frameaddress.
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

9 years ago[PowerPC]Update Power VSX test cases to also test fast-isel
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

9 years ago[PowerPC]Add VSX loads/stores to fastisel for PPC target
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

9 years ago[Hexagon] Adding tfrih/l instructions.
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

9 years ago[X86] Improved lowering of packed vector shifts to vpsllq/vpsrlq.
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

9 years ago[Hexagon] Adding add reg, imm form with encoding bits and test.
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

9 years agoRemove unused arguments. NFC.
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

9 years agoThese two calls were grabbing the same register info. Unify them.
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

9 years agoBFI: Saturate when combining edges to a successor
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

9 years ago[Hexagon] Adding DoubleRegs decoder. Moving C2_mux and A2_nop. Adding combine imm...
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

9 years agoFix a bug when pretty-printing DW_OP_deref.
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

9 years agoRegenerate this stale testcase from source.
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

9 years ago[CodeGenPrepare] Use variables for reused values. NFC.
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

9 years ago[Hexagon] [NFC] Rearranging patterns and mux instruction.
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

9 years ago[Hexagon] [NFC] Rearranging def order.
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

9 years agoRefactor duplicated code. NFC.
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

9 years ago[Hexagon] Adding combine reg-reg forms.
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

9 years ago[Hexagon] Marking several instructions as isCodeGenOnly=0 and adding direct disassemb...
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

9 years agoBe less conservative about when we build the gold plugin.
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

9 years agoLLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps.
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

9 years agoImprovements to ARM assembler tests
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

9 years agoSmall cleanup on how we clear constant variables. NFC.
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

9 years agoUpdate TargetTriple format info.
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

9 years agoFix typos in llvm/IR/Module.h
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

9 years agoUse an early return. NFC.
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

9 years ago[msan] Avoid extra origin address realignment.
Evgeniy Stepanov [Fri, 5 Dec 2014 14:34:03 +0000 (14:34 +0000)]
[msan] Avoid extra origin address realignment.

Do not realign origin address if the corresponding application
address is at least 4-byte-aligned.

Saves 2.5% code size in track-origins mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223464 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Avoid introducing extra shuffles when lowering packed vector shifts.
Andrea Di Biagio [Fri, 5 Dec 2014 12:13:30 +0000 (12:13 +0000)]
[X86] Avoid introducing extra shuffles when lowering packed vector shifts.

When lowering a vector shift node, the backend checks if the shift count is a
shuffle with a splat mask. If so, then it introduces an extra dag node to
extract the splat value from the shuffle. The splat value is then used
to generate a shift count of a target specific shift.

However, if we know that the shift count is a splat shuffle, we can use the
splat index 'I' to extract the I-th element from the first shuffle operand.
The advantage is that the splat shuffle may become dead since we no longer
use it.

Example:

;;
define <4 x i32> @example(<4 x i32> %a, <4 x i32> %b) {
  %c = shufflevector <4 x i32> %b, <4 x i32> undef, <4 x i32> zeroinitializer
  %shl = shl <4 x i32> %a, %c
  ret <4 x i32> %shl
}
;;

Before this patch, llc generated the following code (-mattr=+avx):
  vpshufd $0, %xmm1, %xmm1   # xmm1 = xmm1[0,0,0,0]
  vpxor  %xmm2, %xmm2
  vpblendw $3, %xmm1, %xmm2, %xmm1 # xmm1 = xmm1[0,1],xmm2[2,3,4,5,6,7]
  vpslld %xmm1, %xmm0, %xmm0
  retq

With this patch, the redundant splat operation is removed from the code.
  vpxor  %xmm2, %xmm2
  vpblendw $3, %xmm1, %xmm2, %xmm1 # xmm1 = xmm1[0,1],xmm2[2,3,4,5,6,7]
  vpslld %xmm1, %xmm0, %xmm0
  retq

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223461 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd missing FP build attribute tests.
Charlie Turner [Fri, 5 Dec 2014 08:22:47 +0000 (08:22 +0000)]
Add missing FP build attribute tests.

The test file test/CodeGen/ARM/build-attributes.ll was missing several
floating-point build attribute tests. The intention of this commit is that for
each CPU / architecture currently tested, there are now tests that make sure
the following attributes are sufficiently checked,

  * Tag_ABI_FP_rounding
  * Tag_ABI_FP_denormal
  * Tag_ABI_FP_exceptions
  * Tag_ABI_FP_user_exceptions
  * Tag_ABI_FP_number_model

Also in this commit, the -unsafe-fp-math flag has been augmented with the full
suite of flags Clang sends to LLVM when you pass -ffast-math to Clang. That is,
`-unsafe-fp-math' has been changed to `-enable-unsafe-fp-math -disable-fp-elim
-enable-no-infs-fp-math -enable-no-nans-fp-math -fp-contract=fast'

Change-Id: I35d766076bcbbf09021021c0a534bf8bf9a32dfc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223454 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "r223440 - Consider subregs when calling MI::registerDefIsDead for phys deps"
Hal Finkel [Fri, 5 Dec 2014 02:07:35 +0000 (02:07 +0000)]
Revert "r223440 - Consider subregs when calling MI::registerDefIsDead for phys deps"

Reverting this because, while it fixes the problem in the reduced test case, it
does not fix the problem in the full test case from the bug report.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223442 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoConsider subregs when calling MI::registerDefIsDead for phys deps
Hal Finkel [Fri, 5 Dec 2014 01:57:22 +0000 (01:57 +0000)]
Consider subregs when calling MI::registerDefIsDead for phys deps

The scheduling dependency graph is built bottom-up within each scheduling
region, and ScheduleDAGInstrs::addPhysRegDeps is called to add output/anti
dependencies, based on physical registers, to the SUs for instructions
based on those that come before them.

In the test case, we start before post-RA scheduling with a block that looks
like this:

...
INLINEASM <...
andc $0,$0,$2
stdcx. $0,0,$3
bne- 1b
> [sideeffect] [mayload] [maystore] [attdialect], $0:[regdef-ec:G8RC], %X6<earlyclobber,def,dead>, $1:[mem], %X3<kill>, $2:[reguse:G8RC], %X5<kill>, $3:[reguse:G8RC], %X3, $4:[mem], %X3, $5:[clobber], %CC<earlyclobber,imp-def,dead>, <<badref>>
...
%X4<def,dead> = ANDIo8 %X4<kill>, 1, %CR0<imp-def,dead>, %CR0GT<imp-def>
...
%R29<def> = ISEL %R3<undef>, %R4<kill>, %CR0GT<kill>

where it is relevant that %CC is an alias to %CR0, and that %CR0GT is a
subregister of %CR0. However, for post-RA scheduling, no dependency was added
to prevent the INLINEASM from being scheduled in between the ANDIo8 and the
ISEL (which communicate via the %CR0GT register).

In ScheduleDAGInstrs::addPhysRegDeps, when called for the %CC operand, we'd
iterate over all of its aliases (which include %CC itself and also %CR0), and
look for previously-encountered defs of those registers. We'd find the ANDIo8,
but decide not to add a dependency between the INLINEASM and the ANDIo8 because
both the INLINEASM's def of %CC is dead, and also the ANDIo8 def of %CR0 is
dead. This ignores, however, that ANDIo8 has a non-dead def of %CR0GT, a
subregister of %CR0, and thus a dependency still must exist.

To fix this problem, when calling registerDefIsDead on the SU with the def, we
also check all subregisters for possible non-dead defs, and add the dependency
if any are found.

Fixes PR21742.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223440 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoADT: Remove GetStringMapEntryFromValue()
Duncan P. N. Exon Smith [Fri, 5 Dec 2014 01:41:36 +0000 (01:41 +0000)]
ADT: Remove GetStringMapEntryFromValue()

It relies on undefined behaviour, since `StringMapEntry<>` is not
a standard layout type.  There are no users anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223439 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Stop relying on GetStringMapEntryFromValue()
Duncan P. N. Exon Smith [Fri, 5 Dec 2014 01:41:34 +0000 (01:41 +0000)]
IR: Stop relying on GetStringMapEntryFromValue()

It relies on undefined behaviour.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223438 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCleanup: Calls to getDwarfRegNum() may actually fail, if there is
Adrian Prantl [Fri, 5 Dec 2014 01:02:46 +0000 (01:02 +0000)]
Cleanup: Calls to getDwarfRegNum() may actually fail, if there is
no DWARF register number mapping, or if the register was a virtual
register that was never materialized. Previously, we would just emit a
bogus location, after this patch we don't emit a location at all by
doing an early exit.

After my bugfix in r223401 today, this doesn't actually happen on any
target that I tested this with, but it's still preferable to make the
possibility of a failure explicit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223428 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a comment.
Adrian Prantl [Fri, 5 Dec 2014 01:02:36 +0000 (01:02 +0000)]
Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223427 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake GetSVN.cmake do its VCS queries with native CMake code.
Paul Robinson [Fri, 5 Dec 2014 00:50:15 +0000 (00:50 +0000)]
Make GetSVN.cmake do its VCS queries with native CMake code.
This lets the queries work on Windows as well as Linux.

This does mean make and cmake aren't using the same scripts to do the
queries (again), but at least GetSVN.cmake understands git and git-svn
as well as svn now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223425 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agolinkGlobalVariableProto never returns null. Simplify the caller. NFC.
Rafael Espindola [Fri, 5 Dec 2014 00:30:47 +0000 (00:30 +0000)]
linkGlobalVariableProto never returns null. Simplify the caller. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223424 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRename the x86 isTargetMacho to isTargetMachO for uniformity.
Eric Christopher [Fri, 5 Dec 2014 00:22:38 +0000 (00:22 +0000)]
Rename the x86 isTargetMacho to isTargetMachO for uniformity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223421 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBoth of these subtargets have functions that check whether or
Eric Christopher [Fri, 5 Dec 2014 00:22:35 +0000 (00:22 +0000)]
Both of these subtargets have functions that check whether or
not the target is mach-o. Use them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223420 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove merging of alignment to a central location. NFC.
Rafael Espindola [Fri, 5 Dec 2014 00:09:02 +0000 (00:09 +0000)]
Move merging of alignment to a central location. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223418 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a few extra cases to the test. NFC.
Rafael Espindola [Fri, 5 Dec 2014 00:02:42 +0000 (00:02 +0000)]
Add a few extra cases to the test. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223417 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-add support to llvm-objdump for Mach-O universal files and archives with -macho
Kevin Enderby [Thu, 4 Dec 2014 23:56:27 +0000 (23:56 +0000)]
Re-add support to llvm-objdump for Mach-O universal files and archives with -macho
with fixes.  Includes the move of tests for llvm-objdump for universal files to an X86
directory.  And the fix where it was failing on linux Rafael tracked down with asan.
I had both Jim Grosbach and Adam Hemet look over the second fix since I could not
set up asan to reproduce with the old version but not with the fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223416 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Delete dead code in fcopysign lowering. NFC.
Ahmed Bougacha [Thu, 4 Dec 2014 23:52:15 +0000 (23:52 +0000)]
[X86] Delete dead code in fcopysign lowering. NFC.

r32900 introduced custom lowering for fcopysign, with two checks to
change the magnitude value's type if it's larger/smaller than the sign
value's type.  r32932 replaced that code for the smaller case.
r43205 did the same for the larger case, but left the old code, now dead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223415 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoConvert test to use an extra Input file. NFC.
Rafael Espindola [Thu, 4 Dec 2014 23:31:21 +0000 (23:31 +0000)]
Convert test to use an extra Input file. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223414 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Fix UBSan report in StringMap implementation."
Alexey Samsonov [Thu, 4 Dec 2014 23:00:50 +0000 (23:00 +0000)]
Revert "Fix UBSan report in StringMap implementation."

This reverts commit r223402. Some bots fail with -Winvalid-offsetof
warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223407 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify implementation and testcase of r223401 based on feedback from dblaikie.
Adrian Prantl [Thu, 4 Dec 2014 22:58:41 +0000 (22:58 +0000)]
Simplify implementation and testcase of r223401 based on feedback from dblaikie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223405 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix UBSan report in StringMap implementation.
Alexey Samsonov [Thu, 4 Dec 2014 22:45:31 +0000 (22:45 +0000)]
Fix UBSan report in StringMap implementation.

Use offsetof() instead of a member access within null pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223402 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebug info: If the RegisterCoalescer::reMaterializeTrivialDef() is
Adrian Prantl [Thu, 4 Dec 2014 22:29:04 +0000 (22:29 +0000)]
Debug info: If the RegisterCoalescer::reMaterializeTrivialDef() is
eliminating all uses of a vreg, update any DBG_VALUE describing that vreg
to point to the rematerialized register instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223401 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd some tests for SimplifyCFG's TurnSwitchRangeIntoICmp(). NFC.
Hans Wennborg [Thu, 4 Dec 2014 22:19:28 +0000 (22:19 +0000)]
Add some tests for SimplifyCFG's TurnSwitchRangeIntoICmp(). NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223396 91177308-0d34-0410-b5e6-96231b3b80d8