OSDN Git Service

android-x86/external-llvm.git
5 years ago[utils] Ensure that update_mca_test_checks.py writes prefixes in alphabetical order
Greg Bedwell [Thu, 4 Oct 2018 14:42:19 +0000 (14:42 +0000)]
[utils] Ensure that update_mca_test_checks.py writes prefixes in alphabetical order

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

5 years ago[utils] simple refactor in update_mca_test_checks.py to make intent more readable
Greg Bedwell [Thu, 4 Oct 2018 14:42:06 +0000 (14:42 +0000)]
[utils] simple refactor in update_mca_test_checks.py to make intent more readable

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

5 years ago[RISCV] Remove overzealous is64Bit checks
Alex Bradbury [Thu, 4 Oct 2018 14:30:03 +0000 (14:30 +0000)]
[RISCV] Remove overzealous is64Bit checks

lowerGlobalAddress, lowerBlockAddress, and insertIndirectBranch contain
overzealous checks for is64Bit. These functions are all safe as-implemented
for RV64.

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

5 years ago[X86] Set correct MMO offset on scalarized load pieces
David Greene [Thu, 4 Oct 2018 14:07:59 +0000 (14:07 +0000)]
[X86] Set correct MMO offset on scalarized load pieces

When scalarizing a load, be sure to update the offset in the
MachineMemOperand for each scalar load.

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

5 years ago[llvm-mca][x86] Add tests demonstrating ReadAfterLd delay
Simon Pilgrim [Thu, 4 Oct 2018 13:05:42 +0000 (13:05 +0000)]
[llvm-mca][x86] Add tests demonstrating ReadAfterLd delay

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

5 years ago[PassTimingInfo] cleanup on TimingData's Timer handling
Fedor Sergeev [Thu, 4 Oct 2018 12:49:57 +0000 (12:49 +0000)]
[PassTimingInfo] cleanup on TimingData's Timer handling

Replacing Timer* with unique_ptr<Timer> in a pass-to-timer map.
That allows to get rid of unpretty raw deletes in PassTimingInfo destructor.
Strictly cleanup, not intended to change any visible behavior.

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

5 years ago[llvm-exegesis][NFC] Improve parsing of the YAML files
Guillaume Chatelet [Thu, 4 Oct 2018 12:33:46 +0000 (12:33 +0000)]
[llvm-exegesis][NFC] Improve parsing of the YAML files

Summary: sscanf turns out to be slow for reading floating points.

Reviewers: courbet

Subscribers: tschuett, llvm-commits, RKSimon

Differential Revision: https://reviews.llvm.org/D52866

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

5 years ago[doc] Update the programmer's manual about SmallSet's iterator
Kristof Umann [Thu, 4 Oct 2018 12:33:33 +0000 (12:33 +0000)]
[doc] Update the programmer's manual about SmallSet's iterator

Since rL337818, you can now iterate the SmallSet.

Differential Revision: https://reviews.llvm.org/D52828

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

5 years ago[llvm-mca] Check for inconsistencies when constructing instruction descriptors.
Andrea Di Biagio [Thu, 4 Oct 2018 10:36:49 +0000 (10:36 +0000)]
[llvm-mca] Check for inconsistencies when constructing instruction descriptors.

This should help with catching inconsistent definitions of instructions with
zero opcodes, which also declare to consume scheduler/pipeline resources.

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

5 years agoFix MSVC "not all control paths return a value" warning. NFCI.
Simon Pilgrim [Thu, 4 Oct 2018 10:25:52 +0000 (10:25 +0000)]
Fix MSVC "not all control paths return a value" warning. NFCI.

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

5 years ago[RISCV][NFC] Remove dead CHECK lines from vararg.ll test
Alex Bradbury [Thu, 4 Oct 2018 07:35:52 +0000 (07:35 +0000)]
[RISCV][NFC] Remove dead CHECK lines from vararg.ll test

The RISCV32 check prefix is no longer used so these lines are dead.

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

5 years ago[RISCV] Bugfix for floats passed on the stack with the ILP32 ABI on RV32F
Alex Bradbury [Thu, 4 Oct 2018 07:28:49 +0000 (07:28 +0000)]
[RISCV] Bugfix for floats passed on the stack with the ILP32 ABI on RV32F

f32 values passed on the stack would previously cause an assertion in
unpackFromMemLoc.. This would only trigger in the presence of the F extension
making f32 a legal type. Otherwise the f32 would be legalized.

This patch fixes that by keeping LocVT=f32 when a float is passed on the
stack. It also adds test coverage for this case, and tests that also
demonstrate lw/sw/flw/fsw will be selected when most profitable. i.e. there is
no unnecessary i32<->f32 conversion in registers.

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

5 years ago[llvm-exegesis][NFC] Test sched class names only in !NDEBUG mode.
Clement Courbet [Thu, 4 Oct 2018 07:07:16 +0000 (07:07 +0000)]
[llvm-exegesis][NFC] Test sched class names only in !NDEBUG mode.

Sched classes have no names in NDEBUG.

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

5 years ago[X86] Merge matchANDXORWithAllOnesAsANDNP into combineANDXORWithAllOnesIntoANDNP...
Craig Topper [Thu, 4 Oct 2018 06:13:27 +0000 (06:13 +0000)]
[X86] Merge matchANDXORWithAllOnesAsANDNP into combineANDXORWithAllOnesIntoANDNP. NFCI

It's the only caller and the logic pretty easy to combine.

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

