OSDN Git Service
Yonghong Song [Thu, 20 Dec 2018 17:40:23 +0000 (17:40 +0000)]
[BPF] Disable relocation for .BTF.ext section
Build llvm with assertion on, and then build bcc against this llvm.
Run any bcc tool with debug=8 (turning on -g for clang compilation),
you will get the following assertion errors,
/home/yhs/work/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:888:
void llvm::RuntimeDyldELF::resolveBPFRelocation(const llvm::SectionEntry&, uint64_t,
uint64_t, uint32_t, int64_t): Assertion `Value <= (4294967295U)' failed.
The .BTF.ext ELF section uses Fixup's to get the instruction
offsets. The data width of the Fixup is 4 bytes since we only need
the insn offset within the section.
This caused the above error though since R_BPF_64_32 expects
4-byte value and the Runtime Dyld tried to resolve the actual
insn address which is 8 bytes.
Actually the offset within the section is all what we need.
Therefore, there is no need to perform any kind of relocation
for .BTF.ext section and such relocation will actually cause
incorrect result.
This patch changed BPFELFObjectWriter::getRelocType() such that
for Fixup Kind FK_Data_4, if the relocation Target is a temporary
symbol, let us skip the relocation (ELF::R_BPF_NONE).
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Yonghong Song <yhs@fb.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349778
91177308-0d34-0410-b5e6-
96231b3b80d8
Brock Wyma [Thu, 20 Dec 2018 17:33:45 +0000 (17:33 +0000)]
[CodeView] Emit global variables within lexical scopes to limit visibility
Emit static locals within the correct lexical scope so variables with the same
name will not confuse the debugger into getting the wrong value.
Differential Revision: https://reviews.llvm.org/D55336
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349777
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kruse [Thu, 20 Dec 2018 17:11:02 +0000 (17:11 +0000)]
[InstCombine] Preserve access-group metadata.
Preserve llvm.access.group metadata when combining store instructions.
This was forgotten in r349725.
Fixes llvm.org/PR40117
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349774
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 20 Dec 2018 17:05:57 +0000 (17:05 +0000)]
[x86] add test to show missed movddup load fold; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349773
91177308-0d34-0410-b5e6-
96231b3b80d8
Amilendra Kodithuwakku [Thu, 20 Dec 2018 16:44:26 +0000 (16:44 +0000)]
Test commit
Fix a simple typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349771
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 20 Dec 2018 16:39:20 +0000 (16:39 +0000)]
[Hexagon] Add patterns for funnel shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349770
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Dec 2018 14:56:44 +0000 (14:56 +0000)]
[SelectionDAGBuilder] Enable funnel shift building to custom rotates
This patch enables funnel shift -> rotate building for all ROTL/ROTR custom/legal operations.
AFAICT X86 was the last target that was missing modulo support (PR38243), but I've tried to CC stakeholders for every target that has ROTL/ROTR custom handling for their final OK.
Differential Revision: https://reviews.llvm.org/D55747
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349765
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 20 Dec 2018 14:52:15 +0000 (14:52 +0000)]
[RISCV] Properly evaluate fixup_riscv_pcrel_lo12
This is a update to D43157 to correctly handle fixup_riscv_pcrel_lo12.
Notable changes:
Rebased onto trunk
Handle and test S-type
Test case pcrel-hilo.s is merged into relocations.s
D43157 description:
VK_RISCV_PCREL_LO has to be handled specially. The MCExpr inside is
actually the location of an auipc instruction with a VK_RISCV_PCREL_HI fixup
pointing to the real target.
Differential Revision: https://reviews.llvm.org/D54029
Patch by Chih-Mao Chen and Michael Spencer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349764
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Dec 2018 14:38:35 +0000 (14:38 +0000)]
[X86][AVX512] Don't custom lower v16i8 rotations.
As discussed on D55747, the expansion to (wider) shifts is better on all AVX512 cases, not just BWI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349763
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Thu, 20 Dec 2018 14:24:17 +0000 (14:24 +0000)]
[SystemZ] "Generic" vector assembler instructions shoud clobber CC
There are several vector instructions which may or may not set the
condition code register, depending on the value of an argument.
For codegen, we use two versions of the instruction, one that sets
CC and one that doesn't, which hard-code appropriate values of that
argument. But we also have a "generic" version of the instruction
that is used for the assembler/disassembler. These generic versions
should always be considered to clobber CC just to be safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349761
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Dec 2018 14:09:15 +0000 (14:09 +0000)]
Fix gcc7 -Wdangling-else warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349760
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Dec 2018 13:50:12 +0000 (13:50 +0000)]
[InstCombine] Make x86 PADDS/PSUBS constant folding tests generic
As discussed on D55894, this replaces the existing PADDS/PSUBUS intrinsics with the the sadd/ssub.sat generic intrinsics and moves the tests out of the x86 subfolder.
PR40110 has been raised to fix the regression with constant folding vectors containing undef elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349759
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 20 Dec 2018 13:39:25 +0000 (13:39 +0000)]
[gn build] Add build files for clang/lib/{Analysis,Edit,Sema}
Differential Revision: https://reviews.llvm.org/D55913
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349757
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 20 Dec 2018 13:38:36 +0000 (13:38 +0000)]
[gn build] Add build files for clang/lib/Lex and clang/lib/AST
Differential Revision: https://reviews.llvm.org/D55912
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349756
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Thu, 20 Dec 2018 13:05:03 +0000 (13:05 +0000)]
[SystemZ] Make better use of VLLEZ
This patch fixes two deficiencies in current code that recognizes
the VLLEZ idiom:
- For the floating-point versions, we have ISel patterns that match
on a bitconvert as the top node. In more complex cases, that
bitconvert may already have been merged into something else.
Fix the patterns to match the inner nodes instead.
- For the 64-bit integer versions, depending on the surrounding code,
we may get either a DAG tree based on JOIN_DWORDS or one based on
INSERT_VECTOR_ELT. Use a PatFrags to simply match both variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349749
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Thu, 20 Dec 2018 13:01:20 +0000 (13:01 +0000)]
[SystemZ] Make better use of VGEF/VGEG
Current code in SystemZDAGToDAGISel::tryGather refuses to perform
any transformation if the Load SDNode has more than one use. This
(erronously) counts uses of the chain result, which prevents the
optimization in many cases unnecessarily. Fixed by this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349748
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Thu, 20 Dec 2018 13:01:04 +0000 (13:01 +0000)]
Re-land r349731 "[CodeGen][ExpandMemcmp] Add an option for allowing overlapping loads.
Update PPC ir following GEP->bitcat to bitcat->GEP->bitcat change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349747
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Thu, 20 Dec 2018 12:59:05 +0000 (12:59 +0000)]
[SystemZ] Make better use of VLDEB
We already have special code (DAG combine support for FP_ROUND)
to recognize cases where we an use a vector version of VLEDB to
perform two floating-point truncates in parallel, but equivalent
support for VLEDB (vector floating-point extends) has been
missing so far. This patch adds corresponding DAG combine
support for FP_EXTEND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349746
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Dec 2018 11:53:54 +0000 (11:53 +0000)]
[X86][SSE] Auto upgrade PADDS/PSUBS intrinsics to SADD_SAT/SSUB_SAT generic intrinsics (llvm)
Pulled out of D55894 to match the clang changes in D55890.
Differential Revision: https://reviews.llvm.org/D55890
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349744
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Dec 2018 11:14:56 +0000 (11:14 +0000)]
[X86] Update PADDSW/PSUBSW intrinsic usage with generic saturated intrinsics.
As discussed on D55894, this makes no difference to the actual test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349742
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 20 Dec 2018 10:59:52 +0000 (10:59 +0000)]
[llvm-objcopy] Use ELFOSABI_NONE instead of 0. NFC.
This was requested during the review of D55886.
(sorry, forgot to address this)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349741
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 20 Dec 2018 10:54:59 +0000 (10:54 +0000)]
[X86] Change 'simple nonmem' intrinsic test to not use PADDSW
Those intrinsics will be autoupgraded soon to @llvm.sadd.sat generics (D55894), so to keep a x86-specific case I'm replacing it with @llvm.x86.sse2.pmulhu.w
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349739
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 20 Dec 2018 10:51:42 +0000 (10:51 +0000)]
[llvm-objcopy] - Do not drop the OS/ABI and ABIVersion fields of ELF header
This is https://bugs.llvm.org/show_bug.cgi?id=40005,
Patch teaches llvm-objcopy to preserve OS/ABI and ABIVersion fields of ELF header.
(Currently, it drops them to zero).
Differential revision: https://reviews.llvm.org/D55886
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349738
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 20 Dec 2018 10:43:49 +0000 (10:43 +0000)]
[yaml2obj/obj2yaml] - Support dumping/parsing ABI version.
These tools were assuming ABI version is 0,
that is not always true.
Patch teaches them to work with that field.
Differential revision: https://reviews.llvm.org/D55884
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349737
91177308-0d34-0410-b5e6-
96231b3b80d8
Piotr Sobczak [Thu, 20 Dec 2018 10:08:18 +0000 (10:08 +0000)]
[InstCombine][AMDGPU] Handle more buffer intrinsics
Summary:
Include the following intrinsics in the InsctCombine
simplification:
* amdgcn_raw_buffer_load
* amdgcn_raw_buffer_load_format
* amdgcn_struct_buffer_load
* amdgcn_struct_buffer_load_format
Change-Id: I14deceff74bcb21179baf6aa6e94bf39e7d63d5d
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D55882
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349735
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Thu, 20 Dec 2018 10:05:00 +0000 (10:05 +0000)]
[MSan] Don't emit __msan_instrument_asm_load() calls
LLVM treats void* pointers passed to assembly routines as pointers to
sized types.
We used to emit calls to __msan_instrument_asm_load() for every such
void*, which sometimes led to false positives.
A less error-prone (and truly "conservative") approach is to unpoison
only assembly output arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349734
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Thu, 20 Dec 2018 09:58:33 +0000 (09:58 +0000)]
Revert r349731 "[CodeGen][ExpandMemcmp] Add an option for allowing overlapping loads."
Forgot to update PowerPC tests for the GEP->bitcast change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349733
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Thu, 20 Dec 2018 09:20:07 +0000 (09:20 +0000)]
[NFC] Fix trailing comma after function.
lib/Analysis/VectorUtils.cpp:482:2: warning: extra ‘;’ [-Wpedantic]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349732
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Thu, 20 Dec 2018 09:13:47 +0000 (09:13 +0000)]
[CodeGen][ExpandMemcmp] Add an option for allowing overlapping loads.
Summary:
This allows expanding {7,11,13,14,15,21,22,23,25,26,27,28,29,30,31}-byte memcmp
in just two loads on X86. These were previously calling memcmp.
Reviewers: spatel, gchatelet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D55263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349731
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Thu, 20 Dec 2018 09:04:33 +0000 (09:04 +0000)]
[HWASAN] Add support for memory intrinsics
Differential revision: https://reviews.llvm.org/D55117
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349728
91177308-0d34-0410-b5e6-
96231b3b80d8
Kang Zhang [Thu, 20 Dec 2018 06:19:59 +0000 (06:19 +0000)]
[PowerPC] Implement the isSelectSupported() target hook
Summary:
PowerPC has scalar selects (isel) and vector mask selects (xxsel). But PowerPC
does not have vector CR selects, PowerPC does not support scalar condition
selects on vectors.
In addition to implementing this hook, isSelectSupported() should return false
when the SelectSupportKind is ScalarCondVectorVal, so that predictable selects
are converted into branch sequences.
Reviewed By: steven.zhang, hfinkel
Differential Revision: https://reviews.llvm.org/D55754
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349727
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 20 Dec 2018 05:28:06 +0000 (05:28 +0000)]
[DAGCombiner] Fix a place that was creating a SIGN_EXTEND with an extra operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349726
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kruse [Thu, 20 Dec 2018 04:58:07 +0000 (04:58 +0000)]
Introduce llvm.loop.parallel_accesses and llvm.access.group metadata.
The current llvm.mem.parallel_loop_access metadata has a problem in that
it uses LoopIDs. LoopID unfortunately is not loop identifier. It is
neither unique (there's even a regression test assigning the some LoopID
to multiple loops; can otherwise happen if passes such as LoopVersioning
make copies of entire loops) nor persistent (every time a property is
removed/added from a LoopID's MDNode, it will also receive a new LoopID;
this happens e.g. when calling Loop::setLoopAlreadyUnrolled()).
Since most loop transformation passes change the loop attributes (even
if it just to mark that a loop should not be processed again as
llvm.loop.isvectorized does, for the versioned and unversioned loop),
the parallel access information is lost for any subsequent pass.
This patch unlinks LoopIDs and parallel accesses.
llvm.mem.parallel_loop_access metadata on instruction is replaced by
llvm.access.group metadata. llvm.access.group points to a distinct
MDNode with no operands (avoiding the problem to ever need to add/remove
operands), called "access group". Alternatively, it can point to a list
of access groups. The LoopID then has an attribute
llvm.loop.parallel_accesses with all the access groups that are parallel
(no dependencies carries by this loop).
This intentionally avoid any kind of "ID". Loops that are clones/have
their attributes modifies retain the llvm.loop.parallel_accesses
attribute. Access instructions that a cloned point to the same access
group. It is not necessary for each access to have it's own "ID" MDNode,
but those memory access instructions with the same behavior can be
grouped together.
The behavior of llvm.mem.parallel_loop_access is not changed by this
patch, but should be considered deprecated.
Differential Revision: https://reviews.llvm.org/D52116
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349725
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 20 Dec 2018 04:20:32 +0000 (04:20 +0000)]
[WebAssembly] Emit a splat for v128 IMPLICIT_DEF
Summary:
This is a code size savings and is also important to get runnable code
while engines do not support v128.const.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D55910
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349724
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Thu, 20 Dec 2018 03:27:42 +0000 (03:27 +0000)]
Fix build errors introduced by r349712 on aarch64 bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349723
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 20 Dec 2018 02:10:22 +0000 (02:10 +0000)]
[WebAssembly] Gate unimplemented SIMD ops on flag
Summary:
Gates v128.const, f32x4.sqrt, f32x4.div, i8x16.extract_lane_u, and
i16x8.extract_lane_u on the --wasm-enable-unimplemented-simd flag,
since these ops are not implemented yet in V8.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D55904
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349720
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 20 Dec 2018 01:35:49 +0000 (01:35 +0000)]
AMDGPU: Make i1/i64/v2i32 and/or/xor legal
The 64-bit types do depend on the register bank,
but that's another issue to deal with later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349716
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 20 Dec 2018 01:33:43 +0000 (01:33 +0000)]
AMDGPU/GlobalISel: Fix ValueMapping tables for i1
This was incorrectly selecting SGPR for any i1 values,
e.g. G_TRUNC to i1 from a VGPR was still an SGPR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349715
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 20 Dec 2018 01:32:06 +0000 (01:32 +0000)]
[X86] Disable custom widening of signed/unsigned add/sub saturation intrinsics under -x86-experimental-vector-widening-legalization.
Generic legalization should take care of this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349714
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Thu, 20 Dec 2018 01:11:04 +0000 (01:11 +0000)]
[AArch64][GlobalISel] Implement selection og G_MERGE of two s32s into s64.
This code pattern is an unfortunate side effect of the way some types get split
at call lowering. Ideally we'd either not generate it at all or combine it away
in the legalizer artifact combiner.
Until then, add selection support anyway which is a significant proportion of
our current fallbacks on CTMark.
rdar://
46491420
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349712
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Thu, 20 Dec 2018 00:57:06 +0000 (00:57 +0000)]
[binutils] NFC: fix clang-tidy warning: use empty() instead of size() == 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349710
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 20 Dec 2018 00:37:02 +0000 (00:37 +0000)]
AMDGPU/GlobalISel: RegBankSelect for fp conversions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349709
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 20 Dec 2018 00:33:49 +0000 (00:33 +0000)]
AMDGPU/GlobalISel: Legality/regbankselect for atomicrmw/atomic_cmpxchg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349708
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 20 Dec 2018 00:30:27 +0000 (00:30 +0000)]
[asan] Undo special treatment of linkonce_odr and weak_odr
Summary:
On non-Windows these are already removed by ShouldInstrumentGlobal.
On Window we will wait until we get actual issues with that.
Reviewers: pcc
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D55899
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349707
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 20 Dec 2018 00:30:18 +0000 (00:30 +0000)]
[asan] Prevent folding of globals with redzones
Summary:
ICF prevented by removing unnamed_addr and local_unnamed_addr for all sanitized
globals.
Also in general unnamed_addr is not valid here as address now is important for
ODR violation detector and redzone poisoning.
Before the patch ICF on globals caused:
1. false ODR reports when we register global on the same address more than once
2. globals buffer overflow if we fold variables of smaller type inside of large
type. Then the smaller one will poison redzone which overlaps with the larger one.
Reviewers: eugenis, pcc
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D55857
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349706
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 20 Dec 2018 00:04:10 +0000 (00:04 +0000)]
[gn build] Make `ninja check-lld` also run LLD's unit tests
And add build files for gtest.
With this, the build files for //lld are complete.
Differential Revision: https://reviews.llvm.org/D55838
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349704
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Thu, 20 Dec 2018 00:01:57 +0000 (00:01 +0000)]
[DwarfExpression] Fix a typo in a doxygen comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349703
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 19 Dec 2018 23:52:16 +0000 (23:52 +0000)]
[gn build] Add check-lld target and make it work
Also add a build file for llvm-lit, which in turn needs llvm/tools/llvm-config.
With this, check-lld runs and passes all of lld's lit tests. It doesn't run any
of its unit tests yet.
Running just ninja -C out/gn will build all prerequisites needed to run tests,
but it won't run the tests (so that the build becomes clean after one build).
Running ninja -C out/gn check-lld will build prerequisites if needed and run
the tests. The check-lld target never becomes clean and runs tests every time.
llvm-config's build file is a bit gnarly: Everything not needed to run tests is
basically stubbed out. Also, to generate LibraryDependencies.inc we shell out
to llvm-build at build-time. It would be much nicer to get the library
dependencies by using the dependency data the GN build contains
(http://llvm-cs.pcc.me.uk/gen/tools/llvm-config/LibraryDependencies.inc#1).
Differential Revision: https://reviews.llvm.org/D55836
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349702
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 19 Dec 2018 23:13:03 +0000 (23:13 +0000)]
[X86] Remove TLI variable from ReplaceNodeResults. NFC
We're already in X86TargetLowering which is a derived class of TargetLowering. We can just call methods directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349695
91177308-0d34-0410-b5e6-
96231b3b80d8
Rhys Perry [Wed, 19 Dec 2018 22:53:33 +0000 (22:53 +0000)]
AMDGPU: Add patterns for v4i16/v4f16 -> v4i16/v4f16 bitcasts
Reviewers: arsenm, tstellar
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D55058
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349694
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 19 Dec 2018 22:52:04 +0000 (22:52 +0000)]
[CodeGenPrepare] Fix bad IR created by large offset GEP splitting.
Creating the IR builder, then modifying the CFG, leads to an IRBuilder
where the BB and insertion point are inconsistent, so new instructions
have the wrong parent.
Modified an existing test because the test wasn't covering anything
useful (the "invoke" was not actually an invoke by the time we hit the
code in question).
Differential Revision: https://reviews.llvm.org/D55729
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349693
91177308-0d34-0410-b5e6-
96231b3b80d8
Rhys Perry [Wed, 19 Dec 2018 22:33:42 +0000 (22:33 +0000)]
Fix test commit
Seems that was actually a eight space tab...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349690
91177308-0d34-0410-b5e6-
96231b3b80d8
Rhys Perry [Wed, 19 Dec 2018 22:26:51 +0000 (22:26 +0000)]
Test commit
Replace tab with 4 spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349689
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 19 Dec 2018 22:24:42 +0000 (22:24 +0000)]
[llvm-mca] Rename directory for the Cortex tests (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349688
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 19 Dec 2018 22:24:39 +0000 (22:24 +0000)]
[llvm-mca] Update Exynos test cases (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349687
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 19 Dec 2018 22:24:36 +0000 (22:24 +0000)]
[AArch64] Improve Exynos predicates
Expand the predicate `ExynosResetPred` to include all forms of immediate
moves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349686
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 19 Dec 2018 22:24:31 +0000 (22:24 +0000)]
[AArch64] Use canonical copy idiom
Use only the canonical form of the alias for register transfers in the
`IsCopyIdiomPred` predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349685
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Wed, 19 Dec 2018 22:09:02 +0000 (22:09 +0000)]
Revert "[BDCE][DemandedBits] Detect dead uses of undead instructions"
This reverts commit r349674. It causes a failure in
test-suite enc-3des.execution_time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349684
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 19 Dec 2018 20:54:06 +0000 (20:54 +0000)]
[llvm-ar] Simplify string table get-or-insert pattern with .insert, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349681
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 19 Dec 2018 20:35:28 +0000 (20:35 +0000)]
[x86] add test to show ddup hole; NFC (PR37502)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349680
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 19 Dec 2018 20:21:49 +0000 (20:21 +0000)]
[gn build] Add build file for clang/lib/Basic and dependencies, 2nd try
Adds a build file for clang-tblgen and an action for running it, and uses that
to process all the .td files in include/clang/Basic.
Also adds an action to write include/clang/Config/config.h and
include/clang/Basic/Version.inc.
Differential Revision: https://reviews.llvm.org/D55847
(The previous commit of this contained unrelated changes, so I reverted the
whole previous commit and I'm now landing only what I intended to land.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349679
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 19 Dec 2018 20:19:58 +0000 (20:19 +0000)]
Revert 349677, it contained a whole bunch of stuff I did not mean to commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349678
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 19 Dec 2018 20:18:59 +0000 (20:18 +0000)]
[gn build] Add build file for clang/lib/Basic and dependencies
Adds a build file for clang-tblgen and an action for running it, and uses that
to process all the .td files in include/clang/Basic.
Also adds an action to write include/clang/Config/config.h and
include/clang/Basic/Version.inc.
Differential Revision: https://reviews.llvm.org/D55847
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349677
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Wed, 19 Dec 2018 19:56:21 +0000 (19:56 +0000)]
[BDCE][DemandedBits] Detect dead uses of undead instructions
This (mostly) fixes https://bugs.llvm.org/show_bug.cgi?id=39771.
BDCE currently detects instructions that don't have any demanded bits
and replaces their uses with zero. However, if an instruction has
multiple uses, then some of the uses may be dead (have no demanded bits)
even though the instruction itself is still live. This patch extends
DemandedBits/BDCE to detect such uses and replace them with zero.
While this will not immediately render any instructions dead, it may
lead to simplifications (in the motivating case, by converting a rotate
into a simple shift), break dependencies, etc.
The implementation tries to strike a balance between analysis power and
complexity/memory usage. Originally I wanted to track demanded bits on
a per-use level, but ultimately we're only really interested in whether
a use is entirely dead or not. I'm using an extra set to track which uses
are dead. However, as initially all uses are dead, I'm not storing uses
those user is also dead. This case is checked separately instead.
The test case has a couple of cases that are not simplified yet. In
particular, we're only looking at uses of instructions right now. I think
it would make sense to also extend this to arguments. Furthermore
DemandedBits doesn't yet know some of the tricks that InstCombine does
for the demanded bits or bitwise or/and/xor in combination with known
bits information.
Differential Revision: https://reviews.llvm.org/D55563
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349674
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandre Ganea [Wed, 19 Dec 2018 19:42:21 +0000 (19:42 +0000)]
Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen"
(was reverted by mistake)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349672
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 19 Dec 2018 19:39:34 +0000 (19:39 +0000)]
[X86] Remove a bunch of 'else' after returns in reduceVMULWidth. NFC
This reduces indentation and makes it obvious this function always returns something.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349671
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 19 Dec 2018 19:34:24 +0000 (19:34 +0000)]
llvm-dwarfdump: Improve/fix pretty printing of array dimensions
This is to address post-commit feedback from Paul Robinson on r348954.
The original commit misinterprets count and upper bound as the same thing (I thought I saw GCC producing an upper bound the same as Clang's count, but GCC correctly produces an upper bound that's one less than the count (in C, that is, where arrays are zero indexed)).
I want to preserve the C-like output for the common case, so in the absence of a lower bound the count (or one greater than the upper bound) is rendered between []. In the trickier cases, where a lower bound is specified, a half-open range is used (eg: lower bound 1, count 2 would be "[1, 3)" and an unknown parts use a '?' (eg: "[1, ?)" or "[?, 7)" or "[?, ? + 3)").
Reviewers: aprantl, probinson, JDevlieghere
Differential Revision: https://reviews.llvm.org/D55721
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349670
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Voss [Wed, 19 Dec 2018 19:07:45 +0000 (19:07 +0000)]
[ThinLTO] Remove dllimport attribute from locally defined symbols
Summary:
The LTO/ThinLTO driver currently creates invalid bitcode by setting
symbols marked dllimport as dso_local. The compiler often has access
to the definition (often dllexport) and the declaration (often
dllimport) of an object at link-time, leading to a conflicting
declaration. This patch resolves the inconsistency by removing the
dllimport attribute.
Reviewers: tejohnson, pcc, rnk, echristo
Reviewed By: rnk
Subscribers: dmikulin, wristow, mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, dang, llvm-commits
Differential Revision: https://reviews.llvm.org/D55627
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349667
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 19 Dec 2018 19:01:36 +0000 (19:01 +0000)]
[GlobalISel][AArch64] Add support for @llvm.ceil
This adds a G_FCEIL generic instruction and uses it in AArch64. This adds
selection for floating point ceil where it has a supported, dedicated
instruction. Other cases aren't handled here.
It updates the relevant gisel tests and adds a select-ceil test. It also adds a
check to arm64-vcvt.ll which ensures that we don't fall back when we run into
one of the relevant cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349664
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Wed, 19 Dec 2018 18:57:43 +0000 (18:57 +0000)]
[llvm-mca] Rename an error variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349662
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 19 Dec 2018 18:49:13 +0000 (18:49 +0000)]
[X86] Don't match TESTrr from (cmp (and X, Y), 0) during isel. Defer to post processing
The (cmp (and X, Y) 0) pattern is greedy and ends up forming a TESTrr and consuming the and when it might be better to use one of the BMI/TBM like BLSR or BLSI.
This patch moves removes the pattern from isel and adds a post processing check to combine TESTrr+ANDrr into just a TESTrr. With this patch we are able to select the BMI/TBM instructions, but we'll also emit a TESTrr when the result is compared to 0. In many cases the peephole pass will be able to use optimizeCompareInstr to remove the TEST, but its probably not perfect.
Differential Revision: https://reviews.llvm.org/D55870
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349661
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 19 Dec 2018 18:45:57 +0000 (18:45 +0000)]
[X86] Fix assert fails in pass X86AvoidSFBPass
Fixes https://bugs.llvm.org/show_bug.cgi?id=38743
The function removeRedundantBlockingStores is supposed to remove any blocking stores contained in each other in lockingStoresDispSizeMap.
But it currently looks only at the previous one, which will miss some cases that result in assert.
This patch refine the function to check all previous layouts until find the uncontained one. So all redundant stores will be removed.
Patch by Pengfei Wang
Differential Revision: https://reviews.llvm.org/D55642
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349660
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Wed, 19 Dec 2018 18:27:05 +0000 (18:27 +0000)]
[llvm-mca] Add an error handler for error from parseCodeRegions
Summary:
It's a bit tricky to add a test for the failing path right now, binary support will have an easier path to exercise the path here.
* Ran clang-format.
Reviewers: andreadb
Reviewed By: andreadb
Subscribers: tschuett, gbedwell, llvm-commits
Differential Revision: https://reviews.llvm.org/D55803
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349659
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandre Ganea [Wed, 19 Dec 2018 18:01:42 +0000 (18:01 +0000)]
Revert r349517 "[CMake] Default options for faster executables on MSVC"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349656
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandre Ganea [Wed, 19 Dec 2018 17:57:31 +0000 (17:57 +0000)]
Revert r349517 "[CMake] Default options for faster executables on MSVC"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349654
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 19 Dec 2018 17:37:51 +0000 (17:37 +0000)]
[AArch64] Improve the Exynos M3 pipeline model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349652
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 19 Dec 2018 17:37:14 +0000 (17:37 +0000)]
[llvm-mca] Split test (NFC)
Split the Exynos test of the register offset addressing mode into separate
loads and stores tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349651
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 19 Dec 2018 17:24:34 +0000 (17:24 +0000)]
Regenerate test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349646
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Afanasyev [Wed, 19 Dec 2018 17:18:40 +0000 (17:18 +0000)]
Test commit
Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349644
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 19 Dec 2018 17:18:27 +0000 (17:18 +0000)]
[X86] Remove already upgraded llvm.x86.avx512.mask.padds/psubs tests
Duplicate tests have already been moved to avx512bw-intrinsics-upgrade.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349643
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 19 Dec 2018 16:49:18 +0000 (16:49 +0000)]
[ValueTracking] remove unused parameters from helper functions; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349641
91177308-0d34-0410-b5e6-
96231b3b80d8
Yonghong Song [Wed, 19 Dec 2018 16:40:25 +0000 (16:40 +0000)]
[BPF] Generate BTF DebugInfo under BPF target
This patch implements BTF (BPF Type Format).
The BTF is the debug info format for BPF, introduced
in the below linux patch:
https://github.com/torvalds/linux/commit/
69b693f0aefa0ed521e8bd02260523b5ae446ad7#diff-
06fb1c8825f653d7e539058b72c83332
and further extended several times, e.g.,
https://www.spinics.net/lists/netdev/msg534640.html
https://www.spinics.net/lists/netdev/msg538464.html
https://www.spinics.net/lists/netdev/msg540246.html
The main advantage of implementing in LLVM is:
. better integration/deployment as no extra tools are needed.
. bpf JIT based compilation (like bcc, bpftrace, etc.) can get
BTF without much extra effort.
. BTF line_info needs selective source codes, which can be
easily retrieved when inside the compiler.
This patch implemented BTF generation by registering a BPF
specific DebugHandler in BPFAsmPrinter.
Signed-off-by: Yonghong Song <yhs@fb.com>
Differential Revision: https://reviews.llvm.org/D55752
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349640
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 19 Dec 2018 16:38:16 +0000 (16:38 +0000)]
[gn build] Merge r349605
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349638
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Wu [Wed, 19 Dec 2018 16:15:05 +0000 (16:15 +0000)]
[Object] Deduplicate long archive member names
Summary:
Import libraries as created by llvm-dlltool always use the same archive
member name for every object file (namely, the DLL library name). Ensure
that long names are not repeatedly stored in the string table.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D55860
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349637
91177308-0d34-0410-b5e6-
96231b3b80d8
Amy Kwan [Wed, 19 Dec 2018 15:21:07 +0000 (15:21 +0000)]
Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349633
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 19 Dec 2018 14:43:36 +0000 (14:43 +0000)]
[X86][SSE] Auto upgrade PADDUS/PSUBUS intrinsics to UADD_SAT/USUB_SAT generic intrinsics (llvm)
Now that we use the generic ISD opcodes, we can use the generic intrinsics directly as well. This fixes the poor fast-isel codegen by not expanding to an easily broken IR code sequence.
I'm intending to deal with the signed saturation equivalents as well.
Clang counterpart: https://reviews.llvm.org/D55879
Differential Revision: https://reviews.llvm.org/D55855
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349630
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 19 Dec 2018 14:09:38 +0000 (14:09 +0000)]
[SelectionDAG] Optional handling of UNDEF elements in matchBinaryPredicate (part 2 of 2)
Now that SimplifyDemandedBits/SimplifyDemandedVectorElts is simplifying vector elements, we're seeing more constant BUILD_VECTOR containing undefs.
This patch provides opt-in support for UNDEF elements in matchBinaryPredicate, passing NULL instead of the result ConstantSDNode* argument.
I've updated the (or (and X, c1), c2) -> (and (or X, c2), c1|c2) fold to demonstrate its use, which I believe is safe for undef cases.
Differential Revision: https://reviews.llvm.org/D55822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349629
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 19 Dec 2018 14:09:09 +0000 (14:09 +0000)]
[SelectionDAG] Optional handling of UNDEF elements in matchBinaryPredicate (part 1 of 2)
Now that SimplifyDemandedBits/SimplifyDemandedVectorElts is simplifying vector elements, we're seeing more constant BUILD_VECTOR containing undefs.
This patch provides opt-in support for UNDEF elements in matchBinaryPredicate, passing NULL instead of the result ConstantSDNode* argument.
Differential Revision: https://reviews.llvm.org/D55822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349628
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 19 Dec 2018 13:37:59 +0000 (13:37 +0000)]
[TargetLowering] Fix propagation of undefs in zero extension ops (PR40091)
As described on PR40091, we have several places where zext (and zext_vector_inreg) fold an undef input into an undef output. For zero extensions this is incorrect as the output should guarantee to least have the new upper bits set to zero.
SimplifyDemandedVectorElts is the worst offender (and its the most likely to cause new undefs to appear) but DAGCombiner's tryToFoldExtendOfConstant has a similar issue.
Thanks to @dmgreen for catching this.
Differential Revision: https://reviews.llvm.org/D55883
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349625
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 19 Dec 2018 13:35:53 +0000 (13:35 +0000)]
Let TableGen write output only if it changed, instead of doing so in cmake, attempt 2
This relands r330742:
"""
Let TableGen write output only if it changed, instead of doing so in cmake.
Removes one subprocess and one temp file from the build for each tablegen
invocation.
No intended behavior change.
"""
In particular, if you see rebuilds after this change that you didn't see
before this change, that's unintended and it's fine to revert this change
again (but let me know).
r330742 got reverted because some people reported that llvm-tblgen ran on every
build after it. This could happen if the depfile output got deleted without
deleting the main .inc output. To fix, make TableGen always write the depfile,
but keep writing the main .inc output only if it has changed. This matches what
we did in cmake before.
Differential Revision: https://reviews.llvm.org/D55842
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349624
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Wed, 19 Dec 2018 12:13:21 +0000 (12:13 +0000)]
Fix test MC/AMDGPU/reloc.s
Missed this change in r349620
Change-Id: I5123e31ed4bb99ad6903b9ede4de4dbe2cc6d453
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349622
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 19 Dec 2018 12:00:25 +0000 (12:00 +0000)]
[X86][SSE] Remove use of SSE ADDS/SUBS saturation intrinsics from schedule/stack tests
These are due to be upgraded soon, but good to replace them with generic llvm sadd_sat/ssub_sat intrinsics now.
The avx512 masked cases need doing as well but require a bit of tidyup first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349621
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Wed, 19 Dec 2018 11:55:03 +0000 (11:55 +0000)]
AMDGPU: Use an ABS32_LO relocation for SCRATCH_RSRC_DWORD1
Summary:
Using HI here makes no logical sense, since the dword is only
32 bits to begin with.
Current Mesa master does not look at the relocation type at all,
so this change is fine. Future Mesa will rely on this, however.
Change-Id: I91085707834c4ac0370926602b93c94b90e44cb1
Reviewers: arsenm, rampitec, mareko
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D55369
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349620
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 19 Dec 2018 10:44:49 +0000 (10:44 +0000)]
[llvm-objdump] - Fix one more BB.
Should fix the http://lab.llvm.org:8011/builders/polly-amd64-linux/builds/25876/steps/build/logs/stdio:
/home/grosser/buildslave/polly-amd64-linux/llvm.src/tools/llvm-objdump/llvm-objdump.cpp:539:25: error: conditional expression is ambiguous; 'std::string' (aka 'basic_string<char>') can be converted to 'typename std::remove_reference<StringRef>::type' (aka 'llvm::StringRef') and vice versa
Target = Demangle ? demangle(*SymName) : *SymName;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349617
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 19 Dec 2018 10:41:06 +0000 (10:41 +0000)]
[SelectionDAG] Optional handling of UNDEF elements in matchUnaryPredicate
Now that SimplifyDemandedBits/SimplifyDemandedVectorElts are simplifying vector elements, we're seeing more constant BUILD_VECTOR containing UNDEFs.
This patch provides opt-in handling of UNDEF elements in matchUnaryPredicate, passing NULL instead of the ConstantSDNode* argument.
I've updated SelectionDAG::simplifyShift to demonstrate its use.
Differential Revision: https://reviews.llvm.org/D55819
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349616
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 19 Dec 2018 10:39:14 +0000 (10:39 +0000)]
[X86][SSE] Remove SSE ADDUS/SUBUS saturation intrinsics from schedule/stack tests
These are already being autoupgraded, currently to an IR sequence, but best to replace them with generic llvm uadd_sat/usub_sat intrinsics (which D55855 will be doing shortly anyhow).
The avx512 masked cases need doing as well but require a bit of tidyup first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349615
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 19 Dec 2018 10:29:35 +0000 (10:29 +0000)]
[llvm-objdump] - Fix BB.
Move the helper method before the first incocation in the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349614
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 19 Dec 2018 10:21:45 +0000 (10:21 +0000)]
[llvm-objdump] - Demangle the symbols when printing symbol table and relocations.
This is https://bugs.llvm.org/show_bug.cgi?id=40009,
llvm-objdump does not demangle the symbols when prints symbol
table and/or relocations.
Patch teaches it to do that.
Differential revision: https://reviews.llvm.org/D55821
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349613
91177308-0d34-0410-b5e6-
96231b3b80d8
Carl Ritson [Wed, 19 Dec 2018 10:17:49 +0000 (10:17 +0000)]
AMDGPU/InsertWaitcnts: Update VGPR/SGPR bounds when brackets are merged
Summary:
Fix an issue where VGPR/SGPR bounds are not properly extended when brackets are merged.
This manifests as missing waitcnt insertions when multiple brackets are forwarded to a successor block and the first forward has lower VGPR/SGPR bounds.
Irreducible loop test has been extended based on a CTS failure detected for GFX9.
Reviewers: nhaehnle
Reviewed By: nhaehnle
Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D55602
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349611
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 19 Dec 2018 09:55:10 +0000 (09:55 +0000)]
[ARM GlobalISel] Support G_CONSTANT for Thumb2
All we have to do is mark it as legal.
This allows us to select a lot of new patterns handled by TableGen. This
patch adds tests for them and splits up the existing test file for
binary operators into 2 files, one for arithmetic ops and one for
logical ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349610
91177308-0d34-0410-b5e6-
96231b3b80d8