OSDN Git Service
Hsiangkai Wang [Wed, 1 Aug 2018 02:18:06 +0000 (02:18 +0000)]
[DebugInfo] Generate fixups as emitting DWARF .debug_line.
It is necessary to generate fixups in .debug_line as relaxation is
enabled due to the address delta may be changed after relaxation.
DWARF will record the mappings of lines and addresses in
.debug_line section. It will encode the information using special
opcodes, standard opcodes and extended opcodes in Line Number
Program. I use DW_LNS_fixed_advance_pc to encode fixed length
address delta and DW_LNE_set_address to encode absolute address
to make it possible to generate fixups in .debug_line section.
Differential Revision: https://reviews.llvm.org/D46850
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338477
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Wed, 1 Aug 2018 02:17:42 +0000 (02:17 +0000)]
[GlobalISel][IRTranslator] Use RPO traversal when visiting blocks to translate.
Previously we were just visiting the blocks in the function in IR order, which
is rather arbitrary. Therefore we wouldn't always visit defs before uses, but
the translation code relies on this assumption in some places.
Only codegen change seen in tests is an elision of a redundant copy.
Fixes PR38396
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338476
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Wed, 1 Aug 2018 01:31:30 +0000 (01:31 +0000)]
AMDGPU: Add clamp bit to dot intrinsics
Differential Revision: https://reviews.llvm.org/D49874
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338470
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 1 Aug 2018 01:29:30 +0000 (01:29 +0000)]
Simplify selectELFSectionForGlobal by pulling out the entry size
determination for mergeable sections into a small static function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338469
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 1 Aug 2018 01:03:34 +0000 (01:03 +0000)]
Tidy up logic around unique section name creation and remove a
mostly unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338468
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 1 Aug 2018 00:37:20 +0000 (00:37 +0000)]
[MachineOutliner] Clean up subtarget handling.
Call shouldOutlineFromFunctionByDefault, isFunctionSafeToOutlineFrom,
getOutliningType, and getMachineOutlinerMBBFlags using the correct
TargetInstrInfo. And don't create a MachineFunction for a function
declaration.
The call to getOutliningCandidateInfo is still a little weird, but at
least the weirdness is explicitly called out.
Differential Revision: https://reviews.llvm.org/D49880
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338465
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 1 Aug 2018 00:30:43 +0000 (00:30 +0000)]
[PATCH] [SLC] Test simplification of pow() for vector types (NFC)
Add test case for the simplification of `pow()` for vector types that D50035
enables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338463
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 31 Jul 2018 23:09:42 +0000 (23:09 +0000)]
Revert r338354 "[ARM] Revert r337821"
Disable ARMCodeGenPrepare by default again. It is causing verifier
failues in V8 that look like:
Duplicate integer as switch case
switch i32 %trunc, label %if.end13 [
i32 0, label %cleanup36
i32 0, label %if.then8
], !dbg !4981
i32 0
fatal error: error in backend: Broken function found, compilation aborted!
I will continue reducing the test case and send it along.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338452
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Tue, 31 Jul 2018 22:24:14 +0000 (22:24 +0000)]
[WebAssembly] Fix debug info tests after r338437.
After r338437, debug_ranges are no longer emitted. Previously, this was only
done for DWARF version 5 and above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338448
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Leschuk [Tue, 31 Jul 2018 22:19:19 +0000 (22:19 +0000)]
[DWARF] Support for .debug_addr (consumer)
This patch implements basic support for parsing
and dumping DWARFv5 .debug_addr section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338447
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 31 Jul 2018 22:11:02 +0000 (22:11 +0000)]
[SLC] Refactor the simplication of pow() (NFC)
Reword comments and minor code reformatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338446
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Tue, 31 Jul 2018 21:26:35 +0000 (21:26 +0000)]
[llvm-objcopy] Make --strip-debug strip .gdb_index
Summary:
See binutils-gdb/bfd/elf.c, GNU objcopy also strips .stab* (STABS)
.line* (DWARF 1) .gnu.linkonce.wi.* (linkonce section for .debug_info) but
I'm not sure we need to be compatible with it.
Reviewers: dblaikie, alexshap, jakehehrlich, jhenderson
Reviewed By: alexshap, jakehehrlich
Subscribers: aprantl, JDevlieghere, jakehehrlich, llvm-commits
Differential Revision: https://reviews.llvm.org/D50100
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338443
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 31 Jul 2018 21:18:44 +0000 (21:18 +0000)]
Revert r338431: "Add DebugCounters to DivRemPairs"
This reverts r338431; the test it added is making buildbots unhappy.
Locally, I can repro the failure on reverse-iteration builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338442
91177308-0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Tue, 31 Jul 2018 20:56:32 +0000 (20:56 +0000)]
[DWARF] Do not create a .debug_ranges section when no ranges are needed.
Reviewers: aprantl
Differential Revision: https://reviews.llvm.org/D50089
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338437
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 31 Jul 2018 20:38:42 +0000 (20:38 +0000)]
AMDGPU: Split amdgcn/r600 fminnum/fmaxnum tests
R600 breaks on too many things to usefully test changes
with ieee_mode on vs. off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338435
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 31 Jul 2018 20:07:46 +0000 (20:07 +0000)]
Add DebugCounters to DivRemPairs
For people who don't use DebugCounters, NFCI.
Patch by Zhizhou Yang!
Differential Revision: https://reviews.llvm.org/D50033
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338431
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Tue, 31 Jul 2018 20:05:08 +0000 (20:05 +0000)]
[llvm-mca] Update the help text to reflect "physical" registers. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338430
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Tue, 31 Jul 2018 19:58:42 +0000 (19:58 +0000)]
[SystemZ] Fix bad assert composition.
Use '&&' before the string instead of '||'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338429
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 31 Jul 2018 19:51:20 +0000 (19:51 +0000)]
DAG: Correct pointer type used for stack slot
Correct the address space for the inserted argument
stack slot.
AMDGPU seems to not do anything with this information,
so I don't think this was breaking anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338428
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandre Ganea [Tue, 31 Jul 2018 19:30:03 +0000 (19:30 +0000)]
[CodeView] Add coverage test for r338308 (Fixed crash in type merging)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338423
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 31 Jul 2018 19:29:04 +0000 (19:29 +0000)]
AMDGPU: Break 64-bit arguments into 32-bit pieces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338421
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 31 Jul 2018 19:17:47 +0000 (19:17 +0000)]
AMDGPU: Split wide vectors of i16/f16 into 32-bit regs on calls
This improves code for the same reasons as scalarizing 32-bit
element vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338418
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandre Ganea [Tue, 31 Jul 2018 19:15:50 +0000 (19:15 +0000)]
[CodeView] Minimal support for S_UNAMESPACE records
Differential Revision: https://reviews.llvm.org/D50007
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338417
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 31 Jul 2018 19:05:14 +0000 (19:05 +0000)]
AMDGPU: Scalarize vector argument types to calls
When lowering calling conventions, prefer to decompose vectors
into the constitute register types. This avoids artifical constraints
to satisfy a wide super-register.
This improves code quality because now optimizations don't need to
deal with the super-register constraint. For example the immediate
folding code doesn't deal with 4 component reg_sequences, so by
breaking the register down earlier the existing immediate folding
code is able to work.
This also avoids the need for the shader input processing code
to manually split vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338416
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Tue, 31 Jul 2018 18:59:46 +0000 (18:59 +0000)]
[llvm-mca][docs] Replace "temporary" with "physical registers". NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338415
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 31 Jul 2018 18:24:24 +0000 (18:24 +0000)]
[X86] WriteBSWAP sched classes are reg-reg only.
Don't declare them as X86SchedWritePair when the folded class will never be used.
Note: MOVBE (load/store endian conversion) instructions tend to have a very different behaviour to BSWAP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338412
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Tue, 31 Jul 2018 18:19:15 +0000 (18:19 +0000)]
[llvm-mca][docs] Improve the "How LLVM-MCA works" section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338410
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Tue, 31 Jul 2018 18:10:37 +0000 (18:10 +0000)]
Revert "[DebugInfo] Generate DWARF debug information for labels."
This reverts commits r338390 and r338398, they were causing LSan
failures on the ASan bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338408
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 31 Jul 2018 18:05:56 +0000 (18:05 +0000)]
[X86][SSE] Use ISD::MULHU for constant/non-zero ISD::SRL lowering (PR38151)
As was done for vector rotations, we can efficiently use ISD::MULHU for vXi8/vXi16 ISD::SRL lowering.
Shift-by-zero cases are still problematic (mainly on v32i8 due to extra AND/ANDN/OR or VPBLENDVB blend masks but v8i16/v16i16 aren't great either if PBLENDW fails) so I've limited this first patch to known non-zero cases if we can't easily use PBLENDW.
Differential Revision: https://reviews.llvm.org/D49562
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338407
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 31 Jul 2018 18:04:58 +0000 (18:04 +0000)]
Make ICF log output order deterministic.
This patch does the same thing as r338153 for COFF.
Note that this patch affects only the order of log messages.
The output file is already deterministic.
Differential Revision: https://reviews.llvm.org/D50023
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338406
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 31 Jul 2018 17:33:08 +0000 (17:33 +0000)]
[llvm-mca][x86] Add 32-bit instruction resource tests
These aren't exhaustive, but cover some instructions that are only available in 32-bit mode (where would we be without good BCD math performance?).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338404
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 31 Jul 2018 17:16:44 +0000 (17:16 +0000)]
Resubmit r338340 "[MS Demangler] Better demangling of template arguments."
This broke the build with GCC, but has since been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338403
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2018 17:12:08 +0000 (17:12 +0000)]
[X86] Add pattern matching for PMADDUBSW
Summary:
Similar to D49636, but for PMADDUBSW. This instruction has the additional complexity that the addition of the two products saturates to 16-bits rather than wrapping around. And one operand is treated as signed and the other as unsigned.
A C example that triggers this pattern
```
static const int N = 128;
int8_t A[2*N];
uint8_t B[2*N];
int16_t C[N];
void foo() {
for (int i = 0; i != N; ++i)
C[i] = MIN(MAX((int16_t)A[2*i]*(int16_t)B[2*i] + (int16_t)A[2*i+1]*(int16_t)B[2*i+1], -32768), 32767);
}
```
Reviewers: RKSimon, spatel, zvi
Reviewed By: RKSimon, zvi
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49829
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338402
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2018 17:12:06 +0000 (17:12 +0000)]
[X86] Add test cases that could use PMADDUBSW.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338401
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Tue, 31 Jul 2018 16:41:12 +0000 (16:41 +0000)]
[X86] Preserve more liveness information in emitStackProbeInline
This commit fixes two issues with the liveness information after the
call:
1) The code always spills RCX and RDX if InProlog == true, which results
in an use of undefined phys reg.
2) FinalReg, JoinReg, RoundedReg, SizeReg are not added as live-ins to
the basic blocks that use them, therefore they are seen undefined.
https://llvm.org/PR38376
Differential Revision: https://reviews.llvm.org/D50020
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338400
91177308-0d34-0410-b5e6-
96231b3b80d8
Hsiangkai Wang [Tue, 31 Jul 2018 16:22:09 +0000 (16:22 +0000)]
[DebugInfo] Fix build failed in 'clang-cmake-armv8-full'.
Builder clang-cmake-armv8-full failed due to the assembly 'comment'
notation is not '#' in the target. So, I use CHECK-SAME to avoid to
check the comment notation in the same line in the test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338398
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Tue, 31 Jul 2018 15:53:10 +0000 (15:53 +0000)]
[Dominators] Make slow walks shorter
Summary:
When DFS numbers are not yet calculated for a dominator tree, we have to walk it up to say whether one node dominates some other.
This patch makes the slow walks shorter by only walking until the level of the node we check against is reached. This is because a node cannot possibly dominate something higher in its tree.
When running opt with -O3, the patch results in:
* 25% fewer loop iterations for `opt` (fullLTO)
* 30% fewer loop iterations for sqlite
Reviewers: brzycki, asbirlea, chandlerc, NutshellySima, grosser
Reviewed By: NutshellySima
Subscribers: mehdi_amini, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D49955
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338396
91177308-0d34-0410-b5e6-
96231b3b80d8
Ewan Crawford [Tue, 31 Jul 2018 15:53:03 +0000 (15:53 +0000)]
Fix InstCombine address space assert
Workaround bug where the InstCombine pass was asserting on the IR added in lit
test, where we have a bitcast instruction after a GEP from an addrspace cast.
The second bitcast in the test was getting combined into
`bitcast <16 x i32>* %0 to <16 x i32> addrspace(3)*`, which looks like it should
be an addrspace cast instruction instead. Otherwise if control flow is allowed
to continue as it is now we create a GEP instruction
`<badref> = getelementptr inbounds <16 x i32>, <16 x i32>* %0, i32 0`. However
because the type of this instruction doesn't match the address space we hit an
assert when replacing the bitcast with that GEP.
```
void llvm::Value::doRAUW(llvm::Value*, bool): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed.
```
Differential Revision: https://reviews.llvm.org/D50058
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338395
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Tue, 31 Jul 2018 15:29:10 +0000 (15:29 +0000)]
[llvm-mca][docs] Always use `llvm-mca` in place of `MCA`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338394
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 31 Jul 2018 15:07:32 +0000 (15:07 +0000)]
[InstCombine] regenerate checks and add tests for D50035; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338392
91177308-0d34-0410-b5e6-
96231b3b80d8
Anastasis Grammenos [Tue, 31 Jul 2018 14:54:52 +0000 (14:54 +0000)]
[DebugInfo][LCSSA] Preserve debug location in lcssa phis
Summary:
When inserting lcssa Phi Nodes in the exit block
mak sure to preserve the original instructions DL.
Reviewers: vsk
Subscribers: JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D50009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338391
91177308-0d34-0410-b5e6-
96231b3b80d8
Hsiangkai Wang [Tue, 31 Jul 2018 14:48:32 +0000 (14:48 +0000)]
[DebugInfo] Generate DWARF debug information for labels.
There are two forms for label debug information in DWARF format.
1. Labels in a non-inlined function:
DW_TAG_label
DW_AT_name
DW_AT_decl_file
DW_AT_decl_line
DW_AT_low_pc
2. Labels in an inlined function:
DW_TAG_label
DW_AT_abstract_origin
DW_AT_low_pc
We will collect label information from DBG_LABEL. Before every DBG_LABEL,
we will generate a temporary symbol to denote the location of the label.
The symbol could be used to get DW_AT_low_pc afterwards. So, we create a
mapping between 'inlined label' and DBG_LABEL MachineInstr in DebugHandlerBase.
The DBG_LABEL in the mapping is used to query the symbol before it.
The AbstractLabels in DwarfCompileUnit is used to process labels in inlined
functions.
We also keep a mapping between scope and labels in DwarfFile to help to
generate correct tree structure of DIEs.
It also generates label debug information under global isel.
Differential Revision: https://reviews.llvm.org/D45556
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338390
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Tue, 31 Jul 2018 14:47:22 +0000 (14:47 +0000)]
Revert Enrich inline messages
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338389
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 31 Jul 2018 14:27:30 +0000 (14:27 +0000)]
[InstCombine] auto-generate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338388
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Tue, 31 Jul 2018 14:25:24 +0000 (14:25 +0000)]
Enrich inline messages
Summary:
This patch improves Inliner to provide causes/reasons for negative inline decisions.
1. It adds one new message field to InlineCost to report causes for Always and Never instances. All Never and Always instantiations must provide a simple message.
2. Several functions that used to return the inlining results as boolean are changed to return InlineResult which carries the cause for negative decision.
3. Changed remark priniting and debug output messages to provide the additional messages and related inline cost.
4. Adjusted tests for changed printing.
Patch by: yrouban (Yevgeny Rouban)
Reviewers: craig.topper, sammccall, sgraenitz, NutshellySima, shchenz, chandlerc, apilipenko, javed.absar, tejohnson, dblaikie, sanjoy, eraman, xbolva00
Reviewed By: tejohnson, xbolva00
Subscribers: xbolva00, llvm-commits, arsenm, mehdi_amini, eraman, haicheng, steven_wu, dexonsmith
Differential Revision: https://reviews.llvm.org/D49412
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338387
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Tue, 31 Jul 2018 14:23:49 +0000 (14:23 +0000)]
[llvm-mca] Remove README.txt
A detailed description of the tool has been recently added by Matt to
CommandGuide/llvm-mca.rst. File README.txt is now redundant and can be removed;
all the relevant user-guide information has been improved and then moved to
llvm-mca.rst.
In future, we should add another .rst for the "llvm-mca developer manual" to
provide infromation about:
- llvm-mca internals.
- How to add custom stages to the simulated pipeline.
- How to provide extra processor info in the scheduling model to improve the
analysis performed by llvm-mca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338386
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Tue, 31 Jul 2018 14:19:29 +0000 (14:19 +0000)]
[MemDep] Use PhiValuesAnalysis to improve alias analysis results
This is being done in order to make GVN able to better optimize certain inputs.
MemDep doesn't use PhiValues directly, but does need to notifiy it when things
get invalidated.
Differential Revision: https://reviews.llvm.org/D48489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338384
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Tue, 31 Jul 2018 14:17:15 +0000 (14:17 +0000)]
[InstSimplify] Fold another Select with And/Or pattern
Summary: Proof: https://rise4fun.com/Alive/L5J
Reviewers: lebedev.ri, spatel
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49975
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338383
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 31 Jul 2018 14:15:22 +0000 (14:15 +0000)]
DAG: Fix PromoteFloatResult for fcanonicalize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338382
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 31 Jul 2018 14:15:16 +0000 (14:15 +0000)]
AMDGPU: Don't handle FP16_TO_FP in isCanonicalized
This needs more special handling to do correctly.
Fixes test in subsequent commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338381
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Tue, 31 Jul 2018 14:02:43 +0000 (14:02 +0000)]
[SLP] Fix PR38339: Instruction does not dominate all uses!
Summary:
If the ExtractElement instructions can be optimized out during the
vectorization and we need to reshuffle the parent vector, this
ShuffleInstruction may be inserted in the wrong place causing compiler
to produce incorrect code.
Reviewers: spatel, RKSimon, mkuper, hfinkel, javed.absar
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49928
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338380
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 31 Jul 2018 13:34:31 +0000 (13:34 +0000)]
AMDGPU: Fold undef fcanonicalize to qNaN
We could choose a free 0 for this, but this
matches the behavior for fmul undef, 1.0. Also,
the NaN use is more useful for folding use operations
although if it's not eliminated it is more expensive
in terms of code size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338376
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 31 Jul 2018 13:25:23 +0000 (13:25 +0000)]
AMDGPU: Fix test check line bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338374
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Smith [Tue, 31 Jul 2018 13:24:49 +0000 (13:24 +0000)]
[ARM] Complete enumeration values for Tag_ABI_VFP_args
The LLD implementation of Tag_ABI_VFP_args needs to check the rarely seen
values of 3 (toolchain specific) and 4 compatible with both Base and VFP.
Add the missing enumeration values so that LLD can refer to them without
having to use the raw numbers.
Differential Revision: https://reviews.llvm.org/D50049
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338373
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Tue, 31 Jul 2018 13:21:43 +0000 (13:21 +0000)]
[llvm-mca][BtVer2] Teach how to identify dependency-breaking idioms.
This patch teaches llvm-mca how to identify dependency breaking instructions on
btver2.
An example of dependency breaking instructions is the zero-idiom XOR (example:
`XOR %eax, %eax`), which always generates zero regardless of the actual value of
the input register operands.
Dependency breaking instructions don't have to wait on their input register
operands before executing. This is because the computation is not dependent on
the inputs.
Not all dependency breaking idioms are also zero-latency instructions. For
example, `CMPEQ %xmm1, %xmm1` is independent on
the value of XMM1, and it generates a vector of all-ones.
That instruction is not eliminated at register renaming stage, and its opcode is
issued to a pipeline for execution. So, the latency is not zero.
This patch adds a new method named isDependencyBreaking() to the MCInstrAnalysis
interface. That method takes as input an instruction (i.e. MCInst) and a
MCSubtargetInfo.
The default implementation of isDependencyBreaking() conservatively returns
false for all instructions. Targets may override the default behavior for
specific CPUs, and return a value which better matches the subtarget behavior.
In future, we should teach to Tablegen how to automatically generate the body of
isDependencyBreaking from scheduling predicate definitions. This would allow us
to expose the knowledge about dependency breaking instructions to the machine
schedulers (and, potentially, other codegen passes).
Differential Revision: https://reviews.llvm.org/D49310
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338372
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Smith [Tue, 31 Jul 2018 13:03:54 +0000 (13:03 +0000)]
[ELF][ARM] Add Arm ABI names for float ABI ELF Header flags
The ELF for the Arm architecture document defines, for EF_ARM_EABI_VER5 and
above, the flags EF_ARM_ABI_FLOAT_HARD and EF_ARM_ABI_FLOAT_SOFT. These
have been defined to be compatible with the existing EF_ARM_VFP_FLOAT and
EF_ARM_SOFT_FLOAT used by gcc for EF_ARM_EABI_UNKNOWN.
This patch adds the flags in addition to the existing ones so that any code
depending on the old names will still work.
Differential Revision: https://reviews.llvm.org/D49992
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338370
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 31 Jul 2018 13:00:51 +0000 (13:00 +0000)]
Revert r338365: [X86] Improved sched models for X86 BT*rr instructions.
https://reviews.llvm.org/D49243
Contains WIP code that should not have been included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338369
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Tue, 31 Jul 2018 13:00:42 +0000 (13:00 +0000)]
[SystemZ] Improve decoding in case of instructions with four register operands.
Since z13, the max group size will be 2 if any μop has more than 3 register
sources.
This has been ignored sofar in the SystemZHazardRecognizer, but is now
handled by recognizing those instructions and adjusting the tracking of
decoding and the cost heuristic for grouping.
Review: Ulrich Weigand
https://reviews.llvm.org/D49847
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338368
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 31 Jul 2018 13:00:03 +0000 (13:00 +0000)]
[InstCombine] simplify code for A & (A ^ B) --> A & ~B
This fold was written in an odd way and tried to avoid
an endless loop by bailing out on all constants instead
of the supposedly problematic case of -1. But (X & -1)
should always be simplified before we reach here, so I'm
not sure how that is a problem.
There were no tests for the commuted patterns, so I added
those at rL338364.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338367
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew V. Tischenko [Tue, 31 Jul 2018 12:33:48 +0000 (12:33 +0000)]
[X86] Improved sched models for X86 BT*rr instructions.
https://reviews.llvm.org/D49243
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338365
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 31 Jul 2018 12:31:00 +0000 (12:31 +0000)]
[InstCombine] move/add tests for xor+add fold; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338364
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew V. Tischenko [Tue, 31 Jul 2018 10:14:43 +0000 (10:14 +0000)]
[X86] Improved sched models for X86 SHLD/SHRD* instructions.
Differential Revision: https://reviews.llvm.org/D9611
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338359
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 31 Jul 2018 10:13:17 +0000 (10:13 +0000)]
[X86][SSE] isFNEG - Use getTargetConstantBitsFromNode to handle all constant cases
isFNEG was duplicating much of what was done by getTargetConstantBitsFromNode in its own calls to getTargetConstantFromNode.
Noticed while reviewing D48467.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338358
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 31 Jul 2018 09:27:07 +0000 (09:27 +0000)]
[ARM] Allow automatically deducing the thumb instruction size for .inst
This matches GAS, that allows unsuffixed .inst for thumb.
Differential Revision: https://reviews.llvm.org/D49937
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338357
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 31 Jul 2018 09:27:01 +0000 (09:27 +0000)]
[ARM] Support the .inst directive for MachO and COFF targets
Contrary to ELF, we don't add any markers that distinguish data generated
with .short/.long from normal instructions, so the .inst directive only
adds compatibility with assembly that uses it.
Differential Revision: https://reviews.llvm.org/D49936
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338356
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 31 Jul 2018 09:26:52 +0000 (09:26 +0000)]
[AArch64] Support the .inst directive for MachO and COFF targets
Contrary to ELF, we don't add any markers that distinguish data generated
with .long from normal instructions, so the .inst directive only adds
compatibility with assembly that uses it.
Differential Revision: https://reviews.llvm.org/D49935
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338355
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Tue, 31 Jul 2018 09:04:14 +0000 (09:04 +0000)]
[ARM] Revert r337821
Re-enabling ARMCodeGenPrepare by default after failing to reproduce
the bootstrap issues that I was concerned it was causing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338354
91177308-0d34-0410-b5e6-
96231b3b80d8
Hsiangkai Wang [Tue, 31 Jul 2018 06:09:29 +0000 (06:09 +0000)]
Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338352
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Tue, 31 Jul 2018 05:29:20 +0000 (05:29 +0000)]
[InstSimplify] tests for D48828, D49981: fold extraction from std::pair
Minor touch up in the previous comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338351
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Tue, 31 Jul 2018 05:10:36 +0000 (05:10 +0000)]
[InstSimplify] tests for D48828, D49981: fold extraction from std::pair
Updated unit tests for D48828 and D49981.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338350
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Tue, 31 Jul 2018 04:37:11 +0000 (04:37 +0000)]
[NFC] Collect statistics in GuardWidening
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338348
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Caballero [Tue, 31 Jul 2018 01:57:29 +0000 (01:57 +0000)]
[VPlan] Introduce VPLoopInfo analysis.
The patch introduces loop analysis (VPLoopInfo/VPLoop) for VPBlockBases.
This analysis will be necessary to perform some H-CFG transformations and
detect and introduce regions representing a loop in the H-CFG.
Reviewers: fhahn, rengolin, mkuper, hfinkel, mssimpso
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D48816
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338346
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 31 Jul 2018 01:08:42 +0000 (01:08 +0000)]
Revert r338340 "[MS Demangler] Better demangling of template arguments."
Breaks the build with GCC, apparently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338344
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2018 00:43:54 +0000 (00:43 +0000)]
[X86] Stop accidentally running the Bonnell LEA fixup path on Goldmont.
In one place we checked X86Subtarget.slowLEA() to decide if the pass should run. But to decide what the pass should we only check isSLM. This resulted in Goldmont going down the Bonnell path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338342
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Tue, 31 Jul 2018 00:36:28 +0000 (00:36 +0000)]
[RISCV] Fixed test case failure due to r338047
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338341
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 31 Jul 2018 00:26:52 +0000 (00:26 +0000)]
[MS Demangler] Better demangling of template arguments.
This patch fixes demangling of template aliases as template-template
arguments, and also fixes function pointers and references as
not type template parameters. All of these can be properly
demangled now, so I've ported over the test
clang/test/CodeGenCXX/ms-template-callbacks.cpp. All of these
tests pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338340
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Tue, 31 Jul 2018 00:09:02 +0000 (00:09 +0000)]
[AArch64][GlobalISel] Add isel support for G_BLOCK_ADDR.
Also refactors some existing code to materialize addresses for the large code
model so it can be shared between G_GLOBAL_VALUE and G_BLOCK_ADDR.
This implements PR36390.
Differential Revision: https://reviews.llvm.org/D49903
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338337
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Tue, 31 Jul 2018 00:08:56 +0000 (00:08 +0000)]
[AArch64][GlobalISel] Make G_BLOCK_ADDR legal.
Differential Revision: https://reviews.llvm.org/D49902
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338336
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Tue, 31 Jul 2018 00:08:50 +0000 (00:08 +0000)]
[GlobalISel] Add a G_BLOCK_ADDR opcode to handle IR blockaddress constants.
Differential Revision: https://reviews.llvm.org/D49900
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338335
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 30 Jul 2018 23:22:39 +0000 (23:22 +0000)]
[MS Demangler] Add ms-return-qualifiers.test.
This is a copy of the tests from
clang/CodeGenCXX/ms-return-qualifiers.cpp converted to demangling
tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338330
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2018 23:22:00 +0000 (23:22 +0000)]
[DAGCombiner][TargetLowering] Pass a SmallVector instead of a std::vector to BuildSDIV/BuildUDIV/etc.
The vector contains the SDNodes that these functions create. The number of nodes is always a small number so we should use SmallVector to avoid a heap allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338329
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 30 Jul 2018 23:02:10 +0000 (23:02 +0000)]
[MS Demangler] Add rudimentary C++11 Support
This patch adds support for demangling r-value references, new
operators such as the ""_foo operator, lambdas, alias types,
nullptr_t, and various other C++11'isms.
There is 1 failing test remaining in this file, which appears to
be related to back-referencing. This type of problem has the
potential to get ugly so I'd rather fix it in a separate patch.
Differential Revision: https://reviews.llvm.org/D50013
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338324
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Mon, 30 Jul 2018 22:30:14 +0000 (22:30 +0000)]
[llvm-mca][docs] Add instruction flow documentation. NFC.
Summary:
This patch mostly copies the existing Instruction Flow, and stage descriptions
from the mca README. I made a few text tweaks, but no semantic changes,
and made reference to the "default pipeline." I also removed the internals
references (e.g., reference to class names and header files). I did leave the
LSUnit name around, but only as an abbreviated word for the load-store unit.
Reviewers: andreadb, courbet, RKSimon, gbedwell, filcab
Reviewed By: andreadb
Subscribers: tschuett, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D49692
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338319
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 30 Jul 2018 22:21:37 +0000 (22:21 +0000)]
[DAGCombiner] transform sub-of-shifted-signbit to add
This is exchanging a sub-of-1 with add-of-minus-1:
https://rise4fun.com/Alive/plKAH
This is another step towards improving select-of-constants codegen (see D48970).
x86 is the motivating target, and those diffs all appear to be wins. PPC and AArch64 look neutral.
I've limited this to early combining (!LegalOperations) in case a target wants to reverse it, but
I think canonicalizing to 'add' is more likely to produce further transforms because we have more
folds for 'add'.
Differential Revision: https://reviews.llvm.org/D49924
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338317
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Caballero [Mon, 30 Jul 2018 21:33:31 +0000 (21:33 +0000)]
[VPlan] Introduce VPlan-based dominator analysis.
The patch introduces dominator analysis for VPBlockBases and extend
VPlan's GraphTraits specialization with the required interfaces. Dominator
analysis will be necessary to perform some H-CFG transformations and
to introduce VPLoopInfo (LoopInfo analysis on top of the VPlan representation).
Reviewers: fhahn, rengolin, mkuper, hfinkel, mssimpso
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D48815
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338310
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandre Ganea [Mon, 30 Jul 2018 21:14:25 +0000 (21:14 +0000)]
This fixes a crash when a second pass is required for the Codeview Type merging *and* the index points outside of the table (which should lead to an error being printed).
This occurs currently until MS precompiled headers .obj is added (see D45213)
Differential Revision: https://reviews.llvm.org/D50006
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338308
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 30 Jul 2018 21:08:06 +0000 (21:08 +0000)]
[ORC] Add SerializationTraits for std::set and std::map.
Also, make SerializationTraits for pairs forward the actual pair
template type arguments to the underlying serializer. This allows, for example,
std::pair<StringRef, bool> to be passed as an argument to an RPC call expecting
a std::pair<std::string, bool>, since there is an underlying serializer from
StringRef to std::string that can be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338305
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2018 21:04:38 +0000 (21:04 +0000)]
[TargetLowering] In BuildSDIV, add the MULHS/SMUL_LOHI to the Created vector.
BuildUDIV was already correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338304
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2018 21:04:34 +0000 (21:04 +0000)]
[DAGCombiner][PowerPC][AArch64] Pass Created vector by reference to BuildSDIVPow2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338303
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Mon, 30 Jul 2018 20:38:53 +0000 (20:38 +0000)]
[InstCombine] Fold Select with binary op
Summary:
Fold
%A = icmp eq i8 %x, 0
%B = xor i8 %x, %z
%C = select i1 %A, i8 %B, i8 %y
To
%C = select i1 %A, i8 %z, i8 %y
Fixes https://bugs.llvm.org/show_bug.cgi?id=38345
Proof: https://rise4fun.com/Alive/43J
Reviewers: lebedev.ri, spatel
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49954
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338300
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2018 20:27:10 +0000 (20:27 +0000)]
Revert r338222 "[DAGCombiner] Remove unnecessary calls to AddToWorklist."
Thinking about it more it might be possible for the later nodes to be folded in getNode in such a way that the other created nodes are left dead. This can cause use counts to be incorrect on nodes that aren't dead.
So its probably safer to leave this alone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338298
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Mon, 30 Jul 2018 20:07:33 +0000 (20:07 +0000)]
Revert "[GVNHoist] Re-enable GVNHoist by default"
This reverts commit r338240 because it was causing OOMs on the UBSan
buildbot when building clang/lib/Sema/SemaChecking.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338297
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 30 Jul 2018 19:41:25 +0000 (19:41 +0000)]
Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338293
91177308-0d34-0410-b5e6-
96231b3b80d8
Manoj Gupta [Mon, 30 Jul 2018 19:33:53 +0000 (19:33 +0000)]
[Inline] Copy "null-pointer-is-valid" attribute in caller.
Summary:
Normally, inling does not happen if caller does not have
"null-pointer-is-valid"="true" attibute but callee has it.
However, alwaysinline may force callee to be inlined.
In this case, if the caller has the "null-pointer-is-valid"="true"
attribute, copy the attribute to caller.
Reviewers: efriedma, a.elovikov, lebedev.ri, jyknight
Reviewed By: efriedma
Subscribers: eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D50000
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338292
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Mon, 30 Jul 2018 18:22:18 +0000 (18:22 +0000)]
[InstSimplify] [NFC] Tests for Select with AND/OR fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338285
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Mon, 30 Jul 2018 17:45:28 +0000 (17:45 +0000)]
[MachineOutliner][AArch64] Add support for saving LR to a register
This teaches the outliner to save LR to a register rather than the stack when
possible. This allows us to avoid bumping the stack in outlined functions in
some cases. By doing this, in a later patch, we can teach the outliner to do
something like this:
f1:
...
bl OUTLINED_FUNCTION
...
f2:
...
move LR's contents to a register
bl OUTLINED_FUNCTION
move the register's contents back
instead of falling back to saving LR in both cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338278
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2018 17:34:31 +0000 (17:34 +0000)]
[X86] Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338274
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2018 17:29:57 +0000 (17:29 +0000)]
Recommit r338204 "[X86] Correct the immediate cost for 'add/sub i64 %x, 0x80000000'."
This checks in a more direct way without triggering a UBSAN error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338273
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Mon, 30 Jul 2018 17:13:25 +0000 (17:13 +0000)]
Add machine verifier to arm64-opt-remarks-lazy-bfi
Previously, I thought this was a Windows failure. Then I realized it failed on
every bot that used the verifier. This makes it use the verifier always, and
adds that pass to the pipeline checks so that it's consistent across all bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338272
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Mon, 30 Jul 2018 16:50:00 +0000 (16:50 +0000)]
[DAGCombiner] Bug 31275- Extract a shift from a constant mul or udiv if a rotate can be formed
Summary:
Attempt to extract a shrl from a udiv or a shl from a mul if this allows a rotate to be formed. This targets cases where the input to a rotate pattern was a mul or udiv by a constant and InstCombine merged one of the shifts with the op.
Patch by: sameconrad (Sam Conrad)
Reviewers: RKSimon, craig.topper, spatel, lebedev.ri, javed.absar
Reviewed By: lebedev.ri
Subscribers: efriedma, kparzysz, llvm-commits
Differential Revision: https://reviews.llvm.org/D47681
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338270
91177308-0d34-0410-b5e6-
96231b3b80d8