5 years ago[RISCV][NFC] Fix naming of RISCVISelLowering::{LowerRETURNADDR,LowerFRAMEADDR}
Alex Bradbury [Thu, 4 Oct 2018 05:27:50 +0000 (05:27 +0000)]
[RISCV][NFC] Fix naming of RISCVISelLowering::{LowerRETURNADDR,LowerFRAMEADDR}

Rename to lowerRETURNADDR, lowerFRAMEADDR in order to be consistent with the
LLVM coding style and the other functions in this file.

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

5 years ago[llvm-exegesis] Unbreak analysis-uops-variant.test introduced in D52825
Fangrui Song [Thu, 4 Oct 2018 03:32:47 +0000 (03:32 +0000)]
[llvm-exegesis] Unbreak analysis-uops-variant.test introduced in D52825

A `defined(NDEBUG) && !defined(LLVM_ENABLE_DUMP)` build does not call
writeEscaped and there will be no `SBWriteZeroLatency` in the output.

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

5 years ago[LegalizeIntegerTypes] Fix typo in comment. NFC
Craig Topper [Thu, 4 Oct 2018 02:40:35 +0000 (02:40 +0000)]
[LegalizeIntegerTypes] Fix typo in comment. NFC

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

5 years ago[WebAssembly] Add WebAssembly to LLVM_ALL_TARGETS
Derek Schuff [Wed, 3 Oct 2018 23:56:52 +0000 (23:56 +0000)]
[WebAssembly] Add WebAssembly to LLVM_ALL_TARGETS

Summary:
After fixing memory leaks in rL343362 and rL343733 the sanitizer builds are
clean and we should be good to build by default again.

Differential Revision: https://reviews.llvm.org/D52850

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

5 years ago[llvm-nm] Print an explicit "no symbols" message when an object file has no symbols
Jordan Rupprecht [Wed, 3 Oct 2018 23:39:49 +0000 (23:39 +0000)]
[llvm-nm] Print an explicit "no symbols" message when an object file has no symbols

Summary:
GNU nm (and other nm implementations, such as "go tool nm") prints an explicit "no symbols" message when an object file has no symbols. Currently llvm-nm just doesn't print anything. Adding an explicit "no symbols" message will allow llvm-nm to be used in place of nm: some scripts and build processes use `nm <file> | grep "no symbols"` as a test to see if a file has no symbols. It will also be more familiar to anyone used to nm.

That said, the format implemented here is slightly different, in that it doesn't print the tool name in the message (which IMHO is not useful to include).

Demo:
```
$ for nm in nm bin/llvm-nm ; do echo "nm implementation: $nm"; $nm /tmp/foo{1,2}.o; echo; done
nm implementation: nm

/tmp/foo1.o:
nm: /tmp/foo1.o: no symbols

/tmp/foo2.o:
0000000000000000 T foo2

nm implementation: bin/llvm-nm

/tmp/foo1.o:
no symbols

/tmp/foo2.o:
0000000000000000 T foo2
```

Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D52810

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

5 years ago[RISCV] Handle redundant SplitF64+BuildPairF64 pairs in a DAGCombine
Alex Bradbury [Wed, 3 Oct 2018 23:30:16 +0000 (23:30 +0000)]
[RISCV] Handle redundant SplitF64+BuildPairF64 pairs in a DAGCombine

r343712 performed this optimisation during instruction selection. As Eli
Friedman pointed out in post-commit review, implementing this as a DAGCombine
might allow opportunities for further optimisations.

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

5 years ago[WebAssembly] Bitselect intrinsic and instruction
Thomas Lively [Wed, 3 Oct 2018 23:02:23 +0000 (23:02 +0000)]
[WebAssembly] Bitselect intrinsic and instruction

Summary: Depends on D52755.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D52805

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

5 years ago[RISCV][NFC] Refactor LocVT<->ValVT converstion in RISCVISelLowering
Alex Bradbury [Wed, 3 Oct 2018 22:53:25 +0000 (22:53 +0000)]
[RISCV][NFC] Refactor LocVT<->ValVT converstion in RISCVISelLowering

There was some duplicated logic for using the LocInfo of a CCValAssign in
order to convert from the ValVT to LocVT or vice versa. Resolve this by
factoring out convertLocVTFromValVT from unpackFromRegLoc. Also rename
packIntoRegLoc to the more appropriate convertValVTToLocVT and call these
helper functions consistently.

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

5 years ago[WebAssembly] Refactor WasmSignature and use it for MCSymbolWasm
Derek Schuff [Wed, 3 Oct 2018 22:22:48 +0000 (22:22 +0000)]
[WebAssembly] Refactor WasmSignature and use it for MCSymbolWasm

MCContext does not destroy MCSymbols on shutdown. So, rather than putting
SmallVectors (which may heap-allocate) inside MCSymbolWasm, use unowned pointer
to a WasmSignature instead. The signatures are now owned by the AsmPrinter.
Also uses WasmSignature instead of param and result vectors in TargetStreamer,
and leaves some TODOs for further simplification.

 Differential Revision: https://reviews.llvm.org/D52580

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

5 years ago[machineverifier] Detect PHI's that are preceeded by non-PHI's
Daniel Sanders [Wed, 3 Oct 2018 22:05:31 +0000 (22:05 +0000)]
[machineverifier] Detect PHI's that are preceeded by non-PHI's

If present, PHI nodes must appear before non-PHI nodes in a basic block. The
register allocator relies on this and will fail to eliminate PHI's that do not
meet this requirement.

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

5 years ago[mips] Remove -allow-deprecated-dag-overlap flag from tests. NFC
Simon Atanasyan [Wed, 3 Oct 2018 22:02:23 +0000 (22:02 +0000)]
[mips] Remove -allow-deprecated-dag-overlap flag from tests. NFC

