Igor Laevsky [Tue, 10 Nov 2015 14:10:31 +0000 (14:10 +0000)]
Strip metadata when speculatively hoisting instructions
This is fix for PR24059.
When we are hoisting instruction above some condition it may turn out
that metadata on this instruction was control dependant on the condition.
This metadata becomes invalid and we need to drop it.
This patch should cover most obvious places of speculative execution (which
I have found by greping isSafeToSpeculativelyExecute). I think there are more
cases but at least this change covers the severe ones.
Differential Revision: http://reviews.llvm.org/D14398
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252604
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Tue, 10 Nov 2015 14:09:08 +0000 (14:09 +0000)]
Update test to use explicit triple
This is needed for targets which do not support big-endian with the default
triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252603
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Tue, 10 Nov 2015 12:29:37 +0000 (12:29 +0000)]
[PowerPC] Remove redundant code.
The local variable Hi is never being read.
Issue identified by the Clang static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252600
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Tue, 10 Nov 2015 11:04:18 +0000 (11:04 +0000)]
[AArch64] Fix halfword load merging for big-endian targets
For big-endian targets, when we merge two halfword loads into a word load, the
order of the halfwords in the loaded value is reversed compared to
little-endian, so the load-store optimiser needs to swap the destination
registers.
This does not affect merging of two word loads, as we use ldp, which treats the
memory as two separate 32-bit words.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252597
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 10 Nov 2015 09:47:48 +0000 (09:47 +0000)]
Inliner: Do zero-cost inlines even if above a negative threshold (PR24851)
Differential Revision: http://reviews.llvm.org/D14499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252595
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Tue, 10 Nov 2015 07:09:07 +0000 (07:09 +0000)]
AVX512 : Implemented encoding and DAG lowering for VMOVHPS/PD and VMOVLPS/PD instructions.
Differential Revision: http://reviews.llvm.org/D14492
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252592
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 10 Nov 2015 04:10:04 +0000 (04:10 +0000)]
Remove another variable unused in -Asserts build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252582
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 10 Nov 2015 03:16:28 +0000 (03:16 +0000)]
Remove some unused variables to clean up the -Werror build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252580
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 10 Nov 2015 01:58:26 +0000 (01:58 +0000)]
[Hexagon] Adding instruction aliases and tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252579
91177308-0d34-0410-b5e6-
96231b3b80d8
Andy Ayers [Tue, 10 Nov 2015 01:50:49 +0000 (01:50 +0000)]
Support for emitting inline stack probes
For CoreCLR on Windows, stack probes must be emitted as inline sequences that probe successive stack pages
between the current stack limit and the desired new stack pointer location. This implements support for
the inline expansion on x64.
For in-body alloca probes, expansion is done during instruction lowering. For prolog probes, a stub call
is initially emitted during prolog creation, and expanded after epilog generation, to avoid complications
that arise when introducing new machine basic blocks during prolog and epilog creation.
Added a new test case, modified an existing one to exclude non-x64 coreclr (for now).
Add test case
Fix tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252578
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Diamond [Tue, 10 Nov 2015 01:03:51 +0000 (01:03 +0000)]
Fix mingw targets. Bandaid for r252532's buildbot brakage.
Reviewers: brad.king, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14523
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252576
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 10 Nov 2015 00:51:56 +0000 (00:51 +0000)]
[Hexagon] Fixing compound register printing and reenabling more tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252574
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 10 Nov 2015 00:44:23 +0000 (00:44 +0000)]
AArch64: add experimental support for address tagging.
AArch64 has the ability to use the top 8-bits of an "address" for extra
information, with the memory subsystem automatically masking them off for loads
and stores. When that's happening, we can sometimes skip masks on memory
operations in the compiler.
However, this requires the host OS and support stack to preserve those bits so
it can't be enabled everywhere. In principle iOS 8.0 and above do take the
required precautions and but we'll put it under a flag for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252573
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 10 Nov 2015 00:31:08 +0000 (00:31 +0000)]
Fix llvm-nm(1) printing of llvm-bitcode files for -format darwin to match darwin’s nm(1).
Also a small fix to match printing of Mach-O objects with -format posix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252567
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Tue, 10 Nov 2015 00:30:57 +0000 (00:30 +0000)]
[WebAssembly] Support 'unreachable' expression
Lower LLVM's 'unreachable' terminator to ISD::TRAP, and lower ISD::TRAP to
wasm's 'unreachable' expression.
WebAssembly type-checks expressions, but a noreturn function with a
return type that doesn't match the context will cause a check
failure. So we lower LLVM 'unreachable' to ISD::TRAP and then lower that
to WebAssembly's 'unreachable' expression, which typechecks in any
context and causes a trap if executed.
Differential Revision: http://reviews.llvm.org/D14515
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252566
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 10 Nov 2015 00:30:14 +0000 (00:30 +0000)]
Remove unnecessary call to getAllocatableRegClass
I'm not sure what the point of this was. I'm not sure why
you would ever define an instruction that produces an unallocatable
register class. No tests fail with this removed, and it seems like
it should be a verifier error to define such an instruction.
This was problematic for AMDGPU because it would make bad decisions
by arbitrarily changing the register class when unsetting isAllocatable
for VS_32/VS_64, which is currently set as a workaround to this problem.
AMDGPU uses the VS_32/VS_64 register classes to represent operands which
can use either VGPRs or SGPRs. When isAllocatable is unset for these,
this would need to pick either the SGPR or VGPR class and insert either
a copy we don't want, or an illegal copy we would need to deal with
later. A semi-arbitrary register class ordering decision is made in tablegen,
which resulted in always picking a VGPR class because it happens to have
more registers than the SGPR register class. We really just want to
use whatever register class the original register had.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252565
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 10 Nov 2015 00:24:45 +0000 (00:24 +0000)]
[PGO] Make indexed value profile data more compact
- Make indexed value profile data more compact by peeling out
the per-site value count field into its own smaller sized array.
- Introduced formal data structure definitions to specify value
profile data layout in indexed format. Previously the layout
of the data is only assumed in the client code (scattered in
three different places : size computation, EmitData, and ReadData
- The new data structure serves as a central place for layout documentation.
- Add interfaces to force BE output for value profile data (testing purpose)
- Add byte swap unit tests
Differential Revision: http://reviews.llvm.org/D14401
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252563
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 10 Nov 2015 00:22:00 +0000 (00:22 +0000)]
[Hexagon] Fixing store instructions and reenabling a few more tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252561
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 10 Nov 2015 00:10:41 +0000 (00:10 +0000)]
[ARM] Handle t2ADDri in ARMAsmPrinter::EmitUnwindingInstruction.
This fixes a bug in ARMAsmPrinter::EmitUnwindingInstruction where
llvm_unreachable was reached because t2ADDri wasn't handled.
Test case provided by Tim Northover.
rdar://problem/
23270609
http://reviews.llvm.org/D14518
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252557
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Tue, 10 Nov 2015 00:02:27 +0000 (00:02 +0000)]
[Hexagon] Fixing load instruction parsing and reenabling tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252555
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 9 Nov 2015 23:59:33 +0000 (23:59 +0000)]
MachineVerifier: Streamline live interval related error reporting
Simply perform additional report_context() calls after a report()
instead of adding more and more overloaded variations of report(). Also
improve several instances where information was output in an ad-hoc way
probably because no matching report() overload was available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252552
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 9 Nov 2015 23:59:29 +0000 (23:59 +0000)]
MachineVerifier: Add missing linebreak
MachineInstr::print() with SkipOppers==true does not produce a
linebreak, so we have to do that in MachineVerifier::report().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252551
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 9 Nov 2015 23:59:25 +0000 (23:59 +0000)]
MachineVerifier: MI::print has no TargetMachine overload
The code was passing a target machine pointer which degraded to a true
operand to SkipOppers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252550
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 9 Nov 2015 23:59:23 +0000 (23:59 +0000)]
MachineVerifier: print list of live intervals if available
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252549
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 9 Nov 2015 23:51:45 +0000 (23:51 +0000)]
Simplify some APIs I was cleaning up while fixing -Wpessimizing-move warning
(Reid fixed the original error, but this seems nice to do in any case)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252548
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 9 Nov 2015 23:37:26 +0000 (23:37 +0000)]
Fix -Wpessimizing-move warning in llvm-config.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252542
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 9 Nov 2015 23:34:42 +0000 (23:34 +0000)]
[WinEH] Remove isBarrier from instructions that do not return
Fixes machine verification failures with David's latest EH change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252541
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Nov 2015 23:31:38 +0000 (23:31 +0000)]
add a SelectionDAG method to check if no common bits are set in two nodes; NFCI
This was suggested in:
http://reviews.llvm.org/D13956
and is a follow-on to:
http://reviews.llvm.org/rL252515
http://reviews.llvm.org/rL252519
This lets us remove logically equivalent/duplicated code from DAGCombiner and X86ISelDAGToDAG.
A corresponding function for IR instructions already exists in ValueTracking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252539
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 9 Nov 2015 23:31:01 +0000 (23:31 +0000)]
CodeGen: Be clear about semantics in SlotIndex::getNextSlot(), NFC
Be honest about using iterator semantics in `SlotIndex::getNextSlot()`
and `SlotIndex::getPrevSlot()`. Instead of calling `getNextNode()` --
which is documented (but fails) to check for the sentinel -- call
`&*++getIterator()`.
This is (surprisingly!) a NFC commit. `ilist_traits<IndexListEntry>`
has an `ilist_half_node<IndexListEntry>` as a sentinel (and no other
fields), and so the layout of `ilist<IndexListEntry>` is:
--
struct ilist<IndexListEntry> {
ilist_half_node<IndexListEntry> Sentinel;
IndexListEntry *Head;
IndexListEntry *getHead() { return Head; }
IndexListEntry *getSentinel() { return cast<...>(&Sentinel); }
};
--
In memory, this happens to look just like:
--
struct ilist<IndexListEntry> {
ilist_node<IndexListEntry> Sentinel;
IndexListEntry *getHead() { return Sentinel.getNext(); }
IndexListEntry *getSentinel() { return cast<...>(&Sentinel); }
};
--
As a result, `ilist_node<IndexListEntry>::getNextNode()` that checks
`getNext()` of the possible sentinel will get a pointer to the head of
the list; it will never detect the sentinel, and will return the
sentinel itself instead of `nullptr` in the special cases.
Since `getNextNode()` and `getPrevNode()` don't work, just be honest
that we're not checking for the end/beginning of the list here. Since
this code works, I guess we must never go past the sentinel.
(It's possible we're just getting lucky, and the new code will get
"lucky" in the same situations. To properly fix that hypothetical bug,
we would need to check the iterator against `end()`/`begin()`.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252538
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 9 Nov 2015 23:30:15 +0000 (23:30 +0000)]
Fix -Wdeprecated warnings due to the use of copy ops on SCEVPredicate derived class objects
SCEVUnionPredicate is copied constructed here: lib/Transforms/Scalar/LoopDistribute.cpp:793
and move assigned (which can use the base class's copy ctor just
fine/without extra cost (I'd add it if it weren't for MSVC's issues
meaning = default is insufficient)) here: lib/Transforms/Utils/LoopVersioning.cpp:46
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252537
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 9 Nov 2015 23:23:20 +0000 (23:23 +0000)]
[TargetLibraryInfo] Add support for fls, flsl, flsll.
This is a prerequisite for further optimisations of these functions,
which will be commited as a separate patch.
Differential Revision: http://reviews.llvm.org/D14219
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252535
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 9 Nov 2015 23:17:45 +0000 (23:17 +0000)]
[libFuzzer] make libFuzzer link if there is no sanitizer coverage instrumentation (it will fail at start-up time)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252533
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Diamond [Mon, 9 Nov 2015 23:15:38 +0000 (23:15 +0000)]
Fix `llvm-config` to adapt to the install environment.
Summary:
This patch does a couple of things:
- Adds a new argument `--shared-mode` which accepts a list of components and prints whether or not the provided components need to be linked statically or shared.
- Fixes `--libnames` when CMake BUILD_SHARED_LIBS is used.
- Fixes `--libnames`, `--libs`, and `--libfiles` for dylib when static components aren't installed.
- Fixes `--libnames`, `--libs`, `--libfiles`, and `--components` to use LLVM_DYLIB_COMPONENTS as the component manifest for dylib linking.
- Uses the host platform's usual convention for filename extensions and such, instead of always defaulting to Unix-izms.
Because I don't own a Mac, I am not able to test the Mac platform dependent stuff locally. If someone would be willing to run a build for me on their machine (unless there's a better option), I'd appreciate it.
Reviewers: jfb, brad.king, whitequark, beanz
Subscribers: beanz, jauhien, llvm-commits
Differential Revision: http://reviews.llvm.org/D13198
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252532
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 9 Nov 2015 23:10:29 +0000 (23:10 +0000)]
Combine ifdefs around dl_iterate_phdr in Unix/Signals.inc
This avoids the need to have two dummy implementations of
findModulesAndOffsets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252531
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 9 Nov 2015 23:07:48 +0000 (23:07 +0000)]
[WinEH] Don't emit CATCHRET from visitCatchPad
Instead, emit a CATCHPAD node which will get selected to a target
specific sequence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252528
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 9 Nov 2015 21:54:55 +0000 (21:54 +0000)]
Deprecate Autoconf
As per the very positive feedback from llvm-dev (http://lists.llvm.org/pipermail/llvm-dev/2015-November/092150.html), this commit officially deprecates the LLVM autoconf-based build system.
Anyone still using it should switch to CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252520
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Nov 2015 21:53:58 +0000 (21:53 +0000)]
specify triple so Windows bots won't be sad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252519
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 9 Nov 2015 21:34:45 +0000 (21:34 +0000)]
Add templated read/write to support::endian.
Expose read and write functions that take endianess as a template
parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252517
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Nov 2015 21:16:49 +0000 (21:16 +0000)]
[x86] try harder to match bitwise 'or' into an LEA
The motivation for this patch starts with the epic fail example in PR18007:
https://llvm.org/bugs/show_bug.cgi?id=18007
...unfortunately, this patch makes no difference for that case, but it solves some
simpler cases. We'll get there some day. :)
The current 'or' matching code was using computeKnownBits() via
isBaseWithConstantOffset() -> MaskedValueIsZero(), but that's an unnecessarily limited use.
We can do more by copying the logic in ValueTracking's haveNoCommonBitsSet(), so we can
treat the 'or' as if it was an 'add'.
There's a TODO comment here because we should lift the bit-checking logic into a helper
function, so it's not duplicated in DAGCombiner.
An example of the better LEA matching:
leal (%rdi,%rdi), %eax
andl $1, %esi
orl %esi, %eax
Becomes:
andl $1, %esi
leal (%rsi,%rdi,2), %eax
Differential Revision: http://reviews.llvm.org/D13956
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252515
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 21:06:28 +0000 (21:06 +0000)]
[Hexagon] Separating statement to match what clang-format would do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252513
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 9 Nov 2015 21:04:00 +0000 (21:04 +0000)]
[WinEH] Tweak funclet prologue/epilogue insertion to pass verifier
For some reason we'd never run MachineVerifier on WinEH code, and you
explicitly have to ask for it with llc. I added it to a few test cases
to get some coverage.
Fixes PR25461.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252512
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 9 Nov 2015 19:59:02 +0000 (19:59 +0000)]
[WinEH] Re-committing r252249 (Clone funclets with multiple parents) with additional fixes for determinism problems
Differential Revision: http://reviews.llvm.org/D14454
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252508
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 9 Nov 2015 19:44:38 +0000 (19:44 +0000)]
[Hexagon] Fix -Wmicrosoft-enum-value warning with explicit enum type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252505
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Mon, 9 Nov 2015 19:36:53 +0000 (19:36 +0000)]
Windows-specific test for sys::path::remove_dots.
Differential Revision: http://reviews.llvm.org/D14503
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252504
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Nov 2015 19:18:26 +0000 (19:18 +0000)]
don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252502
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Nov 2015 18:59:30 +0000 (18:59 +0000)]
fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252500
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Mon, 9 Nov 2015 18:56:31 +0000 (18:56 +0000)]
Moving FileManager::removeDotPaths to llvm::sys::path::remove_dots
Differential Revision: http://reviews.llvm.org/D14393
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252499
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Mon, 9 Nov 2015 18:03:48 +0000 (18:03 +0000)]
[sanitizer] Use same shadow offset for ASAN on aarch64
This patch makes ASAN for aarch64 use the same shadow offset for all
currently supported VMAs (39 and 42 bits). The shadow offset is the
same for 39-bit (36). Similar to ppc64 port, aarch64 transformation
also requires to use an add instead of 'or' for 42-bit VMA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252495
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Mon, 9 Nov 2015 17:30:38 +0000 (17:30 +0000)]
Add discriminators for call instructions that are from the same line and same basic block.
Summary: Call instructions that are from the same line and same basic block needs to have separate discriminators to distinguish between different callsites.
Reviewers: davidxl, dnovillo, dblaikie
Subscribers: dblaikie, probinson, llvm-commits
Differential Revision: http://reviews.llvm.org/D14464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252492
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 9 Nov 2015 16:56:06 +0000 (16:56 +0000)]
Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252491
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 9 Nov 2015 16:47:16 +0000 (16:47 +0000)]
GlobalOpt should maintain externally_initialized when splitting aggregates
When GlobalOpt splits an internal, global variable with an aggregate type, it
should propagate the externally_initialized flag to the newly created globals.
This makes the pass safe for our downstream use of this flag, while still
allowing some useful optimisations (such as removing dead parts of the split
aggregate) to be performed.
Differential Revision: http://reviews.llvm.org/D13382
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252490
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonathan Roelofs [Mon, 9 Nov 2015 16:10:00 +0000 (16:10 +0000)]
Create Makefile variables for 'share' and 'libexec'
in preparation for a Clang commit.
http://reviews.llvm.org/D14405
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252473
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 9 Nov 2015 14:32:05 +0000 (14:32 +0000)]
[LoopVectorize] Address post-commit feedback on r250032
Implemented as many of Michael's suggestions as were possible:
* clang-format the added code while it is still fresh.
* tried to change Value* to Instruction* in many places in computeMinimumValueSizes - unfortunately there are several places where Constants need to be handled so this wasn't possible.
* Reduce the pass list on loop-vectorization-factors.ll.
* Fix a bug where we were querying MinBWs for I->getOperand(0) but using MinBWs[I].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252469
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Mon, 9 Nov 2015 13:26:09 +0000 (13:26 +0000)]
Allow LLE/LD and the loop versioning infrastructure to use SCEV predicates
Summary:
LAA currently generates a set of SCEV predicates that must be checked by users.
In the case of Loop Distribute/Loop Load Elimination, no such predicates could have
been emitted, since we don't allow stride versioning. However, in the future there
could be SCEV predicates that will need to be checked.
This change adds support for SCEV predicate versioning in the Loop Distribute, Loop
Load Eliminate and the loop versioning infrastructure.
Reviewers: anemet
Subscribers: mssimpso, sanjoy, llvm-commits
Differential Revision: http://reviews.llvm.org/D14240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252467
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Mon, 9 Nov 2015 13:10:52 +0000 (13:10 +0000)]
[AArch64] Add UABDL patterns for log2 shuffle.
Summary:
This matches the sum-of-absdiff patterns emitted by the vectoriser using log2 shuffles.
Relies on D14207 to be able to match the `extract_subvector(..., 0)`
Reviewers: t.p.northover, jmolloy
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D14208
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252465
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Mon, 9 Nov 2015 12:45:11 +0000 (12:45 +0000)]
[AArch64] Handle extract_subvector(..., 0) in ISel.
Summary:
Lowering this pattern early to an `EXTRACT_SUBREG` was making it impossible to match larger patterns in tblgen that use `extract_subvector(..., 0)` as part of the their input pattern.
It seems like there will exist somewhere a better way of specifying this pattern over all relevant register value types, but I didn't manage to find it.
Reviewers: t.p.northover, jmolloy
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D14207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252464
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Mon, 9 Nov 2015 12:40:30 +0000 (12:40 +0000)]
[EABI] Add LLVM support for -meabi flag
"GCC requires the freestanding environment provide memcpy, memmove, memset
and memcmp": https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Standards.html
Hence in GNUEABI targets LLVM should not convert 'memops' to their equivalent
'__aeabi_memops'. This convertion violates GCC contract.
The -meabi flag controls whether or not LLVM will modify 'memops' in GNUEABI
targets.
Without -meabi: use the triple default EABI.
With -meabi=default: use the triple default EABI.
With -meabi=gnu: use 'memops'.
With -meabi=4 or -meabi=5: use '__aeabi_memops'.
With -meabi set to an unknown value: same as -meabi=default.
Patch by Vinicius Tinti.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252462
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Mon, 9 Nov 2015 12:19:10 +0000 (12:19 +0000)]
Revert "[ARM] Combine CMOV into BFI where possible"
This reverts commit r252057, as it broke ARM self-hosting buildbots, probably
due to a code-gen fault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252460
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 9 Nov 2015 11:03:18 +0000 (11:03 +0000)]
[CodeGen] Always promote f16 if not legal
We don't currently have any runtime library functions for operations on
f16 values (other than conversions to and from f32 and f64), so we
should always promote it to f32, even if that is not a legal type. In
that case, the f32 values would be softened to f32 library calls.
SoftenFloatRes_FP_EXTEND now needs to check the promoted operand's type,
as it may ne a no-op or require a different library call.
getCopyFromParts and getCopyToParts now need to cope with a
floating-point value stored in a larger integer part, as is the case for
any target that needs to store an f16 value in a 32-bit integer
register.
Differential Revision: http://reviews.llvm.org/D12856
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252459
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 07:10:24 +0000 (07:10 +0000)]
[Hexagon] Adding override to methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252453
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 06:15:55 +0000 (06:15 +0000)]
[Hexagon] Removing XFAIL on Hexagon target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252450
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 05:47:56 +0000 (05:47 +0000)]
[Hexagon] Fixing warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252448
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 05:31:39 +0000 (05:31 +0000)]
[Hexagon] Removing extra gen line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252447
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 05:16:08 +0000 (05:16 +0000)]
[Hexagon] Maybe the makefile?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252446
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 04:31:02 +0000 (04:31 +0000)]
[Hexagon] Adding LLVMBuild.txt reference to HexagonAsmParser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252444
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 04:07:48 +0000 (04:07 +0000)]
[Hexagon] Enabling ASM parsing on Hexagon backend and adding instruction parsing tests. General updating of the code emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252443
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 9 Nov 2015 02:46:41 +0000 (02:46 +0000)]
Add a method to the BitcodeReader to parse only the identification block
Summary: Mimic parseTriple(); and exposes it to LTOModule.cpp
Reviewers: dexonsmith, rafael
Subscribers: llvm-commits
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252442
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 00:46:46 +0000 (00:46 +0000)]
[AsmParser] Generalize matching for grammars without mnemonic-lead statements
Differential Revision: http://reviews.llvm.org/D14257
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252440
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 00:31:07 +0000 (00:31 +0000)]
[AsmParser] Backends can parameterize ASM tokenization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252439
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 9 Nov 2015 00:15:45 +0000 (00:15 +0000)]
[AsmParser] Provide target direct access to mnemonic token. Allow assignment parsing to be hooked by target. Allow target to specify if identifier is a label.
Differential Revision: http://reviews.llvm.org/D14255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252435
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Mon, 9 Nov 2015 00:01:22 +0000 (00:01 +0000)]
[PGO] Instr func name var creation code refactoring
Move the code from cfe to LLMV and become shared interfaces.
There is no functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252433
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Sun, 8 Nov 2015 23:48:23 +0000 (23:48 +0000)]
[AsmParser] Allow tokens to be put back in to the token stream.
Differential Revision: http://reviews.llvm.org/D14252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252432
91177308-0d34-0410-b5e6-
96231b3b80d8
Maksim Panchenko [Sun, 8 Nov 2015 19:34:17 +0000 (19:34 +0000)]
[RuntimeDyld] Add support for R_X86_64_PC8 relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252423
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 8 Nov 2015 09:45:06 +0000 (09:45 +0000)]
Appease hosts without HAVE_BACKTRACE nor ENABLE_BACKTRACES.
llvm/lib/Support/Signals.cpp:66:13: warning: unused function 'printSymbolizedStackTrace' [-Wunused-function]
llvm/lib/Support/Signals.cpp:52:13: warning: function 'findModulesAndOffsets' has internal linkage but is not defined [-Wundefined-internal]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252418
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 8 Nov 2015 08:04:40 +0000 (08:04 +0000)]
[PowerPC] Fix LoopPreIncPrep not to depend on SCEV constant simplifications
Under most circumstances, if SCEV can simplify X-Y to a constant, then it can
also simplify Y-X to a constant. However, there is no guarantee that this is
always true, and concensus is not to consider that a correctness bug in SCEV
(although it is undesirable).
PPCLoopPreIncPrep gathers pointers used to access memory (via loads, stores and
prefetches) into buckets, where in each bucket the relative pointer offsets are
constant. We used to keep each bucket as a multimap, where SCEV's subtraction
operation was used to define the ordering predicate. Instead, use a fixed SCEV
base expression for each bucket, record the constant offsets from that base
expression, and adjust it later, if desirable, once all pointers have been
collected.
Doing it this way should be more compile-time efficient than the previous
scheme (in addition to making the implementation less sensitive to SCEV
simplification quirks).
Fixes PR25170.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252417
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 8 Nov 2015 05:04:07 +0000 (05:04 +0000)]
[LoopStrengthReduce] Don't bother fixing up PHIs from EH Pad preds
We cannot really insert fixup code into a PHI's predecessor.
This fixes PR25445.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252416
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 8 Nov 2015 04:16:12 +0000 (04:16 +0000)]
Make bugpoint ehpad/token friendly
Tokens shouldn't be blindly replaced with undef/null. Also, don't try
to remove EH pad instructions from the top of basic blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252414
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 8 Nov 2015 02:36:00 +0000 (02:36 +0000)]
[WinEH] Update PHIs of CATCHRET successors
The TailDuplication machine pass ran across a malformed CFG: a PHI node
referred it's predecessor's predecessor instead of it's predecessor.
This occurred because we split the edge in X86ISelLowering when we
processed the CATCHRET but forgot to do something about the PHI nodes.
This fixes PR25444.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252413
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sat, 7 Nov 2015 10:21:25 +0000 (10:21 +0000)]
Erase unused FunctionDIs variables after r252219.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252401
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 7 Nov 2015 02:48:49 +0000 (02:48 +0000)]
[Bitcode] Add enums for call instruction markers and flags. NFC.
This commit adds enums in LLVMBitCodes.h to improve readability and
maintainability. This is a follow-up to r252368 which was discussed
here:
http://reviews.llvm.org/D12923
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252395
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 7 Nov 2015 02:47:31 +0000 (02:47 +0000)]
Try to fix build more -- like r252392 but for WebAssembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252394
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 7 Nov 2015 02:26:53 +0000 (02:26 +0000)]
Unbreak the build
My code clashed with some ilist iterator changes upstream. Fix by
adding an explicit "&*" coercion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252392
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 7 Nov 2015 01:56:07 +0000 (01:56 +0000)]
[FunctionAttrs] Add comment and clarify assertion message; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252389
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 7 Nov 2015 01:56:04 +0000 (01:56 +0000)]
[OperandBundles] Rename accessor, NFC
Rename getOperandBundle to getOperandBundleAt since that's more obvious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252388
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 7 Nov 2015 01:56:00 +0000 (01:56 +0000)]
[FunctionAttrs] Add handling for operand bundles
Summary:
Teach the FunctionAttrs to do the right thing for IR with operand
bundles.
Reviewers: reames, chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14408
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252387
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 7 Nov 2015 01:55:53 +0000 (01:55 +0000)]
[FunctionAttrs] Fix an iterator wraparound bug
Summary:
This change fixes an iterator wraparound bug in
`determinePointerReadAttrs`.
Ideally, ++'ing off the `end()` of an iplist should result in a failed
assert, but currently iplist seems to silently wrap to the head of the
list on `end()++`. This is why the bad behavior is difficult to
demonstrate.
Reviewers: chandlerc, reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252386
91177308-0d34-0410-b5e6-
96231b3b80d8
Joseph Tremoulet [Sat, 7 Nov 2015 01:11:31 +0000 (01:11 +0000)]
[WinEH] Update exception pointer registers
Summary:
The CLR's personality routine passes these in rdx/edx, not rax/eax.
Make getExceptionPointerRegister a virtual method parameterized by
personality function to allow making this distinction.
Similarly make getExceptionSelectorRegister a virtual method parameterized
by personality function, for symmetry.
Reviewers: pgavlin, majnemer, rnk
Subscribers: jyknight, dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D14344
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252383
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 7 Nov 2015 00:59:29 +0000 (00:59 +0000)]
Reapply "ADT: Require explicit ilist iterator/pointer conversions"
This reverts commit r252373, reapplying r252372 now that I've updated
clang-tools-extra. Original commit message follows.
ADT: Require explicit ilist iterator/pointer conversions
Disallow implicit conversions between ilist iterators and element
points. Explicit conversions still work of course.
This is the first step toward removing the undefined behaviour in
`ilist` and `iplist`:
http://lists.llvm.org/pipermail/llvm-dev/2015-October/091115.html
The motivation for removing the implicit iterators is that I came across
real bugs (that were *really* getting lucky). More details and some
brief discussion later in that thread:
http://lists.llvm.org/pipermail/llvm-dev/2015-October/091617.html
Note: if you have out-of-tree code, it should be fairly easy to revert
this patch downstream while you update your out-of-tree call sites.
Note that these conversions are occasionally latent bugs (that may
happen to "work" now, but only because of getting lucky with UB;
follow-ups will change your luck). When they are valid, I suggest using
`->getIterator()` to go from pointer to iterator, and `&*` to go from
iterator to pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252380
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 7 Nov 2015 00:55:46 +0000 (00:55 +0000)]
examples: Remove implicit ilist iterator conversions, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252379
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 7 Nov 2015 00:52:53 +0000 (00:52 +0000)]
[InstCombine] Teach FoldPHIArgZextsIntoPHI about EHPads
FoldPHIArgZextsIntoPHI cannot insert an instruction after the PHI if
there is an EHPad in the BB. Doing so would result in an instruction
inserted after a terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252377
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 7 Nov 2015 00:09:14 +0000 (00:09 +0000)]
Revert "ADT: Require explicit ilist iterator/pointer conversions"
This reverts commit r252372. Apparently I missed clang-tools-extra.
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/2534/steps/build/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252373
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 7 Nov 2015 00:02:32 +0000 (00:02 +0000)]
ADT: Require explicit ilist iterator/pointer conversions
Disallow implicit conversions between ilist iterators and element
points. Explicit conversions still work of course.
This is the first step toward removing the undefined behaviour in
`ilist` and `iplist`:
http://lists.llvm.org/pipermail/llvm-dev/2015-October/091115.html
The motivation for removing the implicit iterators is that I came across
real bugs (that were *really* getting lucky). More details and some
brief discussion later in that thread:
http://lists.llvm.org/pipermail/llvm-dev/2015-October/091617.html
Note: if you have out-of-tree code, it should be fairly easy to revert
this patch downstream while you update your out-of-tree call sites.
Note that these conversions are occasionally latent bugs (that may
happen to "work" now, but only because of getting lucky with UB;
follow-ups will change your luck). When they are valid, I suggest using
`->getIterator()` to go from pointer to iterator, and `&*` to go from
iterator to pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252372
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 7 Nov 2015 00:01:16 +0000 (00:01 +0000)]
ADT: Remove last implicit ilist iterator conversions, NFC
Some implicit ilist iterator conversions have crept back into Analysis,
Transforms, Hexagon, and llvm-stress. This removes them.
I'll commit a patch immediately after this to disallow them (in a
separate patch so that it's easy to revert if necessary).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252371
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 6 Nov 2015 23:59:23 +0000 (23:59 +0000)]
[InstCombine] Don't insert an instruction after a terminator
We tried to insert a cast of a phi in a block whose terminator is an
EHPad. This is invalid. Do not attempt the transform in these
circumstances.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252370
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 6 Nov 2015 23:55:38 +0000 (23:55 +0000)]
Add 'notail' marker for call instructions.
This marker prevents optimization passes from adding 'tail' or
'musttail' markers to a call. Is is used to prevent tail call
optimization from being performed on the call.
rdar://problem/
22667622
Differential Revision: http://reviews.llvm.org/D12923
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252368
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Fri, 6 Nov 2015 23:44:23 +0000 (23:44 +0000)]
Revert r252366: [Support] Use GetTempDir to get the temporary dir path on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252367
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Fri, 6 Nov 2015 23:21:49 +0000 (23:21 +0000)]
[Support] Use GetTempDir to get the temporary dir path on Windows.
Summary:
In general GetTempDir follows the same logic as the replaced code: checks env variables TMP, TEMP, USERPROFILE in order. However, it also perform other checks like making separators native (\), making the path absolute, etc.
This change fixes FileSystemTest.CreateDir unittest that had been failing when run from Unix-like shell on Windows (Unix-like path separator (/) used in env variables).
Reviewers: chapuni, rafael, aaron.ballman
Subscribers: rafael, llvm-commits
Differential Revision: http://reviews.llvm.org/D14231
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252366
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 6 Nov 2015 23:16:53 +0000 (23:16 +0000)]
[AArch64][FastISel] Don't even try to select vector icmps.
We used to try to constant-fold them to i32 immediates.
Given that fast-isel doesn't otherwise support vNi1, when selecting
the result users, we'd fallback to SDAG anyway.
However, if the users were in another block, we'd insert broken
cross-class copies (GPR32 to FPR64).
Give up, let SDAG agree with itself on a vNi1 legalization strategy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252364
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 6 Nov 2015 23:16:48 +0000 (23:16 +0000)]
[X86] Fold (trunc (i32 (zextload i16))) into vbroadcast.
When matching non-LSB-extracting truncating broadcasts, we now insert
the necessary SRL. If the scalar resulted from a load, the SRL will be
folded into it, creating a narrower, offset, load.
However, i16 loads aren't Desirable, so we get i16->i32 zextloads.
We already catch i16 aextloads; catch these as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252363
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 6 Nov 2015 23:16:43 +0000 (23:16 +0000)]
[X86] SRL non-LSB extracts when folding to truncating broadcasts.
Now that we recognize this, we can support it instead of bailing out.
That is, we can fold:
(v8i16 (shufflevector
(v8i16 (bitcast (v4i32 (build_vector X, Y, ...)))),
<1,1,...,1>))
into:
(v8i16 (vbroadcast (i16 (trunc (srl Y, 16)))))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252362
91177308-0d34-0410-b5e6-
96231b3b80d8