aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-06-14Merging r333213:llvmorg-6.0.1-rc3llvmorg-6.0.1release/6.xTom Stellard1-2/+13
------------------------------------------------------------------------ r333213 | ctopper | 2018-05-24 10:59:47 -0700 (Thu, 24 May 2018) | 16 lines sanitizer: Use pre-computed size of struct ustat for Linux <sys/ustat.h> has been removed from glibc 2.28 by: commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7 Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Sun Mar 18 11:28:59 2018 +0800 Deprecate ustat syscall interface This patch uses pre-computed size of struct ustat for Linux to fix https://bugs.llvm.org/show_bug.cgi?id=37418 Patch by H.J. Lu. Differential Revision: https://reviews.llvm.org/D47281 ------------------------------------------------------------------------ llvm-svn: 334776
2018-06-13Merging r323390:Tom Stellard2-4/+61
------------------------------------------------------------------------ r323390 | ericwf | 2018-01-24 16:02:48 -0800 (Wed, 24 Jan 2018) | 9 lines Fix PR35564 - std::list splice/erase incorrectly throw in debug mode. There was a bug in the implementation of splice where the container sizes were updated before decrementing one of the iterators. Afterwards, the result of decrementing the iterator was flagged as UB by the debug implementation because the container was reported to be empty. This patch fixes that bug by delaying the updating of the container sizes until after the iterators have been correctly constructed. ------------------------------------------------------------------------ llvm-svn: 334621
2018-06-12Merging r326394:Tom Stellard2-3/+53
------------------------------------------------------------------------ r326394 | rnk | 2018-02-28 16:09:35 -0800 (Wed, 28 Feb 2018) | 10 lines [DAE] don't remove args of musttail target/caller `musttail` requires identical signatures of caller and callee. Removing arguments breaks `musttail` semantics. PR36441 Patch by Fedor Indutny Differential Revision: https://reviews.llvm.org/D43708 ------------------------------------------------------------------------ llvm-svn: 334464
2018-06-04Merging r333467:llvmorg-6.0.1-rc2Tom Stellard2-22/+30
------------------------------------------------------------------------ r333467 | marshall | 2018-05-29 15:25:42 -0700 (Tue, 29 May 2018) | 1 line Fix embarrasing typo in uncaught_exceptions. Update tests to really test this. Thanks to Peter Klotz for calling my attention to this. ------------------------------------------------------------------------ llvm-svn: 333910
2018-05-31Merging r322030:Tom Stellard2-1/+24
------------------------------------------------------------------------ r322030 | rsmith | 2018-01-08 13:46:42 -0800 (Mon, 08 Jan 2018) | 3 lines PR35862: Suppress -Wmissing-variable-declarations warning on inline variables, variable templates, and instantiations thereof. ------------------------------------------------------------------------ llvm-svn: 333623
2018-05-30Merging r326358:Tom Stellard1-2/+7
------------------------------------------------------------------------ r326358 | dim | 2018-02-28 12:04:21 -0800 (Wed, 28 Feb 2018) | 29 lines Fix llvm-config --system-libs output on FreeBSD and NetBSD Summary: For various reasons, CMake's detection mechanism for `backtrace()` returns an absolute path `/usr/lib/libexecinfo.so` on FreeBSD and NetBSD. Since `tools/llvm-config/CMakeLists.txt` only checks if system libraries start with `-`, this causes `llvm-config --system-libs` to produce the following incorrect output: ``` -lrt -l/usr/lib/libexecinfo.so -ltinfo -lpthread -lz -lm ``` Fix it by removing the path and the `lib` prefix, to make it look like a regular short library name, suitable for appending to a `-l` link flag. This also fixes the `Bindings/Go/go.test` test case, since that always died with "unable to find library -l/usr/lib/libexecinfo.so". Reviewers: chandlerc, emaste, joerg, krytarowski Reviewed By: krytarowski Subscribers: hans, bdrewery, mgorny, hintonda, llvm-commits Differential Revision: https://reviews.llvm.org/D42702 ------------------------------------------------------------------------ llvm-svn: 333579
2018-05-30Merging r328798:Tom Stellard2-1/+115
------------------------------------------------------------------------ r328798 | haicheng | 2018-03-29 09:01:26 -0700 (Thu, 29 Mar 2018) | 37 lines [JumpThreading] Don't select an edge that we know we can't thread In r312664 (D36404), JumpThreading stopped threading edges into loop headers. Unfortunately, I observed a significant performance regression as a result of this change. Upon further investigation, the problematic pattern looked something like this (after many high level optimizations): while (true) { bool cond = ...; if (!cond) { <body> } if (cond) break; } Now, naturally we want jump threading to essentially eliminate the second if check and hook up the edges appropriately. However, the above mentioned change, prevented it from doing this because it would have to thread an edge into the loop header. Upon further investigation, what is happening is that since both branches are threadable, JumpThreading picks one of them at arbitrarily. In my case, because of the way that the IR ended up, it tended to pick the one to the loop header, bailing out immediately after. However, if it had picked the one to the exit block, everything would have worked out fine (because the only remaining branch would then be folded, not thraded which is acceptable). Thus, to fix this problem, we can simply eliminate loop headers from consideration as possible threading targets earlier, to make sure that if there are multiple eligible branches, we can still thread one of the ones that don't target a loop header. Patch by Keno Fischer! Differential Revision: https://reviews.llvm.org/D42260 ------------------------------------------------------------------------ llvm-svn: 333577
2018-05-30Merging r333497:Tom Stellard6-335/+324
------------------------------------------------------------------------ r333497 | ctopper | 2018-05-29 20:38:15 -0700 (Tue, 29 May 2018) | 5 lines [X86] Fix the names of a bunch of icelake intrinsics. Mostly this fixes the names of all the 128-bit intrinsics to start with _mm_ instead of _mm128_ as is the convention and what the Intel docs say. This also fixes the name of the bitshuffle intrinsics to say epi64 for 128 and 256 bit versions. ------------------------------------------------------------------------ llvm-svn: 333575
2018-05-30Merging r326476:Tom Stellard3-4/+47
------------------------------------------------------------------------ r326476 | mstorsjo | 2018-03-01 12:22:57 -0800 (Thu, 01 Mar 2018) | 7 lines [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC Make types with sizes that aren't a power of two an error (that can be disabled) in structs with ms_struct layout, except on mingw where the situation is quite likely to occur and GCC handles it silently. Differential Revision: https://reviews.llvm.org/D43908 ------------------------------------------------------------------------ llvm-svn: 333571
2018-05-30Merging r326173:Tom Stellard2-1/+8
------------------------------------------------------------------------ r326173 | mstorsjo | 2018-02-26 22:27:06 -0800 (Mon, 26 Feb 2018) | 17 lines [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields When targeting GNU/MinGW for i386, the size of the "long double" data type is 12 bytes (while it is 8 bytes in MSVC). When building with -mms-bitfields to have struct layouts match MSVC, data types are laid out in a struct with alignment according to their size. However, this doesn't make sense for the long double type, since it doesn't match MSVC at all, and aligning to a non-power-of-2 size triggers other asserts later. This matches what GCC does, aligning a long double to 4 bytes in structs on i386 even when -mms-bitfields is specified. This fixes asserts when using the max_align_t data type when building for MinGW/i386 with the -mms-bitfields flag. Differential Revision: https://reviews.llvm.org/D43734 ------------------------------------------------------------------------ llvm-svn: 333569
2018-05-30Merging r326235:Tom Stellard4-19/+32
------------------------------------------------------------------------ r326235 | mstorsjo | 2018-02-27 11:42:19 -0800 (Tue, 27 Feb 2018) | 6 lines [MinGW, CrossWindows] Allow passing -static together with -shared In these combinations, link a DLL as usual, but pass -Bstatic instead of -Bdynamic to indicate prefering static libraries. Differential Revision: https://reviews.llvm.org/D43811 ------------------------------------------------------------------------ llvm-svn: 333566
2018-05-30Merging r329300:Tom Stellard10-15/+20
------------------------------------------------------------------------ r329300 | manojgupta | 2018-04-05 08:29:52 -0700 (Thu, 05 Apr 2018) | 16 lines Disable -fmerge-all-constants as default. Summary: "-fmerge-all-constants" is a non-conforming optimization and should not be the default. It is also causing miscompiles when building Linux Kernel (https://lkml.org/lkml/2018/3/20/872). Fixes PR18538. Reviewers: rjmccall, rsmith, chandlerc Reviewed By: rsmith, chandlerc Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D45289 ------------------------------------------------------------------------ llvm-svn: 333564
2018-05-30Merging r330345:Tom Stellard3-11/+87
------------------------------------------------------------------------ r330345 | kparzysz | 2018-04-19 10:26:46 -0700 (Thu, 19 Apr 2018) | 8 lines [if-converter] Handle BBs that terminate in ret during diamond conversion This fixes https://llvm.org/PR36825. Original patch by Valentin Churavy (D45218). Differential Revision: https://reviews.llvm.org/D45731 ------------------------------------------------------------------------ llvm-svn: 333561
2018-05-30Merging r330331:Tom Stellard2-22/+7
------------------------------------------------------------------------ r330331 | erichkeane | 2018-04-19 07:27:05 -0700 (Thu, 19 Apr 2018) | 14 lines Fix __attribute__((force_align_arg_pointer)) misalignment bug The force_align_arg_pointer attribute was using a hardcoded 16-byte alignment value which in combination with -mstack-alignment=32 (or larger) would produce a misaligned stack which could result in crashes when accessing stack buffers using aligned AVX load/store instructions. Fix the issue by using the "stackrealign" function attribute instead of using a hardcoded 16-byte alignment. Patch By: Gramner Differential Revision: https://reviews.llvm.org/D45812 ------------------------------------------------------------------------ llvm-svn: 333511
2018-05-30Merging r327863:Tom Stellard1-4/+5
------------------------------------------------------------------------ r327863 | sepavloff | 2018-03-19 09:13:43 -0700 (Mon, 19 Mar 2018) | 12 lines [Driver] Avoid invalidated iterator in insertTargetAndModeArgs Doing an .insert() can potentially invalidate iterators by reallocating the vector's storage. When all the stars align just right, this causes segfaults or glibc aborts. Gentoo Linux bug (crashes while building Chromium): https://bugs.gentoo.org/650082. Patch by Hector Martin! Differential Revision: https://reviews.llvm.org/D44607 ------------------------------------------------------------------------ llvm-svn: 333507
2018-05-29Merging r332302:Tom Stellard2-2/+22
------------------------------------------------------------------------ r332302 | kfischer | 2018-05-14 15:05:01 -0700 (Mon, 14 May 2018) | 15 lines [InstCombine] fix crash due to ignored addrspacecast Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue https://github.com/JuliaLang/julia/issues/27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 ------------------------------------------------------------------------ llvm-svn: 333477
2018-05-29Merging r328885:Tom Stellard1-0/+10
------------------------------------------------------------------------ r328885 | timshen | 2018-03-30 10:51:03 -0700 (Fri, 30 Mar 2018) | 14 lines [NVPTX] Enable StructuredCFG for NVPTX Summary: Make NVPTX require structured CFG. Added a temporary flag to "roll back" the behavior for easy deployment. Combined with D45008, this fixes several internal Nvidia GPU test failures that we suspect to be ptxas miscompiles (PR27738). Reviewers: jlebar Subscribers: jholewinski, sanjoy, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D45070 ------------------------------------------------------------------------ llvm-svn: 333475
2018-05-29Merging r328884:Tom Stellard1-6/+11
------------------------------------------------------------------------ r328884 | timshen | 2018-03-30 10:51:00 -0700 (Fri, 30 Mar 2018) | 19 lines [BlockPlacement] Disable block placement tail duplciation in structured CFG. Summary: Tail duplication easily breaks the structure of CFG, e.g. duplicating on a region entry. If the structure is intended to be preserved, then we may want to configure tail duplication, or disable it for structured CFG. From our benchmark results disabling it doesn't cause performance regression. Notice that this currently affects AMDGPU backend. In the next patch, I also plan to turn on requiresStructuredCFG for NVPTX. All unit tests still pass. Reviewers: jlebar, arsenm Subscribers: jholewinski, sanjoy, wdng, tpr, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D45008 ------------------------------------------------------------------------ llvm-svn: 333474
2018-05-29Merging r332682 and r332694:Tom Stellard2-6/+72
------------------------------------------------------------------------ r332682 | kfischer | 2018-05-17 18:03:01 -0700 (Thu, 17 May 2018) | 21 lines [X86DomainReassignment] Don't compare stack-allocated values by address Summary: The Closure allocated in the main loop is allocated on the stack. However, later in the code its address is taken (and used for comparisons). This obviously doesn't work. In fact, the Closure will get the same stack address during every loop iteration, rendering the check that intended to identify Closure conflicts entirely ineffective. Fix this bug by giving every Closure a unique ID and using that for comparison. Alternatively, we could heap allocate the closure object. Fixes PR37396 Fixes JuliaLang/julia#27032 Reviewers: craig.topper, guyblank Reviewed By: craig.topper Subscribers: vchuravy, llvm-commits Differential Revision: https://reviews.llvm.org/D46800 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r332694 | kfischer | 2018-05-17 21:36:38 -0700 (Thu, 17 May 2018) | 15 lines [X86DomainReassignment] Hopefully fix buildbot failure The Darwin build bot failed with: ``` llc -mcpu=skylake-avx512 -mtriple=x86_64-unknown-linux-gnu domain-reassignment-test.ll -o - | llvm-mc -- Exit Code: 134 Command Output (stderr): -- Assertion failed: (MAI->hasSingleParameterDotFile()), function EmitFileDirective, file lib/MC/MCAsmStreamer.cpp, line 1087. ``` Looks like this is because the `llvm-mc` command was missing a triple directive and defaulting to MachO. Add the triple option. ------------------------------------------------------------------------ llvm-svn: 333470
2018-05-29Merging r332680:Tom Stellard2-20/+25
------------------------------------------------------------------------ r332680 | kfischer | 2018-05-17 17:40:52 -0700 (Thu, 17 May 2018) | 13 lines [X86DomainReassignment] Don't delete IMPLICIT_DEF nodes Summary: We cannot simply delete IMPLICIT_DEF nodes. They may be used later (e.g. by a PHI) and deleting them will cause later passes (e.g. LiveVariables) to crash. However, it seems fine to ignore them for purposes of the domain reassignment (as we do with PHI). Fixes PR37430 Fixes JuliaLang/julia#27080 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D46797 ------------------------------------------------------------------------ llvm-svn: 333469
2018-05-24Merging r330976:Geoff Berry2-2/+45
------------------------------------------------------------------------ r330976 | gberry | 2018-04-26 14:50:45 -0400 (Thu, 26 Apr 2018) | 15 lines [AArch64] Fix scavenged spill slot base when stack realignment required. Summary: Use the FP for scavenged spill slot accesses to prevent corruption of the callee-save region when the SP is re-aligned. Based on problem and patch reported by @paulwalker-arm This is an alternative to solution proposed in D45770 Reviewers: t.p.northover, paulwalker-arm, thegameg, javed.absar Subscribers: qcolombet, mcrosier, paulwalker-arm, kristof.beyls, rengolin, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D46063 ------------------------------------------------------------------------ llvm-svn: 333223
2018-05-22[X86] Add hasSideEffects=0 back to ADOX instructions. Partial cherrypick ↵Craig Topper1-0/+4
from r328952. This flag was present before the cherrypick of 328945. This matches what happened on trunk. I've left out the scheduling changes from r328952 to minimize changes from 6.0.1. llvm-svn: 332943
2018-05-22Merge r332389 to pick up the fix for PR37431, a regression w/ the new EFLAGS ↵Chandler Carruth3-3/+271
lowering. Required switching $regname to %regname in the MIR test and regenerating the CHECKs for the other test. llvm-svn: 332940
2018-05-22Merge r330269 to fix egregiously bad codegeneration in the new EFLAGS loweringChandler Carruth7-32/+32
that was defferred to a follow-up commit by me not understanding how part of the x86 backend worked. llvm-svn: 332939
2018-05-22Merge r330264 for the fix to PR37100, a regression introduced with the newChandler Carruth3-82/+234
EFLAGS lowering. llvm-svn: 332938
2018-05-22Merge r329771, fixing $regname to be %regname.Chandler Carruth2-5/+23
llvm-svn: 332937
2018-05-22Merge r329673, fixing test case to use %regname instead of $regname.Chandler Carruth8-52/+77
llvm-svn: 332934
2018-05-22Merge r329657.Chandler Carruth20-3856/+4504
This is the main patch that introduced the new EFLAGS lowering infrastructure. All the source merges were clean, but the tests required help to merge. Specifically, I had to regenerate the CHECK lines in the tests (using the trunk update_llc_test_checks.py script) because trunk has copy propagation that the branch doesn't. I also had to update the MIR test to use the old MIR syntax for physical registers (%name instead of $name). llvm-svn: 332933
2018-05-22Merge r328945 which corrected the fundamental structure of the `adox`Chandler Carruth1-19/+11
instructions. This is necessary to fully merge the EFLAGS fix patch series. llvm-svn: 332932
2018-05-22Merge r322521 - just regenerates the CHECK lines using the script. Will allowChandler Carruth1-127/+249
subsequent cherrypicks to be much cleaner. llvm-svn: 332928
2018-05-21Merge a series of test updates r329055-329057.Chandler Carruth2-3929/+4116
These required skipping the updates to the update test scripts. Note that to regenerate these tests you'll need to use the test update script close to trunk rather than on the branch. =/ llvm-svn: 332902
2018-05-21Merging r329040 with re-generated CHECK lines via the script.Chandler Carruth1-141/+412
The CHECK lines in the trunk version don't work due to unrelated (unmerged) changes to the backend. llvm-svn: 332900
2018-05-18Merging r330037:Tom Stellard2-226/+140
------------------------------------------------------------------------ r330037 | sdardis | 2018-04-13 09:09:07 -0700 (Fri, 13 Apr 2018) | 21 lines [mips] Materialize constants for multiplication Previously, the MIPS backend would alwyas break down constant multiplications into a series of shifts, adds, and subs. This patch changes that so the cost of doing so is estimated. The cost is estimated against worst case constant materialization and retrieving the results from the HI/LO registers. For cases where the value type of the multiplication is not legal, the cost of legalization is estimated and is accounted for before performing the optimization of breaking down the constant This resolves PR36884. Thanks to npl for reporting the issue! Reviewers: abeserminji, smaksimovic Differential Revision: https://reviews.llvm.org/D45316 ------------------------------------------------------------------------ llvm-svn: 332782
2018-05-18Merging r329268:Tom Stellard1-56/+748
------------------------------------------------------------------------ r329268 | sdardis | 2018-04-05 03:30:17 -0700 (Thu, 05 Apr 2018) | 2 lines [mips] Regenerate test before posting patch for constant multiplication (NFC) ------------------------------------------------------------------------ llvm-svn: 332778
2018-05-18Merging r324885:Tom Stellard3-1/+24
------------------------------------------------------------------------ r324885 | atanasyan | 2018-02-12 04:21:55 -0800 (Mon, 12 Feb 2018) | 8 lines [mips] Fix 'l' constraint handling for types smaller than 32 bits In case of correct using of the 'l' constraint llvm now generates valid code; otherwise it shows an error message. Initially these triggers an assertion. This commit is the same as r324869 with fixed the test's file name. ------------------------------------------------------------------------ llvm-svn: 332776
2018-05-18Merging r322266:Tom Stellard2-0/+15
------------------------------------------------------------------------ r322266 | smaksimovic | 2018-01-11 02:07:47 -0800 (Thu, 11 Jan 2018) | 7 lines [Mips] Handle one byte unsupported relocations Fail gracefully instead of crashing upon encountering this type of relocation. Differential revision: https://reviews.llvm.org/D41857 ------------------------------------------------------------------------ llvm-svn: 332765
2018-05-17Merging r331990:Tom Stellard2-1/+54
------------------------------------------------------------------------ r331990 | whitequark | 2018-05-10 08:05:47 -0700 (Thu, 10 May 2018) | 15 lines [PR37339] Fix assertion in FunctionComparator::cmpInlineAsm Fixes bug https://bugs.llvm.org/show_bug.cgi?id=37339. InlineAsm is only uniqued if the FunctionTypes are exactly the same, while cmpTypes() for example considers all pointer types in the default address space to be the same. For this reason the end of cmpInlineAsm() can be reached. This patch replaces the unreachable assertion with a check that the function types are not identical. Differential Revision: https://reviews.llvm.org/D46495 Reviewers: jfb ------------------------------------------------------------------------ llvm-svn: 332678
2018-05-17Merging r332342:Tom Stellard2-35/+65
------------------------------------------------------------------------ r332342 | whitequark | 2018-05-15 04:31:07 -0700 (Tue, 15 May 2018) | 23 lines [MergeFunctions] Fix merging of small weak functions When two interposable functions are merged, we cannot replace uses and have to emit calls to a common internal function. However, writeThunk() will not actually emit a thunk if the function is too small. This leaves us in a broken state where mergeTwoFunctions already rewired the functions, but writeThunk doesn't do anything. This patch changes the implementation so that: * writeThunk() does just that. * The direct replacement of calls is moved into mergeTwoFunctions() into the non-interposable case only. * isThunkProfitable() is extracted and will be called for the non-iterposable case always, and in the interposable case only if uses are still left after replacement. This issue has been introduced in https://reviews.llvm.org/D34806, where the code for checking thunk profitability has been moved. Differential Revision: https://reviews.llvm.org/D46804 Reviewed By: whitequark ------------------------------------------------------------------------ llvm-svn: 332662
2018-05-17Merging r324581:Tom Stellard3-7/+11
------------------------------------------------------------------------ r324581 | sjoerdmeijer | 2018-02-08 00:39:05 -0800 (Thu, 08 Feb 2018) | 12 lines [AArch64] Don't materialize 0 with "fmov h0, .." when FullFP16 is not supported We were generating "fmov h0, wzr" instructions when FullFP16 is not enabled. I've not added any tests, because the problem was visible in: test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll, which I had to change: I don't think Cyclone has FullFP16 enabled by default, so it shouldn't be using this v8.2a instruction. I've also removed these rdar tags, please shout if there are any objections. Differential Revision: https://reviews.llvm.org/D43020 ------------------------------------------------------------------------ llvm-svn: 332655
2018-05-17Merging r323816:Tom Stellard1-34/+29
------------------------------------------------------------------------ r323816 | evandro | 2018-01-30 13:14:11 -0800 (Tue, 30 Jan 2018) | 5 lines [AArch64] Expand testing of zero cycle zeroing Make sure that r321824 doesn't change zeroing. Differential revision: https://reviews.llvm.org/D42089 ------------------------------------------------------------------------ llvm-svn: 332651
2018-05-17Merging r330927:Tom Stellard1-1/+1
------------------------------------------------------------------------ r330927 | sepavloff | 2018-04-26 01:08:25 -0700 (Thu, 26 Apr 2018) | 2 lines Make test more platform neutral ------------------------------------------------------------------------ llvm-svn: 332650
2018-05-17Merging r330926:Tom Stellard3-1/+6
------------------------------------------------------------------------ r330926 | sepavloff | 2018-04-25 23:28:47 -0700 (Wed, 25 Apr 2018) | 9 lines [ConfigFiles] Update argument strings when merging argrument lists Implementation of `InputArgList` assumes its field `ArgStrings` contains strings for each argument exactly in the same order. This condition was broken when arguments from config file and from invocation were merged. This change fixes https://bugs.llvm.org/show_bug.cgi?id=37196 (Clang config files can crash argument handling). ------------------------------------------------------------------------ llvm-svn: 332649
2018-05-17Merging r332444:Tom Stellard3-1/+45
------------------------------------------------------------------------ r332444 | psmith | 2018-05-16 02:33:25 -0700 (Wed, 16 May 2018) | 20 lines [AArch64] Support "S" inline assembler constraint This patch re-introduces the "S" inline assembler constraint. This matches an absolute symbolic address or a label reference. The primary use case is asm("adrp %0, %1\n\t" "add %0, %0, :lo12:%1" : "=r"(addr) : "S"(&var)); I say re-introduces as it seems like "S" was implemented in the original AArch64 backend, but it looks like it wasn't carried forward to the merged backend. The original implementation had A and L modifiers that could be used to print ":lo12:" to the string. It looks like gcc doesn't use these and :lo12: is expected to be written in the inline assembly string so I've not implemented A and L. Clang already supports the S modifier. Fixes PR37180 Differential Revision: https://reviews.llvm.org/D46745 ------------------------------------------------------------------------ llvm-svn: 332644
2018-05-17Merging r323053:Tom Stellard1-8/+7
------------------------------------------------------------------------ r323053 | dhinton | 2018-01-20 16:29:00 -0800 (Sat, 20 Jan 2018) | 9 lines [cmake] Don't build Native llvm-config when cross compiling if passed by user. Summary: Rename LLVM_CONFIG_EXE to LLVM_CONFIG_PATH, and avoid building it if passed in by user. This is the same way CLANG_TABLEGEN and LLVM_TABLEGEN are handled, e.g., when -DLLVM_OPTIMIZED_TABLEGEN=ON is passed. Differential Revision: https://reviews.llvm.org/D41806 ------------------------------------------------------------------------ llvm-svn: 332568
2018-05-17Merging r327354:Tom Stellard1-1/+1
------------------------------------------------------------------------ r327354 | dyung | 2018-03-12 17:41:44 -0700 (Mon, 12 Mar 2018) | 2 lines Add missing "env" so that test added in r327322 passes on Windows bots. ------------------------------------------------------------------------ llvm-svn: 332566
2018-05-17Merging r329414:Tom Stellard3-9/+5
------------------------------------------------------------------------ r329414 | ctopper | 2018-04-06 09:16:43 -0700 (Fri, 06 Apr 2018) | 3 lines [X86] Merge itineraries for CLC, CMC, and STC. These are very simple flag setting instructions that appear to only be a single uop. They're unlikely to need this separation. ------------------------------------------------------------------------ llvm-svn: 332565
2018-05-17Merging r328944:Tom Stellard2-7/+13
------------------------------------------------------------------------ r328944 | chandlerc | 2018-04-01 14:47:55 -0700 (Sun, 01 Apr 2018) | 4 lines [x86] Expose more of the condition conversion routines in the public API for X86's instruction information. I've now got a second patch under review that needs these same APIs. This bit is nicely orthogonal and obvious, so landing it. NFC. ------------------------------------------------------------------------ llvm-svn: 332564
2018-05-17Merging r325446:Tom Stellard4-2/+16
------------------------------------------------------------------------ r325446 | dim | 2018-02-17 13:04:35 -0800 (Sat, 17 Feb 2018) | 28 lines [X86] Add 'sahf' CPU feature to frontend Summary: Make clang accept `-msahf` (and `-mno-sahf`) flags to activate the `+sahf` feature for the backend, for bug 36028 (Incorrect use of pushf/popf enables/disables interrupts on amd64 kernels). This was originally submitted in bug 36037 by Jonathan Looney <jonlooney@gmail.com>. As described there, GCC also uses `-msahf` for this feature, and the backend already recognizes the `+sahf` feature. All that is needed is to teach clang to pass this on to the backend. The mapping of feature support onto CPUs may not be complete; rather, it was chosen to match LLVM's idea of which CPUs support this feature (see lib/Target/X86/X86.td). I also updated the affected test case (CodeGen/attr-target-x86.c) to match the emitted output. Reviewers: craig.topper, coby, efriedma, rsmith Reviewed By: craig.topper Subscribers: emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D43394 ------------------------------------------------------------------------ llvm-svn: 332560
2018-05-16Merging r328408:Tom Stellard1-0/+3
------------------------------------------------------------------------ r328408 | echristo | 2018-03-23 19:56:58 -0700 (Fri, 23 Mar 2018) | 1 line Add REQUIRES lines for the targets being checked in this test. ------------------------------------------------------------------------ llvm-svn: 332552
2018-05-14Merging r332197:Tom Stellard1-0/+12
------------------------------------------------------------------------ r332197 | dim | 2018-05-13 07:32:23 -0700 (Sun, 13 May 2018) | 4 lines Follow-up to rL332176 by adding a test case for PR37264. Noticed by Simon Pilgrim. ------------------------------------------------------------------------ llvm-svn: 332264