Fix DAG check statements in MIPS codegen tests to remove
-allow-deprecated-dag-overlap flag.

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

5 years ago[InstCombine] allow SimplifyDemandedVectorElts to work with FP binops
Sanjay Patel [Wed, 3 Oct 2018 21:44:59 +0000 (21:44 +0000)]
[InstCombine] allow SimplifyDemandedVectorElts to work with FP binops

We're a long way from D50992 and D51553, but this is where we have to start.
We weren't back-propagating undefs into binop constant values for anything but
add/sub/mul/and/or/xor.

This is likely because we have to be careful about not introducing UB/poison
with div/rem/shift. But I suspect we already are getting the poison part wrong
for add/sub/mul (although it may not be possible to expose the bug currently
because we use SimplifyDemandedVectorElts from a limited set of opcodes).
See the discussion/implementation from D48987 and D49047.

This patch just enables functionality for FP ops because those do not have
UB/poison potential.

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

5 years agoMake meanings of variables clearer in action table generation (NFC)
Heejin Ahn [Wed, 3 Oct 2018 21:30:15 +0000 (21:30 +0000)]
Make meanings of variables clearer in action table generation (NFC)

Summary:

Reviewers: kristina, zhmu, dschuff, rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D52680

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

5 years ago[X86] Stop promoting vector ISD::SELECT to vXi64.
Craig Topper [Wed, 3 Oct 2018 21:10:29 +0000 (21:10 +0000)]
[X86] Stop promoting vector ISD::SELECT to vXi64.

The additional patterns needed for this aren't overwhelming and introducing extra bitcasts during lowering limits our ability to do computeNumSignBits. Not that I have a good example of that for select. I'm just becoming increasingly grumpy about promotion of AND/OR/XOR. SELECT was just a lot easier to fix.

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

5 years ago[InstCombine] add tests for binop undef-into-constant propagation; NFC
Sanjay Patel [Wed, 3 Oct 2018 20:35:25 +0000 (20:35 +0000)]
[InstCombine] add tests for binop undef-into-constant propagation; NFC

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

5 years ago[X86] Add CMOV_VK2/VK4 pseudos and remove lowering code that turned v2i1/v4i1 SELECT...
Craig Topper [Wed, 3 Oct 2018 20:28:43 +0000 (20:28 +0000)]
[X86] Add CMOV_VK2/VK4 pseudos and remove lowering code that turned v2i1/v4i1 SELECT into v8i1.

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

5 years ago[RISCV][NFCI] Handle redundant splitf64+buildpairf64 pairs during instruction selection
Alex Bradbury [Wed, 3 Oct 2018 20:12:10 +0000 (20:12 +0000)]
[RISCV][NFCI] Handle redundant splitf64+buildpairf64 pairs during instruction selection

Although we can't write a tablegen pattern to remove redundant
splitf64+buildf64 pairs due to the multiple return values, we can handle it
with some C++ selection code. This is simpler than removing them after
instruction selection through RISCVDAGToDAGISel::PostprocessISelDAG, as was
done previously.

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

5 years ago[X86] Add CMOV pseudos for VR128X and VR256X register classes. Use them when AVX512VL...
Craig Topper [Wed, 3 Oct 2018 19:48:26 +0000 (19:48 +0000)]
[X86] Add CMOV pseudos for VR128X and VR256X register classes. Use them when AVX512VL is enabled.

This allows the phi nodes to be generated with the correct register class when expanded.

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

5 years ago[X86] Don't break CMOV pseudo instructions down by type. Just by register class.
Craig Topper [Wed, 3 Oct 2018 19:48:23 +0000 (19:48 +0000)]
[X86] Don't break CMOV pseudo instructions down by type. Just by register class.

The register class is all that's important for the pseudo instructions. We can use patterns to handle the different types.

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

5 years ago[X86] PUSH/POP 'mem-mem' instructions are not RMW - these are 2 different addresses
Simon Pilgrim [Wed, 3 Oct 2018 19:02:38 +0000 (19:02 +0000)]
[X86] PUSH/POP 'mem-mem' instructions are not RMW - these are 2 different addresses

This patch adds a 'WriteCopy' [WriteLoad, WriteStore] schedule sequence instead to better model the behaviour

Found by @andreadb during llvm-mca testing on btver2 which was crashing on "zero uop" WriteRMW only instructions

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

5 years agoEmit template type and value parameter DIEs for template variables.
Matthew Voss [Wed, 3 Oct 2018 18:44:53 +0000 (18:44 +0000)]
Emit template type and value parameter DIEs for template variables.

Summary:
Ensure the TemplateParam attribute of the DIGlobalVariable node is translated into the proper DIEs.

Resolves https://bugs.llvm.org/show_bug.cgi?id=22119

Reviewers: dblaikie, probinson, aprantl, JDevlieghere, clayborg, whitequark, deadalnix

Reviewed By: dblaikie

Subscribers: llvm-commits

Tags: #debug-info

Differential Revision: https://reviews.llvm.org/D52057

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

5 years ago[X86] Move Atomic binops to use WriteALURMW schedule class
Simon Pilgrim [Wed, 3 Oct 2018 18:38:28 +0000 (18:38 +0000)]
[X86] Move Atomic binops to use WriteALURMW schedule class

These were being tagged as <WriteALULd, WriteRMW> instead of properly using the RMW sequence

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

5 years ago[X86][Btver2] Fix MMX PSHUFB schedule
Simon Pilgrim [Wed, 3 Oct 2018 18:18:50 +0000 (18:18 +0000)]
[X86][Btver2] Fix MMX PSHUFB schedule

