OSDN Git Service
Simon Dardis [Thu, 13 Jul 2017 19:27:41 +0000 (19:27 +0000)]
Revert "[mips][mt][6/7] Add support for mftr, mttr instructions."
This reverts r307836, it broke one of the buildbots. Reverting
while I investigate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307939
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Thu, 13 Jul 2017 19:26:27 +0000 (19:26 +0000)]
[lit] add a -vv option to echo all executed commands.
Debugging LIT scripts can be rather painful, as LIT directly does not
specify which line has failed.
Rather, FileCheck is expected to report the failing location, but it can
be often ambiguous if multiple commands are tested against the same
prefix. This change adds a -vv option, which echoes all output.
Then detecting the error becomes straightforward: last printed line is
the failing one.
Of course, it could be desired to try to get failing line number
directly from bash, but it involves excessive hacks on older bash
versions (cf.
https://stackoverflow.com/questions/
24398691/how-to-get-the-real-line-number-of-a-failing-bash-command)
Differential Revision: https://reviews.llvm.org/D35330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307938
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Zhogin [Thu, 13 Jul 2017 18:57:40 +0000 (18:57 +0000)]
[X86][tests] Added rotate_vec.ll CodeGen test. NFC precommit for bug 33691 fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307937
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Thu, 13 Jul 2017 18:55:52 +0000 (18:55 +0000)]
[Dominators] Improve reachability verification
Summary:
This patch improves verification by making `verifyReachablility` look for CFG not found in the DomTree.
It also makes the verification work with postdominators by handling virtual root.
Reviewers: dberlin, davide, grosser, sanjoy
Reviewed By: dberlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35279
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307936
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 13 Jul 2017 18:17:58 +0000 (18:17 +0000)]
[Hexagon] Use VSPLAT instead of COMBINE for vectors of type v2i32, NFC
This cleans up the vector shift patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307935
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Thu, 13 Jul 2017 18:17:10 +0000 (18:17 +0000)]
[PowerPC] Ensure displacements for DQ-Form instructions are multiples of 16
As outlined in the PR, we didn't ensure that displacements for DQ-Form
instructions are multiples of 16. Since the instruction encoding encodes
a quad-word displacement, a sub-16 byte displacement is meaningless and
ends up being encoded incorrectly.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33671.
Differential Revision: https://reviews.llvm.org/D35007
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307934
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 13 Jul 2017 17:24:57 +0000 (17:24 +0000)]
[InstCombine] add descriptive comments for tests; NFC
Also, remove unnecessary function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307930
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 13 Jul 2017 17:10:12 +0000 (17:10 +0000)]
Fix unused variable warning on EXPENSIVE_CHECKS release builds. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307929
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 13 Jul 2017 17:03:12 +0000 (17:03 +0000)]
[AArch64] Implement support for windows style vararg functions
Pass parameters properly in calls to such functions (pass all
floats in integer registers), and handle va_start properly (allocate
stack immediately below the arguments on the stack, to save the
register arguments into a single continuous array).
Differential Revision: https://reviews.llvm.org/D35006
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307928
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 13 Jul 2017 17:03:02 +0000 (17:03 +0000)]
[llvm-objdump] Properly print MachO aarch64 addend relocations
Previously such relocations fell into the last case for local
symbols, using the relocation addend as symbol index, leading to
a crash.
Differential Revision: https://reviews.llvm.org/D35239
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307927
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 13 Jul 2017 17:00:30 +0000 (17:00 +0000)]
Documentation fix. NFC.
A MCFixup might not even be in an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307926
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 13 Jul 2017 16:56:24 +0000 (16:56 +0000)]
Put std::mutex usage behind #ifdefs to pacify the sanitizer buildbot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307925
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederich Munch [Thu, 13 Jul 2017 16:11:08 +0000 (16:11 +0000)]
Support: Add llvm::center_justify.
Summary: Completes the set.
Reviewers: ruiu
Reviewed By: ruiu
Subscribers: ruiu, llvm-commits
Differential Revision: https://reviews.llvm.org/D35278
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307922
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 15:55:34 +0000 (15:55 +0000)]
[GlobalOpt] Autogenerate checks for the test in PR33686.
Also fix a typo while here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307921
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 15:40:59 +0000 (15:40 +0000)]
Reapply [GlobalOpt] Remove unreachable blocks before optimizing a function.
This commit reapplies r307215 now that we found out and fixed
the cause of the cfi test failure (in r307871).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307920
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Thu, 13 Jul 2017 15:29:13 +0000 (15:29 +0000)]
[AArch64] Enable the mnemonic spell checker
The AsmParser mnemonic spell checker was introduced in r307148 and enabled only
for ARM. This patch enables it for AArch64.
Differential Revision: https://reviews.llvm.org/D35357
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307918
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Thu, 13 Jul 2017 15:19:56 +0000 (15:19 +0000)]
[AArch64] Add an SVE target feature to the backend and TargetParser.
The feature will be used properly once assembler/disassembler support
begins to land.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307917
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Thu, 13 Jul 2017 15:01:23 +0000 (15:01 +0000)]
[AArch64] Add preliminary support for ARMv8.1 SUB/AND atomics
This patch is a follow-up to r305893 and adds preliminary support for the
fetch_sub and fetch_and operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307913
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Thu, 13 Jul 2017 13:21:23 +0000 (13:21 +0000)]
[RuntimeUnrolling] Update DomTree correctly when exit blocks have successors
Summary:
When we runtime unroll with multiple exit blocks, we also need to update the
immediate dominators of the immediate successors of the exit blocks.
Reviewers: reames, mkuper, mzolotukhin, apilipenko
Reviewed by: mzolotukhin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35304
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307909
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 13 Jul 2017 11:28:05 +0000 (11:28 +0000)]
Reland "[mips] Fix multiprecision arithmetic."
For multiprecision arithmetic on MIPS, rather than using ISD::ADDE / ISD::ADDC,
get SelectionDAG to break down the operation into ISD::ADDs and ISD::SETCCs.
For MIPS, only the DSP ASE has a carry flag, so in the general case it is not
useful to directly support ISD::{ADDE, ADDC, SUBE, SUBC} nodes.
Also improve the generation code in such cases for targets with
TargetLoweringBase::ZeroOrOneBooleanContent by directly using the result of the
comparison node rather than using it in selects. Similarly for ISD::SUBE /
ISD::SUBC.
Address optimization breakage by moving the generation of MIPS specific integer
multiply-accumulate nodes to before legalization.
This revolves PR32713 and PR33424.
Thanks to Simonas Kazlauskas and Pirama Arumuga Nainar for reporting the issue!
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D33494
The previous version of this patch was too aggressive in producing fused
integer multiple-addition instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307906
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 13 Jul 2017 11:09:34 +0000 (11:09 +0000)]
[ARM] GlobalISel: Support G_BR
This boils down to not crashing in reg bank select due to the lack of
register operands on this instruction, and adding some tests. The
instruction selection is already covered by the TableGen'erated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307904
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 13 Jul 2017 10:52:00 +0000 (10:52 +0000)]
[PM] Use range-based for loops in LegacyPassManager.cpp (NFC).
Summary:
This patch replaces a bunch of iterator-based for loops with range-based
for loops. There are 2 iterator-based loops left in this file in
removeNotPreservedAnalysis, but I think those cannot be replaced by
range-based for loops as they modify the container they are iterating
over.
Unless I missed something, this schould be a NFC and I would appreciate
if someone could have a quick look to confirm that.
Reviewers: chandlerc, pcc, jhenderson
Reviewed By: jhenderson
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D35310
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307902
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 13 Jul 2017 10:41:49 +0000 (10:41 +0000)]
[DAGCombiner] Fix issue with rotate combines asserting if the constant value types differ from the result type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307900
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Thu, 13 Jul 2017 10:24:30 +0000 (10:24 +0000)]
[ARM] Tidy up and organise better ARM.td. NFC.
This patch tidies up and organises ARM.td
so that it is easier to understandand
and extend in the future.
Reviewed by: @hahn, @rovka
Differential Revision: https://reviews.llvm.org/D35248
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307897
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 13 Jul 2017 09:52:06 +0000 (09:52 +0000)]
Fixup r307893: Silence warning
Silence unused variable warning in release builds.
*sigh*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307896
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 13 Jul 2017 09:39:00 +0000 (09:39 +0000)]
Use isNullConstantOrNullSplatConstant helper. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307895
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 13 Jul 2017 09:36:04 +0000 (09:36 +0000)]
Fix whitespace indentation. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307894
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 13 Jul 2017 09:30:08 +0000 (09:30 +0000)]
[ARM] GlobalISel: Move local variable. NFC
Move a local variable from outside a switch to inside every case that
needs it (which isn't all of the cases, of course).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307893
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 13 Jul 2017 08:53:43 +0000 (08:53 +0000)]
[ARM] Fix typo in test added in r307889
This fixes the following test failure:
LLVM :: Transforms/Inline/ARM/inline-target-attr.ll
Sorry for any inconenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307892
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Thu, 13 Jul 2017 08:40:59 +0000 (08:40 +0000)]
[AVR] Fix broken indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307891
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Thu, 13 Jul 2017 08:39:46 +0000 (08:39 +0000)]
[AVR] Add a 'LLVM_FALLTHROUGH' statement to the AsmParser
Should fix warnings in the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307890
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 13 Jul 2017 08:26:17 +0000 (08:26 +0000)]
[ARM] Inline callee if its target-features are a subset of the caller
Summary:
Similar to X86, it should be safe to inline callees if their
target-features are a subset of the caller. As some subtarget features
provide different instructions depending on whether they are set or
unset (e.g. ThumbMode and ModeSoftFloat), we use a whitelist of
target-features describing hardware capabilities only.
Reviewers: kristof.beyls, rengolin, t.p.northover, SjoerdMeijer, peter.smith, silviu.baranga, efriedma
Reviewed By: SjoerdMeijer, efriedma
Subscribers: dschuff, efriedma, aemerson, sdardis, javed.absar, arichardson, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D34697
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307889
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Thu, 13 Jul 2017 08:09:36 +0000 (08:09 +0000)]
[AVR] Fix indirect calls to function pointers
Patch by Carl Peto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307888
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Thu, 13 Jul 2017 07:38:53 +0000 (07:38 +0000)]
Add original reproducer for r307754 / PR33689
Apparently I managed to drop the test case between two revisions in
Phabricator: https://reviews.llvm.org/D35003
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307887
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Thu, 13 Jul 2017 06:48:39 +0000 (06:48 +0000)]
fix typos in comments and error messges; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307885
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 13 Jul 2017 06:34:10 +0000 (06:34 +0000)]
[X86] Simplify the getHostCPUName for AMD family 6 and 15.
As far as I can tell we can simply distinguish based on features rather than model number. Many of the strings we were previously using are treated the same by the backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307884
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 13 Jul 2017 05:54:08 +0000 (05:54 +0000)]
[llvm-objdump] Correctly distinguish between the MachO upper/lower16 relocations
All other code in MachODump.cpp uses the same comparison,
((r_length & 0x1) == 1), for distinguishing between the two,
while the code in llvm-objdump.cpp seemed to be incorrect.
Differential Revision: https://reviews.llvm.org/D35240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307882
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 04:19:13 +0000 (04:19 +0000)]
[opt-viewer] Don't except when debug info is not available.
For records without DebugLoc we simply skip the caller location in
map_remarks.
Fixes PR33764.
Patch by Simon Whittaker!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307880
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Thu, 13 Jul 2017 03:49:42 +0000 (03:49 +0000)]
[TargetLowering] Add hook for adding target MMO flags when doing ISel.
Summary: Add TargetLowering hook getMMOFlags() to add target specific
MMO flags to load/store instructions created by ISel.
Reviewers: bogner, hfinkel, qcolombet, MatzeB
Subscribers: mcrosier, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D34962
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307879
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Thu, 13 Jul 2017 02:28:54 +0000 (02:28 +0000)]
[MIR] Add support for printing and parsing target MMO flags
Summary: Add target hooks for printing and parsing target MMO flags.
Targets may override getSerializableMachineMemOperandTargetFlags() to
return a mapping from string to flag value for target MMO values that
should be serialized/parsed in MIR output.
Add implementation of this hook for AArch64 SuppressPair MMO flag.
Reviewers: bogner, hfinkel, qcolombet, MatzeB
Subscribers: mcrosier, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D34962
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307877
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 13 Jul 2017 01:56:37 +0000 (01:56 +0000)]
[libFuzzer] make sure that -reduce_inputs=1 deletes redundant files in the corpus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307875
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 01:36:12 +0000 (01:36 +0000)]
[sanstats] Remove a flaky test.
I don't know a reliable way of crafting a test for this case,
but I'll try a little harder. In the meanwhile, let's get the
bots green again. Please note this will be tested by `check-cfi`
once r307215 relands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307874
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 13 Jul 2017 01:08:53 +0000 (01:08 +0000)]
[libFuzzer] experimental feature -reduce_inputs (off by default) that tries to replace elements in the corpus with smaller ones that have the same feature set. Still needs tuning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307873
91177308-0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Thu, 13 Jul 2017 01:03:28 +0000 (01:03 +0000)]
[DWARF] Fixing a bug with processing of DWARF v5 indexed strings in Mach-O objects.
Code to convert MachO - specific section debug section names to standard DWARF v5
section names was in the wrong place.
Differential Revision: https://reviews.llvm.org/D35321
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307872
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 00:49:03 +0000 (00:49 +0000)]
[sanstats] Print the correct line information.
The instrumentation tracks the return address and not that of the
call so we remove one to compensate. Thanks for Peter Collingbourne
for confirming the analysis of the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307871
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 12 Jul 2017 23:30:02 +0000 (23:30 +0000)]
[CodeGenPrepare] Don't create dead instructions in addrmode sinking
When we fail to sink an instruction, we must make sure not to modify
the function; otherwise, we end up in an infinite loop because
CodeGenPrepare iterates until it doesn't make any changes.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33608 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307866
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 12 Jul 2017 23:27:44 +0000 (23:27 +0000)]
[PGO] Enhance pgo counter promotion
This is an incremental change to the promotion feature.
There are two problems with the current behavior:
1) loops with multiple exiting blocks are totally disabled
2) a counter update can only be promoted one level up in
the loop nest -- which does help much for short trip
count inner loops inside a high trip-count outer loops.
Due to this limitation, we still saw very large profile
count fluctuations from run to run for the affected loops
which are usually very hot.
This patch adds the support for promotion counters iteratively
across the loop nest. It also turns on the promotion for
loops with multiple exiting blocks (with a limit).
For single-threaded applications, the performance impact is flat
on average. For instance, dealII improves, but povray regresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307863
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Jul 2017 23:22:32 +0000 (23:22 +0000)]
[libFuzzer] relax test/shrink.test a bit (got broken on windows)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307862
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 12 Jul 2017 23:06:18 +0000 (23:06 +0000)]
AMDGPU: Fix converting unanalyzable global loads to SMRD
Not all memory dependence queries succeed, so this needs to
be conservative if it fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307861
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Wed, 12 Jul 2017 23:05:15 +0000 (23:05 +0000)]
[SjLj] Replace recursive block marking algorithm with iterative algorithm
Summary:
Some programs run into a stack overflow issue. This change avoids this
problem by replacing the recursive algorithm with the iterative version.
Reviewers: MatzeB, t.p.northover, dblaikie
Reviewed By: MatzeB
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35105
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307860
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Jul 2017 22:42:39 +0000 (22:42 +0000)]
[x86] add select-of-constant tests; NFC
We're using cmov in these cases, but we could reduce to simpler ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307859
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Jul 2017 22:22:36 +0000 (22:22 +0000)]
[libFuzzer] remove include <sanitizer/coverage_interface.h>, not needed any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307858
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Jul 2017 22:20:04 +0000 (22:20 +0000)]
[libFuzzer] refactoring in preparation for -reduce_inputs; NFC intended
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307857
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Wed, 12 Jul 2017 21:57:23 +0000 (21:57 +0000)]
Add element atomic memset intrinsic
Summary: Continuing the work from https://reviews.llvm.org/D33240, this change introduces an element unordered-atomic memset intrinsic. This intrinsic is essentially memset with the implementation requirement that all stores used for the assignment are done with unordered-atomic stores of a given element size.
Reviewers: eli.friedman, reames, mkazantsev, skatkov
Reviewed By: reames
Subscribers: jfb, dschuff, sbc100, jgravelle-google, aheejin, efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D34885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307854
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 12 Jul 2017 21:43:14 +0000 (21:43 +0000)]
[Solaris] Detect Solaris LD, use detection results to pass Solaris-ld options
Solaris ld is not the only linker available on Solaris.
Introducing linker detection and using LLVM_LINKER_IS_SOLARISLD to
select Solaris-ld specific handling.
Patch by: Fedor Sergeev
Differential Revision: https://reviews.llvm.org/D35325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307852
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 12 Jul 2017 21:41:28 +0000 (21:41 +0000)]
[AArch64] Only run macro fusion for CPUs with any fusion support.
Reviewers: evandro, t.p.northover, javed.absar
Reviewed By: evandro
Subscribers: aemerson, rengolin, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34959
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307851
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 12 Jul 2017 21:37:02 +0000 (21:37 +0000)]
Use --color-diagnostics instead of -color-diagnostics.
Solaris ld interprets -color-diagnostics as a -c option, so it is
better to use --color-diagnostics instead. lld accepts both.
Differential Revision: https://reviews.llvm.org/D35327
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307850
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederich Munch [Wed, 12 Jul 2017 21:22:45 +0000 (21:22 +0000)]
Allow clients to specify search order of DynamicLibraries.
Summary: Different JITs and other clients of LLVM may have different needs in how symbol resolution should occur.
Reviewers: v.g.vassilev, lhames, karies
Reviewed By: v.g.vassilev
Subscribers: pcanal, llvm-commits
Differential Revision: https://reviews.llvm.org/D33529
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307849
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 12 Jul 2017 21:20:28 +0000 (21:20 +0000)]
[AMDGPU] fcanonicalize elimination optimization
We are using multiplication by 1.0 to flush denormals and quiet sNaNs.
That is possible to omit this multiplication if source of the
fcanonicalize instruction is known to be flushed/quieted, i.e.
if it comes from another instruction known to do the normalization
and we are using IEEE mode to quiet sNaNs.
Differential Revision: https://reviews.llvm.org/D35218
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307848
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 12 Jul 2017 21:08:24 +0000 (21:08 +0000)]
Don't expose a map in the DWARFContext interface.
Doing so is leaking an implementation detail.
I have an implementation that uses the lld infrastructure and doesn't
use a map or object::SectionRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307846
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Wed, 12 Jul 2017 20:55:43 +0000 (20:55 +0000)]
[LoopUnrollRuntime] NFC: Refactored safety checks of unrolling multi-exit loop
Refactored the code and separated out a function
`canSafelyUnrollMultiExitLoop` to reduce redundant checks and make it
easier to add profitability heuristics later.
Added tests to runtime unrolling to make sure that unrolling for
multi-exit loops is not done unless the option
-unroll-runtime-multi-exit is true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307843
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 12 Jul 2017 20:53:22 +0000 (20:53 +0000)]
[AArch64] Add AArch64Subtarget::isFusion function.
Summary:
isFusion returns true if the subtarget supports any kind of instruction
fusion, similar to ARMSubtarget::isFusion. This was suggested in D34142.
This changes the current behavior slightly, because the macro fusion mutation
is now added to the PostRA MachineScheduler in case the subtarget supports
any kind of fusion. I think that makes sense because if the PostRA
MachineScheduler is run, there is potential that instructions scheduled back to
back are re-scheduled.
Reviewers: evandro, t.p.northover, joelkevinjones, joel_k_jones, steleman
Reviewed By: joelkevinjones
Subscribers: joel_k_jones, aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34958
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307842
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 12 Jul 2017 20:50:04 +0000 (20:50 +0000)]
[WebAssembly] Mark element atomic memcpy/memmove intrinsics as unsupported
Summary:
Element atomic intrinsicAtomic instructions are not yet supported in WebAssembly, so we mark them as
unsupported for the moment.
Reviewers: sunfish, dschuff, sbc100
Reviewed By: dschuff, sbc100
Subscribers: jfb, sbc100, jgravelle-google
Differential Revision: https://reviews.llvm.org/D35322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307841
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 12 Jul 2017 20:49:21 +0000 (20:49 +0000)]
Remove unneeded use of #undef DEBUG_TYPE. NFC
Where is is needed (at the end of headers that define it), be
consistent about its use.
Also fix a few header guards that I found in the process.
Differential Revision: https://reviews.llvm.org/D34916
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307840
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 12 Jul 2017 19:53:55 +0000 (19:53 +0000)]
[LV] Don't allow outside uses of IVs if the SCEV is predicated on loop conditions.
This fixes PR33706.
Differential Revision: https://reviews.llvm.org/D35227
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307837
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 19:47:45 +0000 (19:47 +0000)]
[mips][mt][6/7] Add support for mftr, mttr instructions.
Unlike many other instructions, these instructions have aliases which
take coprocessor registers, gpr register, accumulator (and dsp accumulator)
registers, floating point registers, floating point control registers and
coprocessor 2 data and control operands.
For the moment, these aliases are treated as pseudo instructions which are
expanded into the underlying instruction. As a result, disassembling these
instructions shows the underlying instruction and not the alias.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35253
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307836
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 12 Jul 2017 19:46:35 +0000 (19:46 +0000)]
Fix non-Windows build after PDB native builtin type change
Some C++14 features slipped in along with an extra member qualification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307835
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Wed, 12 Jul 2017 19:38:11 +0000 (19:38 +0000)]
[PDB] Enable NativeSession to create symbols for built-in types on demand
Summary:
There is a reserved range of type indexes for built-in types (like integers).
This will create a symbol for a built-in type if the caller askes for one by
type index. This is also plumbing for being able to recall symbols by type
index in general, but user-defined types will come in subsequent patches.
Reviewers: rnk, zturner
Subscribers: mgorny, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D35163
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307834
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Wed, 12 Jul 2017 19:24:07 +0000 (19:24 +0000)]
Fix to web assembly lib call list
Summary:
Revision 307796 caused an internal build break in WebAssembly bots in the form of a
crash. ex:
Here's the crash dump from one of the failing tests:
/usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc < /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals | /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
--
Exit Code: 2
Command Output (stderr):
--
Stack dump:
0. Program arguments: build/default/./bin/llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
1. Running pass 'Function Pass Manager' on module '<stdin>'.
2. Running pass 'WebAssembly Assembly Printer' on function '@call_memcpy'
FileCheck error: '-' is empty.
FileCheck command line: build/default/./bin/FileCheck src/test/CodeGen/WebAssembly/global.ll
The problem is in lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an array declared:
545 static const char *
Fix to web assembly lib call list
Summary:
Revision 307796 caused an internal build break in WebAssembly bots in the form of a
crash. ex:
Here's the crash dump from one of the failing tests:
/usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc < /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals | /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
--
Exit Code: 2
Command Output (stderr):
--
Stack dump:
0. Program arguments: build/default/./bin/llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
1. Running pass 'Function Pass Manager' on module '<stdin>'.
2. Running pass 'WebAssembly Assembly Printer' on function '@call_memcpy'
FileCheck error: '-' is empty.
FileCheck command line: build/default/./bin/FileCheck src/test/CodeGen/WebAssembly/global.ll
The problem is in lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an array declared:
static const char *
RuntimeLibcallNames[RTLIB::UNKNOWN_LIBCALL] = {
That is defining a runtime lib call name for each entry in the enum RTLIB:Libcall from include/llvm/CodeGen/RuntimeLibcalls.h.
Revision 307796 added entries to the enum, but didn’t add entries to the RuntimeLibcallNames array, which caused a crash when attempting
to access past the end of the array.
This patch fixes the issue by adding the element atomic memmove to the WebAssembly arrays.
Reviewed by: reames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307831
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Wed, 12 Jul 2017 18:42:16 +0000 (18:42 +0000)]
[LoopRotate] Fix DomTree update logic for unreachable nodes. Fix PR33701.
Summary:
LoopRotate manually updates the DoomTree by iterating over all predecessors of a basic block and computing the Nearest Common Dominator.
When a predecessor happens to be unreachable, `DT.findNearestCommonDominator` returns nullptr.
This patch teaches LoopRotate to handle this case and fixes [[ https://bugs.llvm.org/show_bug.cgi?id=33701 | PR33701 ]].
In the future, LoopRotate should be taught to use the new incremental API for updating the DomTree.
Reviewers: dberlin, davide, uabelho, grosser
Subscribers: efriedma, mzolotukhin
Differential Revision: https://reviews.llvm.org/D35074
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307828
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 12 Jul 2017 18:23:06 +0000 (18:23 +0000)]
Use std::mutex to avoid memory allocation after OOM
ManagedStatic<sys::Mutex> would lazilly allocate a sys::Mutex to lock
when reporting an OOM, which is a bad idea.
The three STL implementations that I know of use pthread_mutex_lock and
EnterCriticalSection to implement std::mutex. I'm pretty sure that
neither of those allocate heap memory.
It seems that we unconditionally use std::mutex without testing
LLVM_ENABLE_THREADS elsewhere in the codebase, so this should be
portable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307827
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Wed, 12 Jul 2017 18:17:34 +0000 (18:17 +0000)]
[libFuzzer] Add a dependency on symbolizer from libFuzzer tests
Some libFuzzer tests on Linux would fail with bizarre error messages
unless llvm-symbolizer binary is present.
Differential Revision: https://reviews.llvm.org/D35313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307826
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Wed, 12 Jul 2017 18:16:09 +0000 (18:16 +0000)]
[libFuzzer] NFC Declare LIBFUZZER_FLAGS_BASE outside of an if-block
The current code relies on the assumption that tests are included only
if LLVM_USE_SANITIZE_COVERAGE is enabled.
This commit makes it easier to relax the assumption in the future, as
the variable LIBFUZZER_FLAGS_BASE is used further in libFuzzer tests.
Differential Revision: https://reviews.llvm.org/D35314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307825
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Wed, 12 Jul 2017 18:14:19 +0000 (18:14 +0000)]
[libFuzzer] Do not use LLVM ostream in tests
Differential Revision: https://reviews.llvm.org/D35312
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307824
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Jul 2017 17:56:46 +0000 (17:56 +0000)]
[x86] improve SBB optimizations for SETB/SETA with subtract
This is another step towards removing a combine that turns sext
into select of constants and preparing the backend for an IR
future where select is the canonical form.
Earlier commits in this area:
https://reviews.llvm.org/rL306040
https://reviews.llvm.org/rL306072
https://reviews.llvm.org/rL307404 (https://reviews.llvm.org/D34652)
https://reviews.llvm.org/rL307471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307821
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Jul 2017 17:44:50 +0000 (17:44 +0000)]
[x86] add tests for improving sbb transforms; NFC
We're subtracting X from X the hard way...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307819
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 12 Jul 2017 17:32:32 +0000 (17:32 +0000)]
GlobalISel: Handle selection of G_IMPLICIT_DEF in AArch64
A generic variant of IMPLICIT_DEF was added in r306875, but this
survives to selection and hits a `Cannot Select`. Add handling that
converts the note to a regular IMPLICIT_DEF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307817
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 12 Jul 2017 16:30:37 +0000 (16:30 +0000)]
Add a test for r307754
As promised in D35003.
Uses -codegenprepare instead of -instcombine since we hit the same
buggy path anyway, and CGP lets us keep this test really simple
(instcombine likes turning the alloca T, N into alloca [N x T], which
hides the bug this is testing for).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307811
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 16:23:57 +0000 (16:23 +0000)]
[mips][mt][5/7] Add support for fork and yield instructions.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307808
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 12 Jul 2017 16:14:00 +0000 (16:14 +0000)]
Add back a CHECK line.
I accidentally removed it in r307730.
Thanks to Martin Storsjö for noticing!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307801
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 12 Jul 2017 15:30:59 +0000 (15:30 +0000)]
[CodeGen] Add dependency printer
Add SDep printer to make debugging sessions more productive.
Differential revision: https://reviews.llvm.org/D35144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307799
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 12 Jul 2017 15:26:06 +0000 (15:26 +0000)]
[X86/FastIsel] Fall-back to SelectionDAG when lowering soft-floats.
FastIsel can't handle them, so we would end up crashing during
register class selection.
Fixes PR26522.
Differential Revision: https://reviews.llvm.org/D35272
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307797
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Wed, 12 Jul 2017 15:25:26 +0000 (15:25 +0000)]
Add element atomic memmove intrinsic
Summary: Continuing the work from https://reviews.llvm.org/D33240, this change introduces an element unordered-atomic memmove intrinsic. This intrinsic is essentially memmove with the implementation requirement that all loads/stores used for the copy are done with unordered-atomic loads/stores of a given element size.
Reviewers: eli.friedman, reames, mkazantsev, skatkov
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34884
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307796
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 14:48:27 +0000 (14:48 +0000)]
[mips][mt][4/7] Add IAS support for dvpe, evpe instructions.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35251
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307793
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 12 Jul 2017 13:41:13 +0000 (13:41 +0000)]
[X86][SSE] Fix file check prefix warning breaking buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307790
91177308-0d34-0410-b5e6-
96231b3b80d8
Kamil Rytarowski [Wed, 12 Jul 2017 13:24:46 +0000 (13:24 +0000)]
Make shell redirection construct portable
Summary:
NetBSD shell sh(1) does not support ">& /dev/null" construct.
This is bashism. The portable and POSIX solution is to use:
"> /dev/null 2>&1".
This change fixes 22 Unexpected Failures on NetBSD/amd64
for the "check-llvm" target.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, dim, rnk
Reviewed By: joerg, rnk
Subscribers: rnk, davide, llvm-commits
Differential Revision: https://reviews.llvm.org/D35277
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307789
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Wed, 12 Jul 2017 13:23:10 +0000 (13:23 +0000)]
[ARM] Adjust ifcvt heuristic for the diamond ifcvt case
When we have a diamond ifcvt the fallthough block will have a branch at the end
of it that disappears when predicated, so discount it from the predication cost.
Differential Revision: https://reviews.llvm.org/D34952
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307788
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 12 Jul 2017 12:44:10 +0000 (12:44 +0000)]
[X86][SSE] Add 512-bit (iX bitcast(vXi1)) test cases
Improves test coverage for pre-AVX512 targets as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307783
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 12:33:40 +0000 (12:33 +0000)]
[mips][mt] Add missing files from last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307779
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Wed, 12 Jul 2017 12:16:22 +0000 (12:16 +0000)]
fix typo in document; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307775
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 11:57:44 +0000 (11:57 +0000)]
[mips][mt][3/7] Add IAS support for emt, dmt instructions.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35250
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307774
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 12 Jul 2017 11:52:28 +0000 (11:52 +0000)]
[Linker] Add directives to support mixing ARM/Thumb module-level inline asm.
Summary:
By prepending `.text .thumb .balign 2` to the module-level inline
assembly from a Thumb module, the assembler will generate the assembly
from that module as Thumb, even if the destination module uses an ARM
triple. Similar directives are used for module-level inline assembly in
ARM modules.
The alignment and instruction set are reset based on the target triple
before emitting the first function label.
Reviewers: olista01, tejohnson, echristo, t.p.northover, rafael
Reviewed By: echristo
Subscribers: aemerson, javed.absar, eraman, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34622
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307772
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 12 Jul 2017 10:31:16 +0000 (10:31 +0000)]
[ARM] GlobalISel: Simplify inst selector code. NFC
Refactor CmpHelper into something simpler. It was overkill to use
templates for this - instead, use a simple CmpConstants structure to
hold the opcodes and other constants that are different when selecting
int / float / double comparisons. Also, extract some of the helpers that
were in CmpHelper into ARMInstructionSelector and make use of some of
them when selecting other things than just compares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307766
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 12 Jul 2017 09:08:11 +0000 (09:08 +0000)]
[PM] Fix a silly bug in my recent update to the CG update logic.
I used the wrong variable to update. This was even covered by a unittest
I wrote, and the comments for the unittest were correct (if confusing)
but the test itself just matched the buggy behavior. =[
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307764
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 12 Jul 2017 09:01:54 +0000 (09:01 +0000)]
[ARM] GlobalISel: Select s64 G_FCMP
Very similar to how we select s32 G_FCMP, the only thing that is
different is the exact opcodes that we use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307763
91177308-0d34-0410-b5e6-
96231b3b80d8
Serge Guelton [Wed, 12 Jul 2017 08:03:44 +0000 (08:03 +0000)]
Have Module::createRNG return a unique_ptr
Instead of a raw pointer, this makes memory management safer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307762
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Wed, 12 Jul 2017 08:01:44 +0000 (08:01 +0000)]
[X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.
Adding base test for AVX512
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307761
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Jul 2017 06:49:58 +0000 (06:49 +0000)]
[X86] Synchronize the ProcessorFeatures enum used by getHostCPUName with the enum in libgcc and soon compiler-rt.
This adds all the feature bits libgcc has. They will soon be added to compiler-rt as well. This adds a second 32 bit feature variable to hold the bits that are needed by getHostCPUName that are not in libgcc. libgcc had already used 31 of the 32 bits in the existing variable and we needed 3 bits so at minimum 2 bits would spill over. I chose to move all 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307758
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Jul 2017 06:49:57 +0000 (06:49 +0000)]
[X86] Sync ProcessorTypes and ProcessorSubtypes enums used by getHostCPUName with the version proposed to for compiler-rt's cpu_model.c
This keeps the starting entries in the enums in sync with what's in gcc and in review D35214 for compiler-rt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307757
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 12 Jul 2017 06:49:56 +0000 (06:49 +0000)]
[X86] Cleanup the switches in getHostCPUName to remove impossible combinations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307756
91177308-0d34-0410-b5e6-
96231b3b80d8