Martin Storsjo [Tue, 2 Jan 2018 22:11:30 +0000 (22:11 +0000)]
Reland [PPC64] Port to ppc64le - initial version
Initial working version of libunwind for PowerPC 64. Tested on
little-endian ppc64 host only.
Based on the existing PowerPC 32 code.
It supports:
- context save/restore (unw_getcontext, unw_init_local, unw_resume)
- read/write from/to saved registers
- backtrace (unw_step)
Patch by Leandro Lupori!
Differential Revision: https://reviews.llvm.org/D41386
Now builds with LIBUNWIND_ENABLE_CROSS_UNWINDING=ON should
work.
llvm-svn: 321680
Martin Storsjo [Tue, 2 Jan 2018 22:11:22 +0000 (22:11 +0000)]
Don't use a strict larger-than comparison in the check_fit/does_fit static assert
For builds that only target one architecture, this was required to
be an exact match, while it previously required the allocation to be
strictly larger than the largest concrete one. Requiring it to be
larger than on equal should be enough.
This makes it more straightforward to update _LIBUNWIND_CONTEXT_SIZE
and _LIBUNWIND_CURSOR_SIZE.
llvm-svn: 321679
Tim Shen [Tue, 2 Jan 2018 22:04:03 +0000 (22:04 +0000)]
Revert `rL321667: [PPC64] Port to ppc64le - initial version`
Differential Revision: https://reviews.llvm.org/D41386
llvm-svn: 321678
Evgeniy Stepanov [Tue, 2 Jan 2018 21:35:23 +0000 (21:35 +0000)]
[asan] Restore asan_device_setup compatibility with older libraries.
Summary:
This way new asan_device_setup, which knows about the quirks of
recent releases of Android, can be used with older ASan runtime
library (say, from an NDK release). The library is version locked to
the compiler, and is often hard or impossible to update.
Reviewers: vitalybuka
Subscribers: srhines, kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D41679
llvm-svn: 321677
Reid Kleckner [Tue, 2 Jan 2018 21:34:16 +0000 (21:34 +0000)]
[WinEH] Allow for multiple terminatepads
Fixes verifier errors with Windows EH and OpenMP, which injects a
terminate scope around parallel blocks.
Fixes PR35778
llvm-svn: 321676
Joachim Protze [Tue, 2 Jan 2018 21:09:00 +0000 (21:09 +0000)]
[OMPT] Build runtime with OMPT support by default
This patch enables OMPT by default if version 50 or later is built and the config says, that OMPT will be supported.
Differential Revision: https://reviews.llvm.org/D41508
llvm-svn: 321675
Andrew Kaylor [Tue, 2 Jan 2018 21:04:38 +0000 (21:04 +0000)]
Handle the case of live 16-bit subregisters in X86FixupBWInsts
Differential Revision: https://reviews.llvm.org/D40524
Change-Id: Ie3a405b28503ceae999f5f3ba07a68fa733a2400
llvm-svn: 321674
Sanjay Patel [Tue, 2 Jan 2018 21:04:08 +0000 (21:04 +0000)]
[AArch64] fix typos in comments; NFC
llvm-svn: 321673
Sanjay Patel [Tue, 2 Jan 2018 20:56:45 +0000 (20:56 +0000)]
[ValueTracking] recognize min/max of min/max patterns
This is part of solving PR35717:
https://bugs.llvm.org/show_bug.cgi?id=35717
The larger IR optimization is proposed in D41603, but we can show
the improvement in ValueTracking using codegen tests because
SelectionDAG creates min/max nodes based on ValueTracking.
Any target with min/max ops should show wins here. I chose AArch64
vector ops because they're clean and uniform.
Some Alive proofs for the tests (can't put more than 2 tests in 1
page currently because the web app says it's too long):
https://rise4fun.com/Alive/WRN
https://rise4fun.com/Alive/iPm
https://rise4fun.com/Alive/HmY
https://rise4fun.com/Alive/CNm
https://rise4fun.com/Alive/LYf
llvm-svn: 321672
Douglas Yung [Tue, 2 Jan 2018 20:45:29 +0000 (20:45 +0000)]
[DOXYGEN] Fix doxygen and content issues in smmintrin.h
- Fix formatting issue due to hyphenated terms at line breaks.
- Fix typo
This patch was made by Craig Flores
Differential Revision: https://reviews.llvm.org/D41520
llvm-svn: 321671
Douglas Yung [Tue, 2 Jan 2018 20:42:53 +0000 (20:42 +0000)]
[DOXYGEN] Fix doxygen and content issues in pmmintrin.h
- Fix incorrect wording in various intrinsic descriptions. Previously the descriptions used "low-order" and "high-order" when the intended meaning was "even-indexed" and "odd-indexed".
This patch was made by Craig Flores
Differential Revision: https://reviews.llvm.org/D41518
llvm-svn: 321670
Douglas Yung [Tue, 2 Jan 2018 20:39:29 +0000 (20:39 +0000)]
[DOXYGEN] Fix doxygen and content issues in emmintrin.h
- Fixed innaccurate instruction mappings for various intrinsics.
- Fixed description of NaN handling in comparison intrinsics.
- Unify description of _mm_store_pd1 to match _mm_store1_pd.
- Fix incorrect wording in various intrinsic descriptions. Previously the descriptions used "low-order" and "high-order" when the intended meaning was "even-indexed" and "odd-indexed".
- Fix typos.
- Add missing italics command (\a) for params and fixed some parameter spellings.
This patch was made by Craig Flores
Differential Revision: https://reviews.llvm.org/D41516
llvm-svn: 321669
Sanjay Patel [Tue, 2 Jan 2018 20:16:45 +0000 (20:16 +0000)]
[AArch64] add tests for min/max of min/max (PR35717); NFC
llvm-svn: 321668
Martin Storsjo [Tue, 2 Jan 2018 20:10:54 +0000 (20:10 +0000)]
[PPC64] Port to ppc64le - initial version
Initial working version of libunwind for PowerPC 64. Tested on
little-endian ppc64 host only.
Based on the existing PowerPC 32 code.
It supports:
- context save/restore (unw_getcontext, unw_init_local, unw_resume)
- read/write from/to saved registers
- backtrace (unw_step)
Patch by Leandro Lupori!
Differential Revision: https://reviews.llvm.org/D41386
llvm-svn: 321667
Marshall Clow [Tue, 2 Jan 2018 19:23:30 +0000 (19:23 +0000)]
One more (should be) inline variable that is defined in the dylib
llvm-svn: 321666
Nick Lewycky [Tue, 2 Jan 2018 19:10:12 +0000 (19:10 +0000)]
Suppress undefined-template warnings when the pattern is declared in a system header.
The way to fix an undefined-template warning is to add lines to the header file that defines the template pattern. We should suppress the warnings when the template pattern is in a system header because we don't expect users to edit those.
llvm-svn: 321665
Marshall Clow [Tue, 2 Jan 2018 19:01:45 +0000 (19:01 +0000)]
Un-inline a few more variables that are exported from the dylib.
llvm-svn: 321664
Marshall Clow [Tue, 2 Jan 2018 18:57:47 +0000 (18:57 +0000)]
Temporarily revert the inlining of 'piecewise_construct' because it is exported from the dylib.
llvm-svn: 321663
Amara Emerson [Tue, 2 Jan 2018 18:56:39 +0000 (18:56 +0000)]
[AArch64][GlobalISel] Fix assert fail with unknown intrinsic.
A call may have an intrinsic name but not have a valid intrinsic ID,
for example with llvm.invariant.group.barrier. If so, treat it as a
normal call like FastISel does.
llvm-svn: 321662
Marshall Clow [Tue, 2 Jan 2018 18:41:01 +0000 (18:41 +0000)]
A couple more inlined variables that I missed the first time
llvm-svn: 321661
Volodymyr Sapsai [Tue, 2 Jan 2018 18:02:19 +0000 (18:02 +0000)]
[Sema] Don't emit the -Wstrict-prototypes warning for variadic functions.
rdar://problem/
33251668
Reviewers: arphaman, ahatanak
Reviewed By: arphaman
Subscribers: ptitei, cfe-commits
Differential Revision: https://reviews.llvm.org/D41528
llvm-svn: 321660
Jonas Hahnfeld [Tue, 2 Jan 2018 17:53:08 +0000 (17:53 +0000)]
[opt-viewer] Check for pygments.lexer.c_cpp
Some systems still don't have this module which was introduced in
version 2.0 (CentOS 7, sigh).
Differential Revision: https://reviews.llvm.org/D41611
llvm-svn: 321659
Marshall Clow [Tue, 2 Jan 2018 17:17:01 +0000 (17:17 +0000)]
Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later).
llvm-svn: 321658
Rafael Espindola [Tue, 2 Jan 2018 16:46:30 +0000 (16:46 +0000)]
Align SHT_NOBITS sections is they are the first on a PT_LOAD.
We normally want to ignore SHT_NOBITS sections when computing
offsets. The sh_offset of section itself seems to be irrelevant and
- If the section is in the middle of a PT_LOAD, it will make no
difference on the computed offset of the followup section.
- If it is in the end of a PT_LOAD, we want to avoid its alignment
changing the offset of the followup sections.
The issue is if it is at the start of the PT_LOAD. In that case we do
have to align it so that the following sections have congruent address
and offset module the page size. We were not handling this case.
This should fix freebsd kernel link.
llvm-svn: 321657
Sanjay Patel [Tue, 2 Jan 2018 16:38:29 +0000 (16:38 +0000)]
[x86] allow pairs of PCMPEQ for vector-sized integer equality comparisons (PR33325)
This is an extension of D31156 with the goal that we'll allow memcmp() == 0 expansion
for x86 to use 2 pairs of loads per block.
The memcmp expansion pass (formerly part of CGP) will generate this kind of pattern
with oversized integer compares, so we want to transform these into x86-specific vector
nodes before legalization splits things into scalar chunks.
See PR33325 for more details:
https://bugs.llvm.org/show_bug.cgi?id=33325
Differential Revision: https://reviews.llvm.org/D41618
llvm-svn: 321656
Amara Emerson [Tue, 2 Jan 2018 16:30:47 +0000 (16:30 +0000)]
[AArch64][GlobalISel] Enable GlobalISel at -O0 by default
Tests updated to explicitly use fast-isel at -O0 instead of implicitly.
This change also allows an explicit -fast-isel option to override an
implicitly enabled global-isel. Otherwise -fast-isel would have no effect at -O0.
Differential Revision: https://reviews.llvm.org/D41362
llvm-svn: 321655
Davide Italiano [Tue, 2 Jan 2018 16:27:01 +0000 (16:27 +0000)]
[Core/Debugger] Remove some code that doesn't compile anymore.
llvm-svn: 321654
Anna Thomas [Tue, 2 Jan 2018 16:25:50 +0000 (16:25 +0000)]
[BasicBlockUtils] Check for unreachable preds before updating LI in UpdateAnalysisInformation
Summary:
We are incorrectly updating the LI when loop-simplify generates
dedicated exit blocks for a loop. The issue is that there's an implicit
assumption that the Preds passed into UpdateAnalysisInformation are
reachable. However, this is not true and breaks LI by incorrectly
updating the header of a loop.
One such case is when we generate dedicated exits when the exit block is
a landing pad (through SplitLandingPadPredecessors). There maybe other
cases as well, since we do not guarantee that Preds passed in are
reachable basic blocks.
The added test case shows how loop-simplify breaks LI for the outer loop (and DT in turn)
after we try to generate the LoopSimplifyForm.
Reviewers: davide, chandlerc, sanjoy
Reviewed By: davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41519
llvm-svn: 321653
Davide Italiano [Tue, 2 Jan 2018 16:24:30 +0000 (16:24 +0000)]
[MacOSX-Kernel] Remove broken KDP_IMAGEPATH support.
llvm-svn: 321652
Davide Italiano [Tue, 2 Jan 2018 16:22:09 +0000 (16:22 +0000)]
[ARM64] Remove unused function. NFCI.
llvm-svn: 321651
Krzysztof Parzyszek [Tue, 2 Jan 2018 15:28:49 +0000 (15:28 +0000)]
[Hexagon] Fix generation of vector sign extensions
llvm-svn: 321650
Daniel Jasper [Tue, 2 Jan 2018 14:38:52 +0000 (14:38 +0000)]
Revert r321089: "[DAG] Elide overlapping store" (and subsequent fix in r321204)
Our internal testing has revealed has discovered bugs in PPC builds.
I have forward reproduction instructions to the original author (Nirav).
llvm-svn: 321649
Dmitry Venikov [Tue, 2 Jan 2018 14:13:16 +0000 (14:13 +0000)]
NFC. Add description comments to Function header
Reviewers: ruiu, davidxl, silvas, brzycki
Reviewed By: brzycki
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41609
llvm-svn: 321648
Filipe Cabecinhas [Tue, 2 Jan 2018 13:46:12 +0000 (13:46 +0000)]
Revert "ASan+operator new[]: Fix operator new[] cookie poisoning"
This reverts r321645.
I missed a compiler-rt test that needs updating.
llvm-svn: 321647
Sander de Smalen [Tue, 2 Jan 2018 13:39:44 +0000 (13:39 +0000)]
[AArch64][AsmParser] Add isScalarReg() and repurpose isReg()
Summary:
isReg() in AArch64AsmParser.cpp is a bit of a misnomer, and would be better named 'isScalarReg()' instead.
Patch [1/3] in a series to add operand constraint checks for SVE's predicated ADD/SUB.
Reviewers: rengolin, mcrosier, evandro, fhahn, echristo
Reviewed By: fhahn
Subscribers: aemerson, javed.absar, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D41445
llvm-svn: 321646
Filipe Cabecinhas [Tue, 2 Jan 2018 13:21:50 +0000 (13:21 +0000)]
ASan+operator new[]: Fix operator new[] cookie poisoning
Summary:
The C++ Itanium ABI says:
No cookie is required if the new operator being used is ::operator new[](size_t, void*).
We should only avoid poisoning the cookie if we're calling this
operator, not others. This is dealt with before the call to
InitializeArrayCookie.
Reviewers: rjmccall, kcc, rsmith
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D41301
llvm-svn: 321645
Simon Pilgrim [Tue, 2 Jan 2018 12:41:29 +0000 (12:41 +0000)]
Strip trailing whitespace. NFCI
llvm-svn: 321644
Alex Bradbury [Tue, 2 Jan 2018 12:09:29 +0000 (12:09 +0000)]
[RISCV] Add Defs Uses information for c.jal and c.addi4spn
Differential Revision: https://reviews.llvm.org/D41339
Patch by Shiva Chen.
llvm-svn: 321643
Alex Bradbury [Tue, 2 Jan 2018 11:54:59 +0000 (11:54 +0000)]
[RISCV][NFC] Resolve unused variable warning in RISCVISelLowering
XLenVT in LowerFormalArguments is used only in an assert.
llvm-svn: 321642
Sam Parker [Tue, 2 Jan 2018 10:19:01 +0000 (10:19 +0000)]
[DAGCombine] Fix for PR35765
Remove the acceptance of ANY_EXTEND nodes while trying to move and
nodes back to loads.
Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=35765
Differential Revision: https://reviews.llvm.org/D41625
llvm-svn: 321641
Sam Parker [Tue, 2 Jan 2018 10:14:00 +0000 (10:14 +0000)]
[X86] Codegen test for pr35765
Committing reproducer test for pr35765, fix to follow.
llvm-svn: 321640
Sam McCall [Tue, 2 Jan 2018 09:35:10 +0000 (09:35 +0000)]
[Driver] Fix unused variables and test-writing-into-workdir after r321621
llvm-svn: 321639
Craig Topper [Tue, 2 Jan 2018 07:30:53 +0000 (07:30 +0000)]
[SelectionDAG] Teach WidenVecOp_Convert to widen the operation if a widened result type would still be legal.
llvm-svn: 321638
Dmitry Venikov [Tue, 2 Jan 2018 05:58:11 +0000 (05:58 +0000)]
[InstCombine] Missed optimization in math expression: squashing sqrt functions
Summary: This patch enables folding under -ffast-math flag sqrt(a) * sqrt(b) -> sqrt(a*b)
Reviewers: hfinkel, spatel, davide
Reviewed By: spatel, davide
Subscribers: davide, llvm-commits
Differential Revision: https://reviews.llvm.org/D41322
llvm-svn: 321637
Dmitry Venikov [Tue, 2 Jan 2018 05:47:42 +0000 (05:47 +0000)]
Test commit
Reviewers: Quolyk
Reviewed By: Quolyk
Differential Revision: https://reviews.llvm.org/D41561
llvm-svn: 321636
Craig Topper [Tue, 2 Jan 2018 01:55:07 +0000 (01:55 +0000)]
[SelectionDAG] Remove ifs on getTypeAction being TypeWidenVector from some of the WideVecOp handlers.
We should only be in the handler if the tyep action is TypeWidenVector. There's no reason to try to do anything else.
llvm-svn: 321635
Simon Pilgrim [Mon, 1 Jan 2018 22:44:59 +0000 (22:44 +0000)]
[ValueTracking] Don't assume shift values are in range
Reduced (as best I could...) from oss-fuzz #4857 test case
llvm-svn: 321634
Simon Pilgrim [Mon, 1 Jan 2018 22:27:49 +0000 (22:27 +0000)]
[InstCombine] Regenerate udiv tests.
llvm-svn: 321633
Craig Topper [Mon, 1 Jan 2018 21:12:18 +0000 (21:12 +0000)]
[X86] Promote vXi1 fp_to_uint/fp_to_sint to vXi32 to avoid scalarization.
llvm-svn: 321632
Craig Topper [Mon, 1 Jan 2018 21:12:10 +0000 (21:12 +0000)]
[X86] Add test cases for vXi1 fptosi/fptoui.
Currently we do a lot of scalarization in these test cases.
llvm-svn: 321631
Craig Topper [Mon, 1 Jan 2018 20:08:43 +0000 (20:08 +0000)]
[X86] Replace custom lowering of vXi1 SINT_TO_FP/UINT_TO_FP with promotion.
The custom lowering was just doing the same thing promotion would do.
llvm-svn: 321630
Craig Topper [Mon, 1 Jan 2018 19:21:35 +0000 (19:21 +0000)]
[SelectionDAG][X86][AArch64] Require targets to specify the promotion type when using setOperationAction Promote for INT_TO_FP and FP_TO_INT
Currently the promotion for these ignores the normal getTypeToPromoteTo and instead just tries to double the element width. This is because the default behavior of getTypeToPromote to just adds 1 to the SimpleVT, which has the affect of increasing the element count while keeping the scalar size the same.
If multiple steps are required to get to a legal operation type, int_to_fp will be promoted multiple times. And fp_to_int will keep trying wider types in a loop until it finds one that works.
getTypeToPromoteTo does have the ability to query a promotion map to get the type and not do the increasing behavior. It seems better to just let the target specify the promotion type in the map explicitly instead of letting the legalizer iterate via widening.
FWIW, it's worth I think for any other vector operations that need to be promoted, we have to specify the type explicitly because the default behavior of getTypeToPromote isn't useful for vectors. The other types of promotion already require either the element count is constant or the total vector width is constant, but neither happens by incrementing the SimpleVT enum.
Differential Revision: https://reviews.llvm.org/D40664
llvm-svn: 321629
Faisal Vali [Mon, 1 Jan 2018 18:23:28 +0000 (18:23 +0000)]
Again reverting an attempt to convert the DeclSpec enums into scoped enums.
- reverts r321622, r321625, and r321626.
- the use of bit-fields is still resulting in warnings - even though we can use static-asserts to harden the code and ensure the bit-fields are wide enough. The bots still complain of warnings being seen.
- to silence the warnings requires specifying the bit-fields with the underlying enum type (as opposed to the enum type itself), which then requires lots of unnecessary static casts of each enumerator within DeclSpec to the underlying-type, which even though could be seen as implementation details, it does hamper readability - and given the additional litterings, makes me question the value of the change.
So in short - I give up (for now at least).
Sorry about the noise.
llvm-svn: 321628
Jonas Hahnfeld [Mon, 1 Jan 2018 18:19:06 +0000 (18:19 +0000)]
[scudo] Touch memory to count as RSS
This should fix the test from https://reviews.llvm.org/D41128.
Differential Revision: https://reviews.llvm.org/D41649
llvm-svn: 321627
Benjamin Kramer [Mon, 1 Jan 2018 17:07:23 +0000 (17:07 +0000)]
[Sema] Fix build with GCC
tools/clang/lib/Sema/DeclSpec.cpp: In member function 'void clang::DeclSpec::Finish(clang::Sema&, const clang::PrintingPolicy&)':
tools/clang/lib/Sema/DeclSpec.cpp:1116:8: error: could not convert 'clang::DeclSpec::TSW_unspecified' from 'const TSW {aka const clang::TypeSpecifierWidth}' to 'int'
tools/clang/lib/Sema/DeclSpec.cpp:1117:8: error: could not convert 'clang::DeclSpec::TSW_short' from 'const TSW {aka const clang::TypeSpecifierWidth}' to 'int'
tools/clang/lib/Sema/DeclSpec.cpp:1118:8: error: could not convert 'clang::DeclSpec::TSW_longlong' from 'const TSW {aka const clang::TypeSpecifierWidth}' to 'int'
tools/clang/lib/Sema/DeclSpec.cpp:1128:8: error: could not convert 'clang::DeclSpec::TSW_long' from 'const TSW {aka const clang::TypeSpecifierWidth}' to 'int'
llvm-svn: 321626
Faisal Vali [Mon, 1 Jan 2018 16:36:47 +0000 (16:36 +0000)]
Use 'unsigned int' instead of enum bit-fields to silence some warnings from r321622
- bots were complaining that the bit-field width was less than the width of the underlying type (note, underlying types of enums can not be bit-fields)
- add static_asserts for TSS and TSW to ensure that the bit-fields can hold all the enumerators - and add comments next to the last enumerator warning not to reorder.
See https://reviews.llvm.org/rC321622 for the patch that introduced the warnings.
llvm-svn: 321625
Sanjay Patel [Mon, 1 Jan 2018 16:36:47 +0000 (16:36 +0000)]
[x86] add runs for more vector variants; NFC
Preliminary step to see what the effects of D41618 look like.
llvm-svn: 321624
Serge Pavlov [Mon, 1 Jan 2018 15:53:16 +0000 (15:53 +0000)]
Fixed markup formatting
llvm-svn: 321623
Faisal Vali [Mon, 1 Jan 2018 15:42:13 +0000 (15:42 +0000)]
[NFC] Modernize enums TypeSpecifierWidth, TypeSpecifierSign & TypeSpecifierType into scoped enums with underlying types.
- Since these enums are used as bit-fields - for the bit-fields to be interpreted as unsigned, the underlying type must be specified as unsigned.
Previous failed attempt - wherein I did not specify an underlying type - was the sum of:
https://reviews.llvm.org/rC321614
https://reviews.llvm.org/rC321615
llvm-svn: 321622
Serge Pavlov [Mon, 1 Jan 2018 13:27:01 +0000 (13:27 +0000)]
Enable configuration files in clang
Clang is inherently a cross compiler and can generate code for any target
enabled during build. It however requires to specify many parameters in the
invocation, which could be hardcoded during configuration process in the
case of single-target compiler. The purpose of configuration files is to
make specifying clang arguments easier.
A configuration file is a collection of driver options, which are inserted
into command line before other options specified in the clang invocation.
It groups related options together and allows specifying them in simpler,
more flexible and less error prone way than just listing the options
somewhere in build scripts. Configuration file may be thought as a "macro"
that names an option set and is expanded when the driver is called.
Use of configuration files is described in `UserManual.rst`.
Differential Revision: https://reviews.llvm.org/D24933
llvm-svn: 321621
Simon Pilgrim [Mon, 1 Jan 2018 13:04:04 +0000 (13:04 +0000)]
[X86][SSE] Add test case from PR32160
llvm-svn: 321620
Uriel Korach [Mon, 1 Jan 2018 09:00:13 +0000 (09:00 +0000)]
[X86] Regenerate test checks in sse-intrinsics-x86-upgrade with update-llc
Removing outdated checks.
NFC
llvm-svn: 321619
Uriel Korach [Mon, 1 Jan 2018 08:47:50 +0000 (08:47 +0000)]
[X86] Regenerate test checks in sse2-intrinsics-x86-upgrade with update-llc
Removing outdated checks.
NFC
llvm-svn: 321618
Craig Topper [Mon, 1 Jan 2018 04:52:58 +0000 (04:52 +0000)]
[X86] In LowerTruncateVecI1, don't add SHL if the input is known to be all sign bits.
If the input is all sign bits then the LSB through MSB are all the same so we don't need to be move the LSB to the MSB.
llvm-svn: 321617
Faisal Vali [Mon, 1 Jan 2018 02:49:17 +0000 (02:49 +0000)]
Revert r321614 and r321615
- the enum changes to TypeSpecifierType are breaking some tests - and will require a more careful integration.
Sorry about rushing these changes - thought I could sneak them in prior to heading out for new years ;)
llvm-svn: 321616
Faisal Vali [Mon, 1 Jan 2018 02:35:43 +0000 (02:35 +0000)]
Add scope specifiers to updated scoped-enums (that I somehow missed in r321614)
llvm-svn: 321615
Faisal Vali [Mon, 1 Jan 2018 02:19:52 +0000 (02:19 +0000)]
[NFC] Modernize enums TypeSpecifierWidth, TypeSpecifierSign & TypeSpecifierType into scoped enums.
llvm-svn: 321614
Craig Topper [Mon, 1 Jan 2018 01:11:32 +0000 (01:11 +0000)]
[X86] Add missing NoVLX predicate around some patterns that use zmm registers to implement 128/256-bit operations without VLX.
llvm-svn: 321613
Craig Topper [Mon, 1 Jan 2018 01:11:29 +0000 (01:11 +0000)]
[X86] Add patterns for using zmm registers for v8i32/v8f32 vselect with the false input being zero.
We can use zmm move with zero masking for this. We already had patterns for using a masked move, but we didn't check for the zero masking case separately.
llvm-svn: 321612
Craig Topper [Sun, 31 Dec 2017 19:17:52 +0000 (19:17 +0000)]
[X86] Use CONCAT_VECTORS instead of INSERT_SUBVECTOR for padding v4i1/v2i1 vector to v8i1 pre-legalize.
The CONCAT_VECTORS will be lowered to INSERT_SUBVECTOR later. In the modified cases this seems to be enough to trick a later DAG combine into running in a different order than allows the ANDs to be removed.
I'll admit this is a bit of a hack that happens to work, but using CONCAT_VECTORS is more consistent with other legalization code anyway.
llvm-svn: 321611
Simon Pilgrim [Sun, 31 Dec 2017 18:59:30 +0000 (18:59 +0000)]
[X86][AVX2] Combine extract(broadcast(scalar_value)) --> scalar_value
As it has a scalar source we don't treat it as a target shuffle so needs special handling.
llvm-svn: 321610
Jacob Bandes-Storch [Sun, 31 Dec 2017 18:27:29 +0000 (18:27 +0000)]
[Sema] Improve diagnostics for const- and ref-qualified member functions
(Re-submission of D39937 with fixed tests.)
Adjust wording for const-qualification mismatch to be a little more clear.
Also add another diagnostic for a ref qualifier mismatch, which previously produced a useless error (this error path is simply very old; see rL119336):
Before:
error: cannot initialize object parameter of type 'X0' with an expression of type 'X0'
After:
error: 'this' argument to member function 'rvalue' is an lvalue, but function has rvalue ref-qualifier
Reviewers: aaron.ballman
Reviewed By: aaron.ballman
Subscribers: lebedev.ri, cfe-commits
Differential Revision: https://reviews.llvm.org/D41646
llvm-svn: 321609
Simon Pilgrim [Sun, 31 Dec 2017 17:16:48 +0000 (17:16 +0000)]
[X86][AVX] Add test case from PR33740
llvm-svn: 321608
Simon Pilgrim [Sun, 31 Dec 2017 17:07:47 +0000 (17:07 +0000)]
[X86][SSE] Don't vectorize splat buildvector of binops (PR30780)
Don't combine buildvector(binop(),binop(),binop(),binop()) -> binop(buildvector(), buildvector()) if its a splat - keep the binop scalar and just splat the result to avoid large vector constants.
llvm-svn: 321607
Davide Italiano [Sun, 31 Dec 2017 16:54:03 +0000 (16:54 +0000)]
[SimplifyCFG] Return to the pass manager the correct value.
I wanted to commit this with r321603, but I failed to squash
the two commits.
llvm-svn: 321606
Davide Italiano [Sun, 31 Dec 2017 16:51:50 +0000 (16:51 +0000)]
[Utils/Local] Use `auto` when the type is obvious. NFCI.
llvm-svn: 321605
Davide Italiano [Sun, 31 Dec 2017 16:48:44 +0000 (16:48 +0000)]
[Utils] Remove commented debug message. NFCI.
llvm-svn: 321604
Davide Italiano [Sun, 31 Dec 2017 16:47:16 +0000 (16:47 +0000)]
[SimplifyCFG] Stop hoisting musttail calls incorrectly.
PR35774.
llvm-svn: 321603
Craig Topper [Sun, 31 Dec 2017 09:50:38 +0000 (09:50 +0000)]
[X86] Add a DAG combine to widen (i4 (bitcast (v4i1))) before type legalization sees the i4 and changes to load/store.
Same for v2i1 and i2.
llvm-svn: 321602
Craig Topper [Sun, 31 Dec 2017 08:25:50 +0000 (08:25 +0000)]
[X86] Add a DAG combine to fix (v4i1 (bitcast (i4))) before type legalization sees the i4 and changes to load/store.
Same for i2 and v2i1.
llvm-svn: 321601
George Rimar [Sun, 31 Dec 2017 07:42:54 +0000 (07:42 +0000)]
[ELF] - Add missing dynamic tags when producing output with IRelative relocations only.
This is "Bug 35751 - .dynamic relocation entries omitted if output
contains only IFUNC relocations"
We have InX::RelaPlt and InX::RelaIPlt synthetic sections for PLT relocations.
They are usually live in rela.plt section. Problem appears when InX::RelaPlt
section is empty. In that case we did not produce normal set of dynamic tags
required, because logic was written in the way assuming we always have
non-IRelative relocations in rela.plt.
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D41592
llvm-svn: 321600
George Rimar [Sun, 31 Dec 2017 07:41:02 +0000 (07:41 +0000)]
[MC] - Stop ignoring invalid meta data symbols.
Previously llvm-mc would silently accept code from testcase,
that contains invalid metadata symbol in section declaration.
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D41641
llvm-svn: 321599
Craig Topper [Sun, 31 Dec 2017 07:38:41 +0000 (07:38 +0000)]
[X86] Prevent combining (v8i1 (bitconvert (i8 load)))->(v8i1 load) if we don't have DQI.
We end up using an i8 load via an isel pattern from v8i1 anyway. This just makes it more explicit. This seems to improve codgen in some cases and I'd like to kill off some of the load patterns.
llvm-svn: 321598
Craig Topper [Sun, 31 Dec 2017 07:38:36 +0000 (07:38 +0000)]
[X86] Remove patterns for load/store of vXi with bitcasts to/from integer.
This is better handled by a DAG combine if its not already being done. No lit tests fail from the removal of these patterns.
llvm-svn: 321597
Craig Topper [Sun, 31 Dec 2017 07:38:33 +0000 (07:38 +0000)]
[X86] Remove AND32ri8 from pattern for v1i1 load.
I don't think anything would actually expect the other bits to be zero.
llvm-svn: 321596
Craig Topper [Sun, 31 Dec 2017 07:38:30 +0000 (07:38 +0000)]
[X86] Fix a crash when returning a <1 x i1> value>
llvm-svn: 321595
Craig Topper [Sun, 31 Dec 2017 07:38:26 +0000 (07:38 +0000)]
[X86] Cleanup store splitting in LowerTruncatingStore
Use getMemBasePlusOffset and calculate proper pointer info and alignment for the second store.
llvm-svn: 321594
Jacob Bandes-Storch [Sun, 31 Dec 2017 05:13:03 +0000 (05:13 +0000)]
Reverted 321592: [Sema] Improve diagnostics for const- and ref-qualified member functions
A few tests need to be fixed
llvm-svn: 321593
Jacob Bandes-Storch [Sun, 31 Dec 2017 04:49:39 +0000 (04:49 +0000)]
[Sema] Improve diagnostics for const- and ref-qualified member functions
Summary:
Adjust wording for const-qualification mismatch to be a little more clear.
Also add another diagnostic for a ref qualifier mismatch, which previously produced a useless error (this error path is simply very old; see rL119336):
Before:
error: cannot initialize object parameter of type 'X0' with an expression of type 'X0'
After:
error: 'this' argument to member function 'rvalue' is an lvalue, but function has rvalue ref-qualifier
Reviewers: rsmith, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: lebedev.ri, aaron.ballman, cfe-commits
Differential Revision: https://reviews.llvm.org/D39937
llvm-svn: 321592
Philip Reames [Sun, 31 Dec 2017 03:34:36 +0000 (03:34 +0000)]
2nd attempt at "fixing" amdgpu tests after r321575
The test needs to be changed; it was exercising UB and that likely wasn't the intent of the test author. I simply removed the checks because I have absolutely no idea what this test was trying to accomplish. With multiple check patterns, no explanation, and no familiarity on my part with the ISA a true fix is going to have to come from someone familiar with the target.
llvm-svn: 321591
Faisal Vali [Sun, 31 Dec 2017 00:06:40 +0000 (00:06 +0000)]
[NFC] Modernize enum DeclSpecContext into a scoped enum.
llvm-svn: 321590
Philip Reames [Sat, 30 Dec 2017 18:42:37 +0000 (18:42 +0000)]
Test fix after r321575
The test in question was checking for a particular intepretation of undefined behavior. Relax the test to check that we simply don't crash.
Sorry for the breakage, I don't generally build AMDGPU locally and just saw the failure this morning.
llvm-svn: 321589
Serge Pavlov [Sat, 30 Dec 2017 18:38:44 +0000 (18:38 +0000)]
Reverted 321587: Enable configuration files in clang
Need to check targets in tests more carefully.
llvm-svn: 321588
Serge Pavlov [Sat, 30 Dec 2017 17:59:26 +0000 (17:59 +0000)]
Enable configuration files in clang
Clang is inherently a cross compiler and can generate code for any target
enabled during build. It however requires to specify many parameters in the
invocation, which could be hardcoded during configuration process in the
case of single-target compiler. The purpose of configuration files is to
make specifying clang arguments easier.
A configuration file is a collection of driver options, which are inserted
into command line before other options specified in the clang invocation.
It groups related options together and allows specifying them in simpler,
more flexible and less error prone way than just listing the options
somewhere in build scripts. Configuration file may be thought as a "macro"
that names an option set and is expanded when the driver is called.
Use of configuration files is described in `UserManual.rst`.
Differential Revision: https://reviews.llvm.org/D24933
llvm-svn: 321587
Serge Pavlov [Sat, 30 Dec 2017 15:37:46 +0000 (15:37 +0000)]
Added support for reading configuration files
Configuration file is read as a response file in which file names in
the nested constructs `@file` are resolved relative to the directory
where the including file resides. Lines in which the first non-whitespace
character is '#' are considered as comments and are skipped. Trailing
backslashes are used to concatenate lines in the same way as they
are used in shell scripts.
Differential Revision: https://reviews.llvm.org/D24926
llvm-svn: 321586
Benjamin Kramer [Sat, 30 Dec 2017 15:27:33 +0000 (15:27 +0000)]
Use phi ranges to simplify code. No functionality change intended.
llvm-svn: 321585
Simon Pilgrim [Sat, 30 Dec 2017 11:51:45 +0000 (11:51 +0000)]
[X86][SSE] Add PR30780 test cases
Broadcast of sign/zero extended scalars resulting in unnecessary vector constants
llvm-svn: 321584
Simon Pilgrim [Sat, 30 Dec 2017 11:20:56 +0000 (11:20 +0000)]
[X86][SSE] Add test for (v2f32 uitofp(build_vector(i32, i32))) (PR35732)
To compare against (v2f32 build_vector(f32 uitofp(i32), f32 uitofp(i32)))
llvm-svn: 321583
Serge Pavlov [Sat, 30 Dec 2017 09:15:59 +0000 (09:15 +0000)]
Reverted 321580: Added support for reading configuration files
It caused buildbot fails.
llvm-svn: 321582
George Rimar [Sat, 30 Dec 2017 08:40:45 +0000 (08:40 +0000)]
[ELF] - Remove excessive checks. NFC.
This was raised in comments for D41592.
With current code we always assign parent
section for Rel[a] sections like
InX::RelaPlt or InX::RelaDyn, so checking
their parent for null is excessive.
llvm-svn: 321581