Match AMD Fam16h SOG + llvm-exegesis tests

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

5 years ago[X86] Move Atomic CMPXCHG to WriteCMPXCHGRMW schedule class
Simon Pilgrim [Wed, 3 Oct 2018 18:05:01 +0000 (18:05 +0000)]
[X86] Move Atomic CMPXCHG to WriteCMPXCHGRMW schedule class

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

5 years ago[X86] Add SkylakeClient uops counter - same as the other Intel models.
Simon Pilgrim [Wed, 3 Oct 2018 16:45:26 +0000 (16:45 +0000)]
[X86] Add SkylakeClient uops counter - same as the other Intel models.

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

5 years agoCorrect implementation of -verify-machineinstrs such that it's still overridable...
Daniel Sanders [Wed, 3 Oct 2018 16:29:24 +0000 (16:29 +0000)]
Correct implementation of -verify-machineinstrs such that it's still overridable for EXPENSIVE_CHECKS

-verify-machineinstrs was implemented as a simple bool. As a result, the
'VerifyMachineCode == cl::BOU_UNSET' used by EXPENSIVE_CHECKS to make it on by
default but possible to disable didn't work as intended. Changed
-verify-machineinstrs to a boolOrDefault to correct this.

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

5 years ago[InstCombine] clean up foldVectorBinop(); NFC
Sanjay Patel [Wed, 3 Oct 2018 15:46:03 +0000 (15:46 +0000)]
[InstCombine] clean up foldVectorBinop(); NFC

1. Fix include ordering.
2. Improve variable name (width is bitwidth not number-of-elements).
3. Add local Opcode variable to reduce code duplication.

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

5 years ago[globalisel][combines] Don't sink G_TRUNC down to use if that use is a G_PHI
Daniel Sanders [Wed, 3 Oct 2018 15:43:39 +0000 (15:43 +0000)]
[globalisel][combines] Don't sink G_TRUNC down to use if that use is a G_PHI

This fixes a problem where the register allocator fails to eliminate a PHI
because there's a non-PHI in the middle of the PHI instructions at the start
of a BB.

This G_TRUNC can be better placed but this at least fixes the correctness issue
quickly. I'll follow up with a patch to the verifier to catch this kind of bug
in future.

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

5 years ago[InstCombine] name change: foldShuffledBinop -> foldVectorBinop; NFC
Sanjay Patel [Wed, 3 Oct 2018 15:20:58 +0000 (15:20 +0000)]
[InstCombine] name change: foldShuffledBinop -> foldVectorBinop; NFC

This function will deal with more than shuffles with D50992, and I
have another potential per-element fold that could live here.

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

5 years ago[llvm-mca] Add support for move elimination in class RegisterFile.
Andrea Di Biagio [Wed, 3 Oct 2018 15:02:44 +0000 (15:02 +0000)]
[llvm-mca] Add support for move elimination in class RegisterFile.

This patch teaches class RegisterFile how to analyze register writes from
instructions that are move elimination candidates.
In particular, it teaches it how to check if a move can be effectively eliminated
by the underlying PRF, and (if necessary) how to perform move elimination.

The long term goal is to allow processor models to describe instructions that
are valid move elimination candidates.
The idea is to let register file definitions in tablegen declare if/when moves
can be eliminated.

This patch is a non functional change.
The logic that performs move elimination is currently disabled.  A future patch
will add support for move elimination in the processor models, and enable this
new code path.

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

5 years ago[llvm-exegesis] Avoid yaml parser from calling sscanf for obvious non-matches (PR39102)
Simon Pilgrim [Wed, 3 Oct 2018 14:51:09 +0000 (14:51 +0000)]
[llvm-exegesis] Avoid yaml parser from calling sscanf for obvious non-matches (PR39102)

deserializeMCOperand - ensure that we at least match the first character of the sscanf pattern before calling

This reduces llvm-exegesis uops analysis of the instructions supported from btver2 from 5m13s to 2m1s on debug builds.

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

5 years ago[X86] Correctly use SSE registers if no-x87 is selected.
Nirav Dave [Wed, 3 Oct 2018 14:13:30 +0000 (14:13 +0000)]
[X86] Correctly use SSE registers if no-x87 is selected.

Fix use of SSE1 registers for f32 ops in no-x87 mode.

Notably, allow use of SSE instructions for f32 operations in 64-bit
mode (but not 32-bit which is disallowed by callign convention).

Also avoid translating memset/memcopy/memmove into SSE registers
without X87 for 32-bit mode.

This fixes PR38738.

Reviewers: nickdesaulniers, craig.topper

Subscribers: hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D52555

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

5 years ago[RISCV][NFC] Refactor RISCVDAGToDAGISel::Select
Alex Bradbury [Wed, 3 Oct 2018 13:13:13 +0000 (13:13 +0000)]
[RISCV][NFC] Refactor RISCVDAGToDAGISel::Select

Introduce and use a switch on the opcode.

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

5 years ago[ThinLTO]Expose cache entry expiration time option in llvm-lto and fix a test
James Henderson [Wed, 3 Oct 2018 13:00:20 +0000 (13:00 +0000)]
[ThinLTO]Expose cache entry expiration time option in llvm-lto and fix a test

Two cases in a ThinLTO test were passing for the wrong reasons, since
rL340374. The tests were supposed to be testing that files were being
pruned due to the cache size, but they were in fact being pruned because
they were older than the default expiration period of 1 week.

This change fixes the tests by explicitly setting the expiration time to
the maximum value. This required the option to be exposed in llvm-lto.

