summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86][SSE] Add support for extending bool vectors bitcasted from scalarsSimon Pilgrim2017-09-244-6582/+1212
| | | | | | | | | | This patch acts as a reverse to combineBitcastvxi1 - bitcasting a scalar integer to a boolean vector and extending it 'in place' to the requested legal type. Currently this doesn't handle AVX512 at all - but the current mask register approach is lacking for some cases. Differential Revision: https://reviews.llvm.org/D35320 llvm-svn: 314076
* [ScopDetect/Info] Look through PHIs that follow an error blockTobias Grosser2017-09-248-23/+188
| | | | | | | | | | | In case a PHI node follows an error block we can assume that the incoming value can only come from the node that is not an error block. As a result, conditions that seemed non-affine before are now in fact affine. This is a recommit of r312663 after fixing test/Isl/CodeGen/phi_after_error_block_outside_of_scop.ll llvm-svn: 314075
* [PowerPC] Eliminate compares - add i64 sext/zext handling for SETLE/SETGENemanja Ivanovic2017-09-245-0/+620
| | | | | | | | As mentioned in https://reviews.llvm.org/D33718, this simply adds another pattern to the compare elimination sequence and is committed without a differential review. llvm-svn: 314073
* [AVX-512] Add pattern for selecting masked version of v8i32/v8f32 compare ↵Craig Topper2017-09-243-70/+54
| | | | | | | | instructions when VLX isn't available. We use a v16i32/v16f32 compare instead and truncate the result. We already did this for the unmasked version, but were missing the version with 'and'. llvm-svn: 314072
* [X86] Make sure we still mark the full register as implicitly defined when ↵Craig Topper2017-09-241-4/+10
| | | | | | | | we shrink 256/512 bit zeroing xors to 128-bit. Not sure if anything really cares, but this seems like the right thing to do. llvm-svn: 314071
* [AVR] Implement getCmpLibcallReturnType().Dylan McKay2017-09-241-0/+5
| | | | | | | | | This fixes the avr-rust issue (#75) with floating-point comparisons generating broken code. By default, LLVM assumes these comparisons return 32-bit values, but ours are 8-bit. Patch By Thomas Backman. llvm-svn: 314070
* [Verifier] Stop accepting broken DIGlobalVariable(s).Davide Italiano2017-09-243-3/+27
| | | | | | | | The code wasn't yelling at the user when there's a reference from a DIGlobalVariableExpression. Thanks to Adrian for the reduced testcase. Fixes PR34672. llvm-svn: 314069
* [X86] Regenerate i64 to v2f32 bitcast testSimon Pilgrim2017-09-231-3/+30
| | | | llvm-svn: 314068
* Don't warn about runtime behavior problems in variable initializers that weRichard Smith2017-09-235-15/+29
| | | | | | | | know are going to be constant-evaluated. Any relevant diagnostics should be produced by constant expression evaluation. llvm-svn: 314067
* Silence unused variable warning in Release builds.Benjamin Kramer2017-09-231-0/+1
| | | | llvm-svn: 314066
* [IslExprBuilder] Do not generate RTC with more than 64 bitTobias Grosser2017-09-236-24/+67
| | | | | | | | | | Such RTCs may introduce integer wrapping intrinsics with more than 64 bit, which are translated to library calls on AOSP that are not part of the runtime and will consequently cause linker errors. Thanks to Eli Friedman for reporting this issue and reducing the test case. llvm-svn: 314065
* [x86] reduce 64-bit mask constant to 32-bits by right shiftingSanjay Patel2017-09-232-16/+17
| | | | | | | | | | | | | | This is a follow-up from D38181 (r314023). We have to put 64-bit constants into a register using a separate instruction, so we should try harder to avoid that. From what I see, we're not likely to encounter this pattern in the DAG because the upstream setcc combines from this don't (usually?) produce this pattern. If we fix that, then this will become more relevant. Since the cost of handling this case is just loosening the predicate of the existing fold, we might as well do it now. llvm-svn: 314064
* [x86] add an add+shift test for follow-up suggestion from D38181; NFCSanjay Patel2017-09-231-0/+21
| | | | llvm-svn: 314063
* [PowerPC] Eliminate compares - add i32 sext/zext handling for SETULT/SETUGTNemanja Ivanovic2017-09-2315-3/+1234
| | | | | | | | As mentioned in https://reviews.llvm.org/D33718, this simply adds another pattern to the compare elimination sequence and is committed without a differential revision. llvm-svn: 314062
* [docs] Fix typos in Clang's User's Manual.Reka Kovacs2017-09-231-2/+2
| | | | llvm-svn: 314061
* [PowerPC] Eliminate compares - add i32 sext/zext handling for SETULE/SETUGENemanja Ivanovic2017-09-2319-27/+1502
| | | | | | | | As mentioned in https://reviews.llvm.org/D33718, this simply adds another pattern to the compare elimination sequence and is committed without a differential revision. llvm-svn: 314060
* [X86] Move the getInsertVINSERTImmediate and getExtractVEXTRACTImmediate ↵Craig Topper2017-09-234-70/+22
| | | | | | | | helper functions over to X86ISelDAGToDAG.cpp Redefine them to call getI8Imm and return that directly. llvm-svn: 314059
* [X86] Remove is the isVINSERT*Index/isVEXTRACT*Index predicates from isel.Craig Topper2017-09-233-78/+8
| | | | | | The only insert_subvector/extract_subvector nodes that make it to isel are guaranteed to match. llvm-svn: 314058
* [ubsan] Fix assert.cc test by compiling it as C++Vitaly Buka2017-09-231-2/+1
| | | | llvm-svn: 314057
* Promote storage-only __fp16 vector operands to float vectors.Akira Hatanaka2017-09-234-6/+367
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes a bug in the handling of storage-only __fp16 vectors where clang didn't promote __fp16 vector operands to float vectors. Conceptually, it performs the following transformation on the AST in CreateBuiltinBinOp and CreateBuiltinUnaryOp: (Before) typedef __fp16 half4 __attribute__ ((vector_size (8))); typedef float float4 __attribute__ ((vector_size (16))); half4 hv0, hv1, hv2, hv3; hv0 = hv1 + hv2 + hv3; (After) float4 t0 = (float4)hv1 + (float4)hv2; float4 t1 = t0 + (float4)hv3; hv0 = (half4)t1; Note that this commit fixes the bug for targets that set HalfArgsAndReturns to true (ARM and ARM64). Targets using intrinsics such as llvm.convert.to.fp16 to handle __fp16 are still broken. rdar://problem/20625184 Differential Revision: https://reviews.llvm.org/D32520 llvm-svn: 314056
* [PowerPC] Eliminate compares - add i32 sext/zext handling for SETLT/SETGTNemanja Ivanovic2017-09-239-7/+711
| | | | | | | | As mentioned in https://reviews.llvm.org/D33718, this simply adds another pattern to the compare elimination sequence and is committed without a differential revision. llvm-svn: 314055
* Correctly compute linkage for members of internal linkage classes.Richard Smith2017-09-232-5/+13
| | | | | | | We used to give such members no linkage instead of giving them the linkage of the class. llvm-svn: 314054
* [ubsan] Replace CommonSanitizerReportMutex with ScopedErrorReportLockVitaly Buka2017-09-234-6/+18
| | | | | | | | | | Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D38194 llvm-svn: 314053
* [ubsan] Support signal specific options in ubsanVitaly Buka2017-09-239-7/+99
| | | | | | | | | | | | | | | | Summary: Part of https://github.com/google/sanitizers/issues/637 Standalone ubsan needs signal and sigaction handlers and interceptors. Plugin mode should rely on parent tool. Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D37895 llvm-svn: 314052
* Commit missing fixes for tool_file_renameReid Kleckner2017-09-234-9/+9
| | | | llvm-svn: 314051
* [Support] Rename tool_output_file to ToolOutputFile, NFCReid Kleckner2017-09-2334-91/+88
| | | | | | | This class isn't similar to anything from the STL, so it shouldn't use the STL naming conventions. llvm-svn: 314050
* [CodeGen] Fix build bots which uses old Clang broken in r314046. (NFC)Eugene Zelenko2017-09-221-1/+1
| | | | llvm-svn: 314049
* [lsan] Add __lsan_default_optionsVitaly Buka2017-09-227-0/+36
| | | | | | For consistency with asan, msan, tsan and ubsan. llvm-svn: 314048
* Fix up clang-tidy after clang r314037.Richard Smith2017-09-222-11/+14
| | | | llvm-svn: 314047
* [CodeGen] Fix some Clang-tidy modernize-use-default-member-init and Include ↵Eugene Zelenko2017-09-2210-182/+322
| | | | | | What You Use warnings; other minor fixes (NFC). llvm-svn: 314046
* Implement trampoline step-through for Windows-x86.Stephane Sezer2017-09-221-1/+43
| | | | | | | | | | | | | | | | | | Summary: This is required to be able to step through calls to external functions that are not properly marked with __declspec(dllimport). When a call like this is emitted, the linker will inject a trampoline to produce an indirect call through the IAT. Reviewers: zturner, jingham Reviewed By: jingham Subscribers: sas, jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D22231 llvm-svn: 314045
* [X86] [MC] fixed non optimal encoding of instruction memory operand (PR24038).Konstantin Belochapka2017-09-222-2/+17
| | | | | | | Fixed suboptimal encoding of instruction memory operand when assembler is used to select 32 bit fixup rather than 8 bit immediate for encoding memory offset value. Differential Revision: https://reviews.llvm.org/D38117 llvm-svn: 314044
* Fix uninteneded fallthrough detected by GCC warningReid Kleckner2017-09-221-0/+1
| | | | llvm-svn: 314043
* [Analyzer] Fix minor errors in python scripts.George Karpenkov2017-09-222-6/+5
| | | | llvm-svn: 314042
* [lsan] Deadly signal handler for lsanVitaly Buka2017-09-2211-10/+47
| | | | | | | | | | | | Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, dberris, kubamracek, krytarowski Differential Revision: https://reviews.llvm.org/D37608 llvm-svn: 314041
* [sanitizer] Replace thread id with GetThreadSelfVitaly Buka2017-09-223-16/+11
| | | | | | This allows to avoid constructor parameter llvm-svn: 314040
* [sanitizer] Move ScopedErrorReportLock into libcdep versionVitaly Buka2017-09-222-37/+37
| | | | llvm-svn: 314039
* Initial patchset to get the testsuite running against armv7 and arm64 iOS ↵Jason Molenda2017-09-2288-163/+486
| | | | | | | | | | | | | | | | | | | | | | | devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures. I have seen some instability with the armv7 test runs, I may submit additional patches to address this. arm64 looks good. I'll be watching the bots for the rest of today; if any problems are introduced by this patch I'll revert it - if anyone sees a problem with their bot that I don't see, please do the same. I know it's a rather large patch. One change I had to make specifically for iOS devices was that debugserver can't create files. There were several tests that launch the inferior process redirecting its output to a file, then they retrieve the file. They were not trying to test file redirection in these tests, so I rewrote those to write their output to a file directly. llvm-svn: 314038
* DR1113: anonymous namespaces formally give their contents internal linkage.Richard Smith2017-09-227-10/+69
| | | | | | | | | | | | | | | | | | | | This doesn't affect our code generation in any material way -- we already give such declarations internal linkage from a codegen perspective -- but it has some subtle effects on code validity. We suppress the 'L' (internal linkage) marker for mangled names in anonymous namespaces, because it is redundant (the information is already carried by the namespace); this deviates from GCC's behavior if a variable or function in an anonymous namespace is redundantly declared 'static' (where GCC does include the 'L'), but GCC's behavior is incoherent because such a declaration can be validly declared with or without the 'static'. We still deviate from the standard in one regard here: extern "C" declarations in anonymous namespaces are still granted external linkage. Changing those does not appear to have been an intentional consequence of the standard change in DR1113. llvm-svn: 314037
* [test] Enable clang-func-mapping as a test dep with the analyzerVedant Kumar2017-09-221-1/+1
| | | | | | | clang-func-mapping should not be a test dependency when the static analyzer isn't being built. llvm-svn: 314036
* Fix unused variable warning in non-debug builds.Richard Trieu2017-09-221-1/+1
| | | | llvm-svn: 314035
* clang-format plugin: Add missing NL (new line) at EOF (end of file)Hans Wennborg2017-09-221-0/+6
| | | | | | | | | | | | clang-format.exe removes trailing new lines at end of file. However, if no NL is found at EOF one should be added. Patch by Teodor MICU! Differential Revision: https://reviews.llvm.org/D37732 llvm-svn: 314033
* [InstCombine] Teach foldICmpUsingKnownBits to simplify SLE/SGE/ULE/UGE to ↵Craig Topper2017-09-222-8/+12
| | | | | | | | equality comparisons when the min/max ranges intersect in a single value. This is the inverse of what we do for SGT/SLT/UGT/ULT. llvm-svn: 314032
* [InstCombine] Add test cases for known bits simplifications for comparisons ↵Craig Topper2017-09-221-0/+143
| | | | | | | | that don't depend on constant RHS. NFC This shows some missing simplifications for sge/sle/uge/ule relative to their non-equality counterparts. llvm-svn: 314031
* [InstCombine] Remove a FIXME from a test that was fixed in r314025.Craig Topper2017-09-221-1/+0
| | | | llvm-svn: 314030
* [CodeGen][ObjC] Build the global block structure before emitting theAkira Hatanaka2017-09-225-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | body of global block invoke functions. This commit fixes an infinite loop in IRGen that occurs when compiling the following code: void FUNC2() { static void (^const block1)(int) = ^(int a){ if (a--) block1(a); }; } This is how IRGen gets stuck in the infinite loop: 1. GenerateBlockFunction is called to emit the body of "block1". 2. GetAddrOfGlobalBlock is called to get the address of "block1". The function calls getAddrOfGlobalBlockIfEmitted to check whether the global block has been emitted. If it hasn't been emitted, it then tries to emit the body of the block function by calling GenerateBlockFunction, which goes back to step 1. This commit prevents the inifinite loop by building the global block in GenerateBlockFunction before emitting the body of the block function. rdar://problem/34541684 Differential Revision: https://reviews.llvm.org/D38118 llvm-svn: 314029
* Fixed broken links in docs.Ilya Biryukov2017-09-222-2/+2
| | | | | | Replaced references to `llvm.org/klaus` with `git.llvm.org/klaus`. llvm-svn: 314028
* [x86] remove over-specified platform from test configSanjay Patel2017-09-221-27/+92
| | | | llvm-svn: 314027
* [PowerPC] Mark P9 scheduling model completeStefan Pintilie2017-09-224-266/+503
| | | | | | | | | | | | This patch just adds the missing information to the P9 scheduling model to allow the model to be marked as complete. The model has been verified against P9 documentation. The model was verified with utils/schedcover.py. Differential Revision: https://reviews.llvm.org/D35695 llvm-svn: 314026
* [InstCombine] Add constant splat handling to one of the ICMP_SLT/SGT cases ↵Craig Topper2017-09-222-8/+44
| | | | | | in foldICmpUsingKnownBits. llvm-svn: 314025
OpenPOWER on IntegriCloud