OSDN Git Service
David Bolvansky [Thu, 26 Apr 2018 22:31:43 +0000 (22:31 +0000)]
[SimplifyLibcalls] Replace locked IO with unlocked IO
Summary: If file stream arg is not captured and source is fopen, we could replace IO calls by unlocked IO ("_unlocked" function variants) to gain better speed,
Reviewers: efriedma, RKSimon, spatel, sanjoy, hfinkel, majnemer
Subscribers: lebedev.ri, llvm-commits
Differential Revision: https://reviews.llvm.org/D45736
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331002
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Thu, 26 Apr 2018 22:30:40 +0000 (22:30 +0000)]
[MCA] [NFC] Remove unused Index formal from ResourceManager::issueInstruction
Summary: The instruction index was never referenced in the body. Just a minor cleanup.
Reviewers: andreadb
Reviewed By: andreadb
Subscribers: javed.absar, gbedwell, llvm-commits
Differential Revision: https://reviews.llvm.org/D46142
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331001
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Thu, 26 Apr 2018 21:55:45 +0000 (21:55 +0000)]
[Docs] Escape the @ symbol, so that it appears in documentation output. [NFC]
Summary:
The '@' character is a special character in Doxygen. In a handful of cases we were not escaping this character which resulted in llvm intrinsics not being rendered properly. Specifically, the @llvm part was removed.
For example, see https://llvm.org/doxygen/classllvm_1_1AssumptionCache.html. There are a few references to '.assume' without the @llvm. prefix. This patch corrects this.
Reviewers: sanjoy
Reviewed By: sanjoy
Subscribers: llvm-commits, sanjoy
Differential Revision: https://reviews.llvm.org/D45981
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330998
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Apr 2018 21:46:01 +0000 (21:46 +0000)]
[x86] Revert r330322 (& r330323): Lowering x86 adds/addus/subs/subus intrinsics
The LLVM commit introduces a crash in LLVM's instruction selection.
I filed http://llvm.org/PR37260 with the test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330997
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 26 Apr 2018 21:41:56 +0000 (21:41 +0000)]
[InstCombine][NFC] Regenerate checks in or-xor.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330996
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 26 Apr 2018 21:13:59 +0000 (21:13 +0000)]
Fix WAsm dwarfdump.ll test on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330995
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 26 Apr 2018 21:13:09 +0000 (21:13 +0000)]
[InstCombine][NFC] Regenerate checks in and-or-not.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330994
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 26 Apr 2018 20:59:58 +0000 (20:59 +0000)]
Revert "Fix a bug that prevents global variables from having a DW_OP_deref."
This reverts commit r3309704 while investigating bot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330993
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 26 Apr 2018 20:52:28 +0000 (20:52 +0000)]
[InstCombine] Simplify Add with remainder expressions as operands.
Summary:
Simplify integer add expression X % C0 + (( X / C0 ) % C1) * C0 to
X % (C0 * C1). This is a common pattern seen in code generated by the XLA
GPU backend.
Add test cases for this new optimization.
Patch by Bixia Zheng!
Reviewers: sanjoy
Reviewed By: sanjoy
Subscribers: efriedma, craig.topper, lebedev.ri, llvm-commits, jlebar
Differential Revision: https://reviews.llvm.org/D45976
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330992
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 26 Apr 2018 20:52:27 +0000 (20:52 +0000)]
Add test cases to prepare for the optimization that simplifies Add with
remainder expressions as operands.
Summary:
Add test cases to prepare for the new optimization that Simplifies integer add
expression X % C0 + (( X / C0 ) % C1) * C0 to X % (C0 * C1).
Patch by Bixia Zheng!
Reviewers: sanjoy
Reviewed By: sanjoy
Subscribers: jlebar, llvm-commits
Differential Revision: https://reviews.llvm.org/D46017
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330991
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Tereshin [Thu, 26 Apr 2018 20:22:17 +0000 (20:22 +0000)]
[GlobalISel] Reporting rules covered as part of the InstructionSelect's debug-only printing
The main goal of this change is to make it much easier to track which
rules are actually covered by Testgen'erated regression tests.
Reviewers: aemerson, dsanders
Differential Revision: https://reviews.llvm.org/D46095
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330988
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 26 Apr 2018 20:07:17 +0000 (20:07 +0000)]
[InstCombine][NFC] add2.ll: add a few commutative checks.
Fixes some missing test coverage in InstCombineAddSub.cpp, visitAdd()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330986
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 26 Apr 2018 20:07:12 +0000 (20:07 +0000)]
[InstCombine][NFC] Autogenerate checks in add2.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330985
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 26 Apr 2018 19:55:28 +0000 (19:55 +0000)]
[mips] Accept 32-bit offsets for lb and lbu commands
`lb` and `lbu` commands accepts 16-bit signed offsets. But GAS accepts
larger offsets for these commands. If an offset does not fit in 16-bit
range, `lb` command is translated into lui/lb or lui/addu/lb series.
It's interesting that initially LLVM assembler supported this feature,
but later it was broken.
This patch restores support for 32-bit offsets. It replaces `mem_simm16`
operand for `LB` and `LBu` definitions by the new `mem_simmptr` operand.
This operand is intended to check that offset fits to the same size as
using for pointers. Later we will be able to extend this rule and
accepts 64-bit offsets when it is possible.
Some issues remain:
- The regression also affects LD, SD, LH, LHU commands. I'm going
to fix them by a separate patch.
- GAS accepts any 32-bit values as an offset. Now LLVM accepts signed
16-bit values and this patch extends the range to signed 32-bit offsets.
In other words, the following code accepted by GAS and still triggers
an error by LLVM:
```
lb $4, 0x80000004
# gas
lui a0, 0x8000
lb a0, 4(a0)
```
- In case of 64-bit pointers GAS accepts a 64-bit offset and translates
it to the li/dsll/lb series of commands. LLVM still rejects it.
Probably this feature has never been implemented in LLVM. This issue
is for a separate patch.
```
lb $4, 0x800000001
# gas
li a0, 0x8000
dsll a0, a0, 0x14
lb a0, 4(a0)
```
Differential Revision: https://reviews.llvm.org/D45020
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330983
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 26 Apr 2018 19:27:28 +0000 (19:27 +0000)]
[WebAssembly] Write DWARF data into wasm object file
- Writes ".debug_XXX" into corresponding custom sections.
- Writes relocation records into "reloc.debug_XXX" sections.
Patch by Yury Delendik!
Differential Revision: https://reviews.llvm.org/D44184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330982
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 26 Apr 2018 19:21:37 +0000 (19:21 +0000)]
DAG: Fix not legalizing vector fcanonicalizes
If an fcanoncialize was done on a vector type that was legal,
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330981
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 26 Apr 2018 19:21:32 +0000 (19:21 +0000)]
AMDGPU: Extend extract_vector_elt fneg combine to fabs
Fixes a regression in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330980
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 26 Apr 2018 19:21:26 +0000 (19:21 +0000)]
AMDGPU: Consolidate SubtargetPredicate definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330979
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 26 Apr 2018 19:15:25 +0000 (19:15 +0000)]
Specify REQUIRES: default_triple in a few tests
These were all failing when specifying LLVM_DEFAULT_TARGET_TRIPLE=''.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330977
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Thu, 26 Apr 2018 18:50:45 +0000 (18:50 +0000)]
[AArch64] Fix scavenged spill slot base when stack realignment required.
Summary:
Use the FP for scavenged spill slot accesses to prevent corruption of
the callee-save region when the SP is re-aligned.
Based on problem and patch reported by @paulwalker-arm
This is an alternative to solution proposed in D45770
Reviewers: t.p.northover, paulwalker-arm, thegameg, javed.absar
Subscribers: qcolombet, mcrosier, paulwalker-arm, kristof.beyls, rengolin, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D46063
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330976
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 26 Apr 2018 18:44:37 +0000 (18:44 +0000)]
[NFC][InstCombine] rem.ll: add a few commutative tests.
This closes a gap in missing test coverage in
isKnownToBeAPowerOfTwo() from ValueTracking.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330975
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 26 Apr 2018 18:44:32 +0000 (18:44 +0000)]
[NFC][InstCombine] Regenerate rem.ll test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330974
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Shaposhnikov [Thu, 26 Apr 2018 18:28:17 +0000 (18:28 +0000)]
[llvm-objcopy] Implement --redefine-sym option
This diff implements --redefine-sym option
for changing the name of a symbol.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D46029
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330973
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Berg [Thu, 26 Apr 2018 18:17:58 +0000 (18:17 +0000)]
augmenting description for fcmp fmf - NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330972
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 26 Apr 2018 18:17:04 +0000 (18:17 +0000)]
Fix a bug that prevents global variables from having a DW_OP_deref.
For local variables the first DW_OP_deref is consumed by turning the
location kind into a memeory location, but that only makes sense for
values that are in a register to begin with, which cannot happen for
global variables that are attached to a symbol.
rdar://problem/
39741860
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330970
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 26 Apr 2018 18:15:32 +0000 (18:15 +0000)]
[WebAssembly] Add version to object file metadata
Summary: See https://github.com/WebAssembly/tool-conventions/issues/54
Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D46069
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330969
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 26 Apr 2018 18:03:24 +0000 (18:03 +0000)]
[Tablegen] SubtargetEmitter: move the logic that prints predicates for variant scheduling classes to helper functions. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330968
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Thu, 26 Apr 2018 17:56:50 +0000 (17:56 +0000)]
[GlobalMerge] Fix a typo
now => know
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330965
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Thu, 26 Apr 2018 17:54:53 +0000 (17:54 +0000)]
Revert "Enable EliminateAvailableExternally pass for -O1"
This reverts commit r330961 because it breaks a handful of clang tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330964
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Semel [Thu, 26 Apr 2018 17:44:43 +0000 (17:44 +0000)]
[llvm-objcopy] Add --localize-symbol option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330963
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Thu, 26 Apr 2018 17:34:51 +0000 (17:34 +0000)]
Update stale comment in AsmWriter.cpp
Summary:
The old comment referred to llvm/IR/Writer.h which doesn't longer exist.
This patch replaces it with an up-to-date description of AsmWriter library.
Patch by Alex Yursha.
Reviewers: gribozavr, vlad.tsyrklevich
Reviewed By: vlad.tsyrklevich
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45895
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330962
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Thu, 26 Apr 2018 17:33:24 +0000 (17:33 +0000)]
Enable EliminateAvailableExternally pass for -O1
Summary:
Follow-up to D43690, the EliminateAvailableExternally pass currently
runs under -O0 and -O2 and up. Under -O1 we would still want to drop
available_externally symbols to reduce space without inlining having
run.
Reviewers: tejohnson
Reviewed By: tejohnson
Subscribers: mehdi_amini, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D46093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330961
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 26 Apr 2018 17:05:04 +0000 (17:05 +0000)]
[WebAssembly] objdump: Don't assume all relocations have symbols
Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D46134
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330959
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 26 Apr 2018 17:04:07 +0000 (17:04 +0000)]
[docs] provide the specific sanitizer option to detect junk-in-the-ftrunc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330958
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 26 Apr 2018 16:41:51 +0000 (16:41 +0000)]
[WebAssembly] Implement getRelocationValueString()
And use it in llvm-objdump.
Differential Revision: https://reviews.llvm.org/D46092
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330957
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 26 Apr 2018 16:22:47 +0000 (16:22 +0000)]
[mips] Fix a test case which is keeping the expensive checks bot win red (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330956
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Searles [Thu, 26 Apr 2018 16:11:19 +0000 (16:11 +0000)]
[AMDGPU][Waitcnt] As of gfx7, VMEM operations do not increment the export counter and the input registers are available in the next instruction; update the waitcnt pass to take this into account.
Differential Revision: https://reviews.llvm.org/D46067
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330954
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 26 Apr 2018 16:06:34 +0000 (16:06 +0000)]
[mips] Correct the definitions of some control instructions
Correct the definitions of ei, di, eret, deret, wait, syscall and break.
Also provide microMIPS specific aliases to match the MIPS aliases.
Additionally correct the definition of the wait instruction so that
it is present in the instruction mapping tables.
Reviewers: smaksimovic, abeserminji, atanasyan
Differential Revision: https://reviews.llvm.org/D45939
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330952
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 26 Apr 2018 16:04:44 +0000 (16:04 +0000)]
[DAGCombiner] limit ftrunc optimizations with function attribute
As noted, the attribute name is subject to change once we have
the clang side implemented, but it's clear that we need some
kind of attribute-based predication here based on the discussion
for:
rL330437
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330951
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 26 Apr 2018 15:36:15 +0000 (15:36 +0000)]
[x86] add tests to show potential opt-out of ftrunc optimization; NFC
This is another preliminary step for disabling this transform as
discussed in the post-commit thread for:
rL330437
I'm using one of the names suggested there for the attribute, but
we can fix that up as needed once the clang side of this is sorted
out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330950
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 26 Apr 2018 15:34:27 +0000 (15:34 +0000)]
[RISCV] Implement isLoadFromStackSlot and isStoreToStackSlot
This causes some slight shuffling but no meaningful codegen differences on the
corpus I used for testing, but it has a larger impact when combined with e.g.
rematerialisation. Regardless, it makes sense to report as accurate
target-specific information as possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330949
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 26 Apr 2018 15:26:29 +0000 (15:26 +0000)]
[NVPTX] Make the legalizer expand shufflevector of <2 x half>
There's no direct instruction for this, but it's trivially implemented
with two movs. Without this the code generator just dies when
encountering a shufflevector.
Differential Revision: https://reviews.llvm.org/D46116
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330948
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 26 Apr 2018 15:20:18 +0000 (15:20 +0000)]
[DAGCombiner] refactor FP->int->FP folds; NFC
As discussed in the post-review comments for rL330437,
we need to guard this fold to allow existing code to
keep working with the undefined behavior that they've
come to rely on.
That would mean duplicating more code than we already
have, so let's fix that first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330947
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Thu, 26 Apr 2018 14:50:04 +0000 (14:50 +0000)]
[SLP] Add tests for transposable binary operations
These test cases are vectorizable, but we are currently unable to vectorize
them effectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330945
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 26 Apr 2018 14:04:18 +0000 (14:04 +0000)]
[RISCV] Implement isZextFree
This returns true for 8-bit and 16-bit loads, allowing LBU/LHU to be selected
and avoiding unnecessary masks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330943
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 26 Apr 2018 14:00:35 +0000 (14:00 +0000)]
[RISCV] Add test case showing suboptimal codegen when loading unsigned char/short
Implementing isZextFree will allow lbu or lhu to be selected rather than
lb+mask and lh+mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330942
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Thu, 26 Apr 2018 13:48:33 +0000 (13:48 +0000)]
[TTI, AArch64] Add transpose shuffle kind
This patch adds a new shuffle kind useful for transposing a 2xn matrix. These
transpose shuffle masks read corresponding even- or odd-numbered vector
elements from two n-dimensional source vectors and write each result into
consecutive elements of an n-dimensional destination vector. The transpose
shuffle kind is meant to model the TRN1 and TRN2 AArch64 instructions. As such,
this patch also considers transpose shuffles in the AArch64 implementation of
getShuffleCost.
Differential Revision: https://reviews.llvm.org/D45982
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330941
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 26 Apr 2018 13:37:00 +0000 (13:37 +0000)]
[RISCV] Implement isTruncateFree
Adapted from ARM's implementation introduced in r313533 and r314280.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330940
91177308-0d34-0410-b5e6-
96231b3b80d8
Lama Saba [Thu, 26 Apr 2018 13:16:11 +0000 (13:16 +0000)]
[X86] Fix Update Kill Register in Avoid SFB Pass - Bug 37153
Differential Revision: https://reviews.llvm.org/D45823
Change-Id: Icf6f34f6babc3cb2ff5292fde003472473037a71
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330939
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 26 Apr 2018 13:15:17 +0000 (13:15 +0000)]
[RISCV] Implement isLegalICmpImmediate
I'm unable to construct a representative test case that demonstrates the
advantage, but it seems sensible to report accurate target-specific
information regardless.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330938
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 26 Apr 2018 13:00:37 +0000 (13:00 +0000)]
[RISCV] Implement isLegalAddImmediate
This causes a trivial improvement in the recently added lsr-legaladdimm.ll
test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330937
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 26 Apr 2018 12:57:29 +0000 (12:57 +0000)]
[RISCV] Add test/CodeGen/RISCV/lsr-legaladdimm.ll
Add a test case which will show a codegen difference upon the implementation
of a target-specific isLegalAddImmediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330936
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 26 Apr 2018 12:56:26 +0000 (12:56 +0000)]
[Tablegen] Simplify code in CodeGenSchedule. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330935
91177308-0d34-0410-b5e6-
96231b3b80d8
Sander de Smalen [Thu, 26 Apr 2018 12:54:42 +0000 (12:54 +0000)]
[AArch64][SVE] Enable DiagnosticPredicates for SVE LD1 instructions.
This patch extends the PredicateMethod of AsmOperands used in SVE's
LD1 instructions with a DiagnosticPredicate. This makes them 'context
sensitive' to the operand that has been parsed and tells the user to
use the right register (with expected shift/extend), rather than telling
the immediate is out of range when it actually parsed a register.
Patch [2/2] in a series to improve assembler diagnostics for SVE:
- Patch [1/2]: https://reviews.llvm.org/D45879
- Patch [2/2]: https://reviews.llvm.org/D45880
Reviewers: olista01, stoklund, craig.topper, mcrosier, rengolin, echristo, fhahn, SjoerdMeijer, evandro, javed.absar
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D45880
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330934
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 26 Apr 2018 12:30:16 +0000 (12:30 +0000)]
[NVPTX] Deduplicate code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330933
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 26 Apr 2018 12:13:48 +0000 (12:13 +0000)]
[RISCV] Implement isLegalAddressingMode for RISC-V
This has no impact on codegen for the current RISC-V unit tests or my small
benchmark set and very minor changes in a few programs in the GCC torture
suite. Based on this, I haven't been able to produce a representative test
program that demonstrates a benefit from isLegalAddressingMode. I'm committing
the patch anyway, on the basis that presenting accurate information to the
target-independent code is preferable to relying on incorrect generic
assumptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330932
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 26 Apr 2018 10:26:17 +0000 (10:26 +0000)]
[LoopInterchange] Ignore debug intrinsics during legality checks.
Reviewers: aprantl, mcrosier, karthikthecool
Reviewed By: aprantl
Subscribers: mattd, vsk, #debug-info, llvm-commits
Differential Revision: https://reviews.llvm.org/D45379
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330931
91177308-0d34-0410-b5e6-
96231b3b80d8
Sander de Smalen [Thu, 26 Apr 2018 09:24:45 +0000 (09:24 +0000)]
[AsmMatcher] Extend PredicateMethod with optional DiagnosticPredicate
An optional, light-weight and backward-compatible mechanism to allow
specifying that a diagnostic _only_ applies to a partial mismatch (NearMiss),
rather than a full mismatch.
Patch [1/2] in a series to improve assembler diagnostics for SVE.
- Patch [1/2]: https://reviews.llvm.org/D45879
- Patch [2/2]: https://reviews.llvm.org/D45880
Reviewers: olista01, stoklund, craig.topper, mcrosier, rengolin, echristo, fhahn, SjoerdMeijer, evandro, javed.absar
Reviewed By: olista01
Differential Revision: https://reviews.llvm.org/D45879
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330930
91177308-0d34-0410-b5e6-
96231b3b80d8
Sander de Smalen [Thu, 26 Apr 2018 08:43:22 +0000 (08:43 +0000)]
[AArch64][SVE] Asm: Negative tests for all LD1 gather (scalar+vector) load instructions.
Patch [3/3] in series to add support for SVE's gather load instructions
that use scalar+vector addressing modes:
- Patch [1/3]: https://reviews.llvm.org/D45951
- Patch [2/3]: https://reviews.llvm.org/D46023
- Patch [3/3]: https://reviews.llvm.org/D45958
Reviewers: fhahn, rengolin, samparker, SjoerdMeijer, t.p.northover, echristo, evandro, javed.absar
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D45958
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330929
91177308-0d34-0410-b5e6-
96231b3b80d8
Sander de Smalen [Thu, 26 Apr 2018 08:19:53 +0000 (08:19 +0000)]
[AArch64][SVE] Asm: Support for gather LD1/LDFF1 (scalar + vector) load instructions.
Patch [2/3] in series to add support for SVE's gather load instructions
that use scalar+vector addressing modes:
- Patch [1/3]: https://reviews.llvm.org/D45951
- Patch [2/3]: https://reviews.llvm.org/D46023
- Patch [3/3]: https://reviews.llvm.org/D45958
Reviewers: fhahn, rengolin, samparker, SjoerdMeijer, t.p.northover, echristo, evandro, javed.absar
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D46023
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330928
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Thu, 26 Apr 2018 06:04:46 +0000 (06:04 +0000)]
[cmake] Make linker detection take flags into account
LLVM might be compiled using a toolchain file which controls the linker
to use via flags (e.g. `-B` or `-fuse-ld=`). Take these flags into
account for linker detection. We can also correct the detection by
manually passing LLVM_USE_LINKER, of course, but it seems more
convenient to have the detection take flags into account.
Differential Revision: https://reviews.llvm.org/D45464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330924
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 26 Apr 2018 05:07:40 +0000 (05:07 +0000)]
[X86] Print 'tbyte ptr' instead of 'xword ptr' for f80mem in Intel syntax.
This matches objdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330922
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 26 Apr 2018 03:53:39 +0000 (03:53 +0000)]
[X86] Remove alignment restriction on loading folding of pcmp[ei]str* during isel too.
This is a follow up to the changes in r330896 which enabled folding after isel during peephole and register allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330897
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Apr 2018 03:17:25 +0000 (03:17 +0000)]
[x86] Allow folding unaligned memory operands into pcmp[ei]str*
instructions.
These have special permission according to the x86 manual to read
unaligned memory, and this folding is done by ICC and GCC as well.
This corrects one of the issues identified in PR37246.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330896
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 26 Apr 2018 03:12:17 +0000 (03:12 +0000)]
[x86] NFC: Add tests for idiomatic usage patterns of SSE4.2 string
comparison instructions (pcmp[ei]stri*).
These will help show improvements from fixes to PR37246.
I've not really covered the mask forms of this intrinsic as I don't have
as good of an intuition about the likely usage patterns there. Happy for
someone to extend this with tests covering the mask form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330895
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Thu, 26 Apr 2018 02:07:40 +0000 (02:07 +0000)]
Revert "[SCEV] Make computeExitLimit more simple and more powerful"
This reverts commit
023c8be90980e0180766196cba86f81608b35d38.
This patch triggers miscompile of zlib on PowerPC platform. Most likely it is
caused by some pre-backend PPC-specific pass, but we don't clearly know the
reason yet. So we temporally revert this patch with intention to return it
once the problem is resolved. See bug 37229 for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330893
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 25 Apr 2018 23:34:15 +0000 (23:34 +0000)]
[codeview] Ignore .cv_loc directives at the end of a function
If no data or instructions are emitted after a location directive, we
should clear the cv_loc when we change sections, or it will be emitted
at the beginning of the next section. This violates our invariant that
all .cv_loc directives belong to the same section. Add clearer
assertions for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330884
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 25 Apr 2018 21:50:09 +0000 (21:50 +0000)]
[ADT] Make filter_iterator support bidirectional iteration
This makes it possible to reverse a filtered range. For example, here's
a way to visit memory accesses in a BasicBlock in reverse order:
auto MemInsts = reverse(make_filter_range(BB, [](Instruction &I) {
return isa<StoreInst>(&I) || isa<LoadInst>(&I);
}));
for (auto &MI : MemInsts)
...
To implement this functionality, I factored out forward iteration
functionality into filter_iterator_base, and added a specialization of
filter_iterator_impl which supports bidirectional iteration. Thanks to
Tim Shen, Zachary Turner, and others for suggesting this design and
providing feedback! This version of the patch supersedes the original
(https://reviews.llvm.org/D45792).
This was motivated by a problem we encountered in D45657: we'd like to
visit the non-debug-info instructions in a BasicBlock in reverse order.
Testing: check-llvm, check-clang
Differential Revision: https://reviews.llvm.org/D45853
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330875
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 25 Apr 2018 20:59:16 +0000 (20:59 +0000)]
[CostModel][X86] Remove hard coded SDIV/UDIV vector costs
Algorithmically compute the 'x20' SDIV/UDIV vector costs - this is necessary for PR36550 when DIV costs will be driven from the scheduler models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330870
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 25 Apr 2018 20:16:24 +0000 (20:16 +0000)]
Fix PluginsTests failure on Windows buildbots by enabling it everywhere
lit is picking up a stale executable in the unittests tree, which is
failing on Windows.
To simplify the CMake and avoid problems like this in the future, now we
always compile the test, but the test exits successfully when plugins
are not enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330867
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 25 Apr 2018 20:02:53 +0000 (20:02 +0000)]
AMDGPU/R600: Move int_r600_store_stream_output to the public intrinsic file
Summary:
The TableGen'd GlobalISel instruction selector assumes all intrinsics are in
the public Intrinsic:: namespace.
Reviewers: jvesely, nhaehnle
Reviewed By: jvesely, nhaehnle
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D45989
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330866
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Searles [Wed, 25 Apr 2018 19:21:26 +0000 (19:21 +0000)]
[AMDGPU] Waitcnt pass: add debug options
- Add "amdgpu-waitcnt-forcezero" to force all waitcnt instrs to be emitted as s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
- Add debug counters to control force emit of s_waitcnt instrs; debug counters:
si-insert-waitcnts-forceexp: force emit s_waitcnt expcnt(0) instrs
si-insert-waitcnts-forcevm: force emit s_waitcnt lgkmcnt(0) instrs
si-insert-waitcnts-forcelgkm: force emit s_waitcnt vmcnt(0) instrs
- Add some debug statements
Note that a variant of this patch was previously committed/reverted.
Differential Revision: https://reviews.llvm.org/D45888
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330862
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Wed, 25 Apr 2018 18:58:53 +0000 (18:58 +0000)]
[SimplifyLibcalls] Atoi, strtol replacements
Reviewers: spatel, lebedev.ri, xbolva00, efriedma
Reviewed By: xbolva00, efriedma
Subscribers: efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D45418
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330860
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Wed, 25 Apr 2018 18:58:06 +0000 (18:58 +0000)]
[MIR] Add support for debug metadata for fixed stack objects
Debug var, expr and loc were only supported for non-fixed stack objects.
This patch adds the following fields to the "fixedStack:" entries, and
renames the ones from "stack:" to:
* debug-info-variable
* debug-info-expression
* debug-info-location
Differential Revision: https://reviews.llvm.org/D46032
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330859
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 25 Apr 2018 18:34:00 +0000 (18:34 +0000)]
IWYU llvm-config.h for LLVM_VERSION_STRING
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330856
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 25 Apr 2018 18:24:08 +0000 (18:24 +0000)]
[WebAssebmly] Add Module name to WasmSymbol
Imports in a wasm module can have custom module name. This change
adds the module name to the WasmSymbol structure so that the linker
can preserve this module name.
This is needed to fix: https://bugs.llvm.org/show_bug.cgi?id=37168
Differential Revision: https://reviews.llvm.org/D45797
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330854
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 25 Apr 2018 18:06:23 +0000 (18:06 +0000)]
Rename sancov.cc to sancov.cpp
LLVM uses cpp as its C++ file ending.
https://reviews.llvm.org/D46068
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330853
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 25 Apr 2018 18:03:31 +0000 (18:03 +0000)]
[CostModel][X86] Add div/rem tests for non-uniform constant divisors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330852
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 25 Apr 2018 17:35:03 +0000 (17:35 +0000)]
[X86] Form MUL_IMM for multiplies with 3/5/9 to encourage LEA formation over load folding.
Previously we only formed MUL_IMM when we split a constant. This blocked load folding on those cases. We should also form MUL_IMM for 3/5/9 to favor LEA over load folding.
Differential Revision: https://reviews.llvm.org/D46040
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330850
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 25 Apr 2018 17:30:00 +0000 (17:30 +0000)]
Revert r330755 "[lit] Report line number for failed RUN command"
It is causing many tests to fail on Windows buildbots:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/10211
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330848
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Wed, 25 Apr 2018 17:25:29 +0000 (17:25 +0000)]
[RISCV] Allow call pseudoinstruction to be used to call a function name that coincides with a register name
Previously `call zero`, `call f0` etc would fail. This leads to compilation
failures if building programs that define functions with those names and using
-save-temps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330846
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 25 Apr 2018 17:24:41 +0000 (17:24 +0000)]
Don't list a source file twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330845
91177308-0d34-0410-b5e6-
96231b3b80d8
Taewook Oh [Wed, 25 Apr 2018 17:19:21 +0000 (17:19 +0000)]
[ICP] Do not attempt type matching for variable length arguments.
Summary:
When performing indirect call promotion, current implementation inspects "all" parameters of the callsite and attemps to match with the formal argument type of the callee function. However, it is not possible to find the type for variable length arguments, and the compiler crashes when it attemps to match the type for variable lenght argument.
It seems that the bug is introduced with D40658. Prior to that, the type matching is performed only for the parameters whose ID is less than callee->getFunctionNumParams(). The attached test case will crash without the patch.
Reviewers: mssimpso, davidxl, davide
Reviewed By: mssimpso
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46026
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330844
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 25 Apr 2018 17:07:46 +0000 (17:07 +0000)]
Rename Attributes.gen, Intrinsics.gen to Attributes.inc, Intrinsics.inc
Virtually all other tablegen outputs are called .inc, not .gen, so rename these two too for consistency.
No behavior change.
https://reviews.llvm.org/D46058
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330843
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 25 Apr 2018 16:34:01 +0000 (16:34 +0000)]
[InstCombine] clean up foldSelectICmpAnd(); NFC
As discussed in D45862, we want to delete parts of
this code because it can create more instructions
than it removes. But we also want to preserve some
folds that are winners, so tidy up what's here to
make splitting the good from bad a bit easier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330841
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 25 Apr 2018 15:59:23 +0000 (15:59 +0000)]
[InstCombine] add tests for select to logic folds; NFC
As discussed in D45862, we want these folds sometimes
because they're good improvements.
But as we can see here, the current logic doesn't
check uses and doesn't produce optimal code in all
cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330837
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 25 Apr 2018 15:22:03 +0000 (15:22 +0000)]
[CostModel][X86] Recursive call for cost of imul for packed v16i16 constant shift left.
Don't just assume cost = 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330834
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Wed, 25 Apr 2018 14:43:59 +0000 (14:43 +0000)]
[AArch64][GlobalISel] Implement selection for the llvm.trap intrinsic.
rdar://
38674040
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330831
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Walker [Wed, 25 Apr 2018 14:42:44 +0000 (14:42 +0000)]
Fix typo in static_assert for size of LoadSDNodeBitfields.
Reviewers: fhahn, jlebar, delena, RKSimon
Reviewed By: fhahn, jlebar
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330830
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Wed, 25 Apr 2018 14:39:16 +0000 (14:39 +0000)]
[llvm-mca] Make ViewOptions static. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330829
91177308-0d34-0410-b5e6-
96231b3b80d8
Shiva Chen [Wed, 25 Apr 2018 14:19:12 +0000 (14:19 +0000)]
[RISCV] Expand function call to "call" pseudoinstruction
To do this:
1. Change GlobalAddress SDNode to TargetGlobalAddress to avoid legalizer
split the symbol.
2. Change ExternalSymbol SDNode to TargetExternalSymbol to avoid legalizer
split the symbol.
3. Let PseudoCALL match direct call with target operand TargetGlobalAddress
and TargetExternalSymbol.
Differential Revision: https://reviews.llvm.org/D44885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330827
91177308-0d34-0410-b5e6-
96231b3b80d8
Shiva Chen [Wed, 25 Apr 2018 14:18:55 +0000 (14:18 +0000)]
[RISCV] Support "call" pseudoinstruction in the MC layer
To do this:
1. Add PseudoCALLIndirct to match indirect function call.
2. Add PseudoCALL to support parsing and print pseudo `call` in assembly
3. Expand PseudoCALL to the following form with R_RISCV_CALL relocation type
while encoding:
auipc ra, func
jalr ra, ra, 0
If we expand PseudoCALL before emitting assembly, we will see auipc and jalr
pair when compile with -S. It's hard for assembly parser to parsing this
pair and identify it's semantic is function call and then insert R_RISCV_CALL
relocation type. Although we could insert R_RISCV_PCREL_HI20 and
R_RISCV_PCREL_LO12_I relocation types instead of R_RISCV_CALL.
Due to RISCV relocation design, auipc and jalr pair only can relax to jal with
R_RISCV_CALL + R_RISCV_RELAX relocation types.
We expand PseudoCALL as late as encoding(RISCVMCCodeEmitter) instead of before
emitting assembly(RISCVAsmPrinter) because we want to preserve call
pseudoinstruction in assembly code. It's more readable and assembly parser
could identify call assembly and insert R_RISCV_CALL relocation type.
Differential Revision: https://reviews.llvm.org/D45859
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330826
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 25 Apr 2018 14:12:57 +0000 (14:12 +0000)]
[mips] Teach the delay slot filler to transform 'jal' for microMIPS
ISel is currently picking 'JAL' over 'JAL_MM' for calling a function when
targeting microMIPS. A later patch will correct this behaviour.
This patch extends the mechanism for transforming instructions into their short
delay to recognise 'JAL_MM' for transforming into 'JALS_MM'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330825
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 25 Apr 2018 13:19:04 +0000 (13:19 +0000)]
[llvm-mca][X86] Updated fma3 tests after rL330820
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330822
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 25 Apr 2018 13:07:58 +0000 (13:07 +0000)]
[X86] Split WriteFMA into XMM, Scalar and YMM/ZMM scheduler classes
This removes all the FMA InstRW overrides.
If we ever get PR36924, then we can remove many of these declarations from models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330820
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Wed, 25 Apr 2018 12:48:23 +0000 (12:48 +0000)]
[X86][AArch64][NFC] Finish adding 'bad' tests for masked merge unfolding with constants.
I have initially committed basic tests in, rL330771,
but then quickly discovered that there are a few more
interesting patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330819
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Timofeev [Wed, 25 Apr 2018 12:32:46 +0000 (12:32 +0000)]
[AMDGPU] Revert
b0efc4fd6 (https://reviews.llvm.org/D40556)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330818
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Buella [Wed, 25 Apr 2018 12:15:34 +0000 (12:15 +0000)]
Avoid a warning on pointer casting, NFC
Reviewers: philip.pfaffe
Reviewed By: philip.pfaffe
Differential Revision: https://reviews.llvm.org/D46012
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330817
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 25 Apr 2018 11:33:14 +0000 (11:33 +0000)]
[llvm-mca] Add a new option category for views.
With this patch, options to add/tweak views are all grouped together in the
-help output.
The new "View Options" category looks like this:
```
View Options:
-dispatch-stats - Print dispatch statistics
-instruction-info - Print the instruction info view
-instruction-tables - Print instruction tables
-register-file-stats - Print register file statistics
-resource-pressure - Print the resource pressure view
-retire-stats - Print retire control unit statistics
-scheduler-stats - Print scheduler statistics
-timeline - Print the timeline view
-timeline-max-cycles=<uint> - Maximum number of cycles in the timeline view. Defaults to 80 cycles
-timeline-max-iterations=<uint> - Maximum number of iterations to print in timeline view
```
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330816
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Bedwell [Wed, 25 Apr 2018 11:20:42 +0000 (11:20 +0000)]
[UpdateTestChecks] Change update_mca_test_checks.py file mode to match the other scripts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330815
91177308-0d34-0410-b5e6-
96231b3b80d8