By assigning all files in the cache a similar time, it is possible to see
that the newest files are still being kept, and that we aren't passing
for the wrong reason again. In the event that the entry expiration were
to expire for them, then the test would start failing, because these
files would be removed too.

Reviewed by: rnk, inglorion

Differential Revision: https://reviews.llvm.org/D51992

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

5 years ago[RA CopyHints] Fix compile-time regression
Jonas Paulsson [Wed, 3 Oct 2018 12:51:19 +0000 (12:51 +0000)]
[RA CopyHints] Fix compile-time regression

This patch makes sure that a register is only hinted once to RA. In extreme
cases the same register can otherwise be hinted numerous times and cause a
compile time slowdown.

Review: Simon Pilgrim
https://reviews.llvm.org/D52826

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

5 years ago[llvm-exegesis][NFC] Revert rL343682 "Fix unused variable warning".
Clement Courbet [Wed, 3 Oct 2018 12:48:50 +0000 (12:48 +0000)]
[llvm-exegesis][NFC] Revert rL343682 "Fix unused variable warning".

That was not the proper fix: the variable is used in debug mode.

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

5 years ago[llvm-exegesis] Fix rL343680 in release mode.
Clement Courbet [Wed, 3 Oct 2018 12:35:35 +0000 (12:35 +0000)]
[llvm-exegesis] Fix rL343680 in release mode.

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

5 years ago[llvm-exegesis][NFC] Fix unused variable warning.
Clement Courbet [Wed, 3 Oct 2018 12:27:43 +0000 (12:27 +0000)]
[llvm-exegesis][NFC] Fix unused variable warning.

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

5 years ago[llvm-exegesis] Resolve variant classes in analysis.
Clement Courbet [Wed, 3 Oct 2018 11:50:25 +0000 (11:50 +0000)]
[llvm-exegesis] Resolve variant classes in analysis.

Summary: See PR38884.

Reviewers: gchatelet

Subscribers: tschuett, RKSimon, llvm-commits

Differential Revision: https://reviews.llvm.org/D52825

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

5 years ago[RISCV] Gate float<->int and double<->int conversion patterns on IsRV32
Alex Bradbury [Wed, 3 Oct 2018 11:35:22 +0000 (11:35 +0000)]
[RISCV] Gate float<->int and double<->int conversion patterns on IsRV32

The patterns as defined are correct only when XLen==32.

This is another preparatory patch for a set of patches that flesh out RV64
codegen.

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

5 years ago[RISCV] Remove XLenVT==i32 assumptions from RISCVInstrInfo td
Alex Bradbury [Wed, 3 Oct 2018 11:14:26 +0000 (11:14 +0000)]
[RISCV] Remove XLenVT==i32 assumptions from RISCVInstrInfo td

1. brcond operates on an condition.
2. atomic_fence and the pseudo AMO instructions should all take xlen immediates

This allows the same definitions and patterns to work for RV64 (XLenVT==i64).

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

5 years ago[RISCV] Gate simm32 materialisation pattern and SW pattern on IsRV32
Alex Bradbury [Wed, 3 Oct 2018 11:04:59 +0000 (11:04 +0000)]
[RISCV] Gate simm32 materialisation pattern and SW pattern on IsRV32

These patterns are not correct for RV64.

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

5 years ago[LoopInterchange] Remove unused variable PreserveLCSSA (NFC).
Florian Hahn [Wed, 3 Oct 2018 11:01:23 +0000 (11:01 +0000)]
[LoopInterchange] Remove unused variable PreserveLCSSA (NFC).

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

5 years ago[RISCV] Remove RV64 test lines from umulo-128-legalisation-lowering.ll
Alex Bradbury [Wed, 3 Oct 2018 10:59:42 +0000 (10:59 +0000)]
[RISCV] Remove RV64 test lines from umulo-128-legalisation-lowering.ll

The generated code is incorrect anyway, and this test adds noise to the
upcoming set of patches that flesh out RV64 support.

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

5 years ago[CodeGen] NFC fix pedantic warning from extra semicolon
Jonas Toth [Wed, 3 Oct 2018 10:59:19 +0000 (10:59 +0000)]
[CodeGen] NFC fix pedantic warning from extra semicolon

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

5 years ago[AMDGPU] Fix for negative offsets in buffer/tbuffer intrinsics
Tim Renouf [Wed, 3 Oct 2018 10:29:43 +0000 (10:29 +0000)]
[AMDGPU] Fix for negative offsets in buffer/tbuffer intrinsics

Summary:
The new buffer/tbuffer intrinsics handle an out-of-range immediate
offset by moving/adding offset&-4096 to a vgpr, leaving an in-range
immediate offset, with a chance of the move/add being CSEd for similar
loads/stores.

However it turns out that a negative offset in a vgpr is illegal, even
if adding the immediate offset makes it legal again.

Therefore, this commit disables the offset&-4096 thing if the offset is
negative.

Differential Revision: https://reviews.llvm.org/D52683

Change-Id: Ie02f0a74f240a138dc2a29d17cfbd9e350e4ed13

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

5 years ago[X86][Btver2] Most RMW instructions don't require an additional uop
Simon Pilgrim [Wed, 3 Oct 2018 10:28:43 +0000 (10:28 +0000)]
[X86][Btver2] Most RMW instructions don't require an additional uop

Remove uop on WriteRMW and move it into the few instructions that need it.

Match AMD Fam16h SOG + llvm-exegesis tests

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

5 years ago[X86] ALU/ADC RMW instructions should use the WriteRMW sequence class
Simon Pilgrim [Wed, 3 Oct 2018 10:01:13 +0000 (10:01 +0000)]
[X86] ALU/ADC RMW instructions should use the WriteRMW sequence class

I was expecting this to be a nfc but Silvermont seems to be setup a little differently:

// A folded store needs a cycle on MEC_RSV for the store data, but it does not need an extra port cycle to recompute the address.
def : WriteRes<WriteRMW, [SLM_MEC_RSV]>;

So moving from WriteStore to WriteRMW reduces predicted port pressure, confirmed by @craig.topper that this is correct.

Differential Revision: https://reviews.llvm.org/D52740

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

5 years agoImprove static analysis of cold basic blocks
Aditya Kumar [Wed, 3 Oct 2018 06:21:05 +0000 (06:21 +0000)]
Improve static analysis of cold basic blocks

Differential Revision: https://reviews.llvm.org/D52704

Reviewers: sebpop, tejohnson, brzycki, SirishP
Reviewed By: sebpop

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

5 years agoAdd support for new pass manager
Aditya Kumar [Wed, 3 Oct 2018 05:55:20 +0000 (05:55 +0000)]
Add support for new pass manager

Modified the testcases to use both pass managers
Use single commandline flag for both pass managers.

Differential Revision: https://reviews.llvm.org/D52708
Reviewers: sebpop, tejohnson, brzycki, SirishP
Reviewed By: tejohnson, brzycki

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

5 years ago[AMDGPU] Rename pass "isel" to "amdgpu-isel"
Fangrui Song [Wed, 3 Oct 2018 03:38:22 +0000 (03:38 +0000)]
[AMDGPU] Rename pass "isel" to "amdgpu-isel"

Summary: The AMDGPU target specific pass "isel" is a misleading name.

Reviewers: tstellar, echristo, javed.absar, arsenm

Reviewed By: arsenm

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D52759

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

5 years ago[globalisel] Fix one more missing Verifier pass from gisel-commandline-option.ll
Daniel Sanders [Wed, 3 Oct 2018 02:52:54 +0000 (02:52 +0000)]
[globalisel] Fix one more missing Verifier pass from gisel-commandline-option.ll

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

5 years agoAMDGPU: Always run AMDGPUAlwaysInline
Matt Arsenault [Wed, 3 Oct 2018 02:47:25 +0000 (02:47 +0000)]
AMDGPU: Always run AMDGPUAlwaysInline

Even if calls are enabled, it still needs to be run
for forcing inline of functions that use LDS.

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

5 years agoAdd atomicrmw operation to error messages
Matt Arsenault [Wed, 3 Oct 2018 02:37:15 +0000 (02:37 +0000)]
Add atomicrmw operation to error messages

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

5 years agoAdd the missing new files from r343654
Daniel Sanders [Wed, 3 Oct 2018 02:21:30 +0000 (02:21 +0000)]
Add the missing new files from r343654

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

5 years agoRe-commit: [globalisel] Add a combiner helpers for extending loads and use them in...
Daniel Sanders [Wed, 3 Oct 2018 02:12:17 +0000 (02:12 +0000)]
Re-commit: [globalisel] Add a combiner helpers for extending loads and use them in a pre-legalize combiner for AArch64

Summary: Depends on D45541

Reviewers: ab, aditya_nandakumar, bogner, rtereshin, volkan, rovka, javed.absar, aemerson

Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D45543

The previous commit failed portions of the test-suite on GreenDragon due to
duplicate COPY instructions and iterator invalidation. Both issues have now
been fixed. To assist with this, a helper (cloneVirtualRegister) has been added
to MachineRegisterInfo that can be used to get another register that has the same
type and class/bank as an existing one.

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

5 years ago[WebAssembly] any_true and all_true intrinsics and instructions
Thomas Lively [Wed, 3 Oct 2018 00:19:39 +0000 (00:19 +0000)]
[WebAssembly] any_true and all_true intrinsics and instructions

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D52755

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

5 years ago[AMDGPU] Assert in getOpSize() there are no sub-dword subregs
Stanislav Mekhanoshin [Wed, 3 Oct 2018 00:00:41 +0000 (00:00 +0000)]
[AMDGPU] Assert in getOpSize() there are no sub-dword subregs

Differential Revision: https://reviews.llvm.org/D52769

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

5 years agoIR: Move AtomicRMW string names into class
Matt Arsenault [Tue, 2 Oct 2018 23:44:11 +0000 (23:44 +0000)]
IR: Move AtomicRMW string names into class

This will be used to improve error messages in a future commit.

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

5 years ago[InstCombine] add icmp+logic tests with commuted ops; NFC
Sanjay Patel [Tue, 2 Oct 2018 22:53:37 +0000 (22:53 +0000)]
[InstCombine] add icmp+logic tests with commuted ops; NFC

The transform in question is located in foldICmpAndConstConst(),
but as shown here, it doesn't work if operands are commuted.

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

5 years agoRelax dbg-declare-inalloca.ll test more
Reid Kleckner [Tue, 2 Oct 2018 22:28:10 +0000 (22:28 +0000)]
Relax dbg-declare-inalloca.ll test more

We don't need to match the precise type index number here. It's not
important. The type name is what matters to make this test useful.

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

5 years ago[WebAssembly] Stop generating helper functions in WebAssemblyLowerEmscriptenEHSjLj
Sam Clegg [Tue, 2 Oct 2018 22:12:15 +0000 (22:12 +0000)]
[WebAssembly] Stop generating helper functions in WebAssemblyLowerEmscriptenEHSjLj

Previously we were creating weakly defined helper function in
each translation unit:

-  setThrew
-  setTempRet0

Instead we now assume these will be provided at link time.  In
emscripten they are provided in compiler-rt:
 https://github.com/kripken/emscripten/pull/7203

Additionally we previously created three global variable which are
also now required to exist at link time instead.

- __THREW__
- _threwValue
- __tempRet0

Differential Revision: https://reviews.llvm.org/D49208

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

5 years ago[CodeView] Try fixing DebugInfo/X86/dbg-declare-inalloca.ll
Fangrui Song [Tue, 2 Oct 2018 22:03:31 +0000 (22:03 +0000)]
[CodeView] Try fixing DebugInfo/X86/dbg-declare-inalloca.ll

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

5 years ago[globalisel] Attempt to fix llvm-clang-x86_64-expensive-checks-win
Daniel Sanders [Tue, 2 Oct 2018 20:51:27 +0000 (20:51 +0000)]
[globalisel] Attempt to fix llvm-clang-x86_64-expensive-checks-win

The behaviour of this bot indicates that -verify-machineinstrs has been forced
on and is therefore inserting the verifier on builds that don't expect it.
Explicitly specify whether it's enabled or disabled for each test.

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

5 years ago [CodeView] Only add the Scoped flag for an enum type when it has an immediate functi...
Aaron Smith [Tue, 2 Oct 2018 20:28:15 +0000 (20:28 +0000)]
 [CodeView] Only add the Scoped flag for an enum type when it has an immediate function scope to match MSVC

Reviewers: rnk, zturner, llvm-commits

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D52706

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

5 years ago[CodeView] Emit function options for subprogram and member functions
Aaron Smith [Tue, 2 Oct 2018 20:21:05 +0000 (20:21 +0000)]
[CodeView] Emit function options for subprogram and member functions

Summary:
Use the newly added DebugInfo (DI) Trivial flag, which indicates if a C++ record is trivial or not, to determine Codeview::FunctionOptions.

Clang and MSVC generate slightly different Codeview for C++ records. For example, here is the C++ code for a class with a defaulted ctor,

       class C {
       public:
         C() = default;
       };

Clang will produce a LF for the defaulted ctor while MSVC does not. For more details, refer to FIXMEs in the test cases in "function-options.ll" included with this set of changes.

Reviewers: zturner, rnk, llvm-commits, aleksandr.urakov

Reviewed By: rnk

Subscribers: Hui, JDevlieghere

Differential Revision: https://reviews.llvm.org/D45123

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

5 years ago[llvm-mca] Remove unecessary forward decls. NFC.
Matt Davis [Tue, 2 Oct 2018 19:42:46 +0000 (19:42 +0000)]
[llvm-mca] Remove unecessary forward decls. NFC.

This patch also removes an unecessary include.

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

5 years agoRevert "X86, AArch64, ARM: Do not attach debug location to spill/reload instructions"
Matt Morehouse [Tue, 2 Oct 2018 18:35:44 +0000 (18:35 +0000)]
Revert "X86, AArch64, ARM: Do not attach debug location to spill/reload instructions"

This reverts r343520 due to breakage of HWASan tests on Android.

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

5 years ago[llvm-mca] Constify the 'notify' routines. NFC.
Matt Davis [Tue, 2 Oct 2018 18:26:33 +0000 (18:26 +0000)]
[llvm-mca] Constify the 'notify' routines. NFC.

Also fixed up some whitespace formatting in DispatchStage.cpp.

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

5 years ago[X86][Disassembler] Add bizarro versions of the MOVSXD instruction that sign extend...
Craig Topper [Tue, 2 Oct 2018 18:16:19 +0000 (18:16 +0000)]
[X86][Disassembler] Add bizarro versions of the MOVSXD instruction that sign extend from a GR32 to GR32 or GR16.

The 0x63 opcodes in 64-bit mode have a fixed source size of 32-bits, but the destination size is controlled by REX.W and the 0x66 opsize prefix. This instruction is normally used with a REX.W prefix which provides desired behavior. The other encodings are interpretted as valid by the processor, but aren't useful.

This patch makes us recognize them for the disassembler to match objdump.

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

5 years ago[globalisel][verifier] Run the MachineVerifier from IRTranslator onwards
Daniel Sanders [Tue, 2 Oct 2018 17:56:58 +0000 (17:56 +0000)]
[globalisel][verifier] Run the MachineVerifier from IRTranslator onwards

-verify-machineinstrs inserts the MachineVerifier after every MachineInstr-based
pass. However, GlobalISel creates MachineInstr-based passes earlier than DAGISel
and the corresponding verifiers are not being added. This patch fixes that.

If GlobalISel triggers the fallback path then the MIR can be left in a bad
state that is going to be cleared by ResetMachineFunctions. In this situation
verifying between GlobalISel passes will prevent the fallback path from
recovering from this. As a result, we bail out of verifying a function if the
FailedISel attribute is present.

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

5 years ago[codeview] Fix 32-bit x86 variable locations in realigned stack frames
Reid Kleckner [Tue, 2 Oct 2018 16:43:52 +0000 (16:43 +0000)]
[codeview] Fix 32-bit x86 variable locations in realigned stack frames

Add the .cv_fpo_stackalign directive so that we can define $T0, or the
VFRAME virtual register, with it. This was overlooked in the initial
implementation because unlike MSVC, we push CSRs before allocating stack
space, so this value is only needed to describe local variable
locations. Variables that the compiler now addresses via ESP are instead
described as being stored at offsets from VFRAME, which for us is ESP
after alignment in the prologue.

This adds tests that show that we use the VFRAME register properly in
our S_DEFRANGE records, and that we emit the correct FPO data to define
it.

Fixes PR38857

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

5 years ago[X86][Btver2] Fix BLENDV and AESDEC schedules
Simon Pilgrim [Tue, 2 Oct 2018 15:13:18 +0000 (15:13 +0000)]
[X86][Btver2] Fix BLENDV and AESDEC schedules

Match AMD Fam16h SOG + llvm-exegesis tests

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

5 years ago[Hexagon] Fix extracting subvectors of non-HVX vNi1
Krzysztof Parzyszek [Tue, 2 Oct 2018 15:05:43 +0000 (15:05 +0000)]
[Hexagon] Fix extracting subvectors of non-HVX vNi1

Patch by Brendon Cahoon.

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

5 years ago[InstCombine] add tests with undef elements; NFC
Sanjay Patel [Tue, 2 Oct 2018 15:00:56 +0000 (15:00 +0000)]
[InstCombine] add tests with undef elements; NFC

See discussion in D52747.

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

5 years ago[ARM] Emmit data symbol for constant pool data
Diogo N. Sampaio [Tue, 2 Oct 2018 14:55:48 +0000 (14:55 +0000)]
[ARM] Emmit data symbol for constant pool data

The ARM elf emitter would omit printing data
symbol when constant data. This patch
overrides the emitFill method as to enforce that
the symbol is correctly printed.

Differential revision: https://reviews.llvm.org/D52737

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

5 years ago[NFC][CodeGen][X86] fma.ll, lwp-intrinsics.ll: actually spell --check-prefixes corre...
Roman Lebedev [Tue, 2 Oct 2018 13:34:50 +0000 (13:34 +0000)]
[NFC][CodeGen][X86] fma.ll, lwp-intrinsics.ll: actually spell  --check-prefixes correctly :/

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

5 years ago[InstCombine] add more insert/extract vector tests with FP types; NFC
Sanjay Patel [Tue, 2 Oct 2018 13:34:05 +0000 (13:34 +0000)]
[InstCombine] add more insert/extract vector tests with FP types; NFC

These are candidates for the same fold that was implemented in
D52439, but FP types require bitcasting (and that changes the
extra uses profitability calculation).

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

5 years ago[X86] Remove unnecessary BT(C/R/S)m(i/r) scheduler overrides
Simon Pilgrim [Tue, 2 Oct 2018 13:11:59 +0000 (13:11 +0000)]
[X86] Remove unnecessary BT(C/R/S)m(i/r) scheduler overrides

Some SchedAlias remain due to some badly setup RMW tags - but at least the overrides are all removed

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

5 years ago[NFC][CodeGen][X86] lwp-intrinsics.ll: fix check prefixes
Roman Lebedev [Tue, 2 Oct 2018 13:11:08 +0000 (13:11 +0000)]
[NFC][CodeGen][X86] lwp-intrinsics.ll: fix check prefixes

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

5 years ago[NFC][CodeGen][X86] fma.ll: fix check prefixes for -mcpu=bdver2
Roman Lebedev [Tue, 2 Oct 2018 13:10:55 +0000 (13:10 +0000)]
[NFC][CodeGen][X86] fma.ll: fix check prefixes for -mcpu=bdver2

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

5 years ago[X86] Add APInt constant assembly printer helper
Simon Pilgrim [Tue, 2 Oct 2018 11:32:33 +0000 (11:32 +0000)]
[X86] Add APInt constant assembly printer helper

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

5 years ago[AArch64][v8.5A] Add Memory Tagging instructions
Oliver Stannard [Tue, 2 Oct 2018 10:04:39 +0000 (10:04 +0000)]
[AArch64][v8.5A] Add Memory Tagging instructions

This adds new instructions to manipluate tagged pointers, and to load
and store the tags associated with memory.

Patch by Pablo Barrio, David Spickett and Oliver Stannard!

Differential revision: https://reviews.llvm.org/D52490

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

5 years ago[AArch64][v8.5A] Add Memory Tagging system registers
Oliver Stannard [Tue, 2 Oct 2018 09:54:35 +0000 (09:54 +0000)]
[AArch64][v8.5A] Add Memory Tagging system registers

This adds new system registers introduced by the Memory Tagging
extension.

Patch by Pablo Barrio!

Differential revision: https://reviews.llvm.org/D52488

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

5 years ago[AArch64][v8.5A] Add MTE system instructions
Oliver Stannard [Tue, 2 Oct 2018 09:48:43 +0000 (09:48 +0000)]
[AArch64][v8.5A] Add MTE system instructions

The Memory Tagging Extension adds system instructions for data cache
maintenance, implemented as new operands to the DC instruction.

Patch by Pablo Barrio!

Differential revision: https://reviews.llvm.org/D52487

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

5 years ago[InstCombine] Fold ~A - Min/Max(~A, O) -> Max/Min(A, ~O) - A
David Green [Tue, 2 Oct 2018 09:48:34 +0000 (09:48 +0000)]
[InstCombine] Fold ~A - Min/Max(~A, O) -> Max/Min(A, ~O) - A

This is an attempt to get out of a local-minimum that instcombine currently
gets stuck in. We essentially combine two optimisations at once, ~a - ~b = b-a
and min(~a, ~b) = ~max(a, b), only doing the transform if the result is at
least neutral. This involves using IsFreeToInvert, which has been expanded a
little to include selects that can be easily inverted.

This is trying to fix PR35875, using the ideas from Sanjay. It is a large
improvement to one of our rgb to cmy kernels.

Differential Revision: https://reviews.llvm.org/D52177

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