- Apr 15, 2020
-
-
Dominik Montada authored
Summary: The combine for unmerge(cast(merge)) is only valid for vectors, but was missing a corresponding check. Add a check that the operands are vectors to avoid an invalid combine. Without this check, the combiner would emit incorrect code for scalars and pointers because the artifact cast (trunc/ext) only affects bits at the end of the type, while this combine assumes that the casted bits appear between meaningful bits. This also uncovered a segmentation fault in the AMDGPU InstructionSelector. The tests triggering this bug have been moved to their own file and a check for the segmentation fault has been added. Reviewers: arsenm, dsanders, aemerson, paquette, aditya_nandakumar Reviewed By: arsenm Subscribers: tpr, jvesely, wdng, nhaehnle, rovka, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78191
-
Fangrui Song authored
Reviewed By: broadwaylamb, russell.gallop Differential Revision: https://reviews.llvm.org/D78153
-
Fangrui Song authored
GCC collect2 passes several options to the linker even if LTO is not used (note, lld does not support GCC LTO). The lto-wrapper may be a relative path (especially during development, when gcc is in a build directory), e.g. -plugin-opt=relative/path/to/lto-wrapper We need to ignore such options, which are currently interpreted by cl::ParseCommandLineOptions() and will fail with `error: --plugin-opt: ld.lld: Unknown command line argument 'relative/path/to/lto-wrapper'` because the path is apparently not an option registered by an `llvm::cl::opt`. See lto-plugin-ignore.s for how we interpret various -plugin-opt= options now. Reviewed By: grimar, tejohnson Differential Revision: https://reviews.llvm.org/D78158
-
Louis Dionne authored
By renaming .fail.cpp tests that don't need clang-verify to .compile.fail.cpp, the new test format will not try to compile these tests with clang-verify, and the old test format will work just the same. However, this allows removing a workaround that requires parsing each test looking for clang-verify markup. After this change, a .fail.cpp test should always have clang-verify markup. When clang-verify is not supported by the compiler, we will just check that these tests fail to compile. When clang-verify is supported, these tests will be compiled with clang-verify whether they have markup or not (so they should have markup, or they will fail). This simplifies the test suite and also ensures that all of our .fail.cpp tests provide clang-verify markup. If it's impossible for a test to have clang-verify markup, it can be moved to a .compile.fail.cpp test, which are unconditionally just checked for compilation failure.
-
Dominik Montada authored
Summary: As a follow up to https://reviews.llvm.org/D29014, add translation support for freeze. Introduce a new generic instruction G_FREEZE and translate freeze to it. Reviewers: dsanders, aqjune, arsenm, aditya_nandakumar, t.p.northover, lebedev.ri, paquette, aemerson Reviewed By: aqjune, arsenm Subscribers: fhahn, lebedev.ri, wdng, rovka, hiraditya, jfb, volkan, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77795
-
Hubert Tong authored
Summary: Update `latest_release` to reflect the release of Clang 10. Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D78172
-
Florian Hahn authored
Currently the alloca does not escape and all stores and the memset can be removed. Adding a use of the alloca ensures not all stores are eliminated.
-
Haojian Wu authored
Summary: crash stack: ``` lang: tools/clang/include/clang/AST/AttrImpl.inc:1490: unsigned int clang::AlignedAttr::getAlignment(clang::ASTContext &) const: Assertion `!isAlignmentDependent()' failed. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: ./bin/clang -cc1 -std=c++1y -ast-dump -frecovery-ast -fcxx-exceptions /tmp/t4.cpp 1. /tmp/t4.cpp:3:31: current parser token ';' #0 0x0000000002530cff llvm::sys::PrintStackTrace(llvm::raw_ostream&) llvm-project/llvm/lib/Support/Unix/Signals.inc:564:13 #1 0x000000000252ee30 llvm::sys::RunSignalHandlers() llvm-project/llvm/lib/Support/Signals.cpp:69:18 #2 0x000000000253126c SignalHandler(int) llvm-project/llvm/lib/Support/Unix/Signals.inc:396:3 #3 0x00007f86964d0520 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13520) #4 0x00007f8695f9ff61 raise /build/glibc-oCLvUT/glibc-2.29/signal/../sysdeps/unix/sysv/linux/raise.c:51:1 #5 0x00007f8695f8b535 abort /build/glibc-oCLvUT/glibc-2.29/stdlib/abort.c:81:7 #6 0x00007f8695f8b40f _nl_load_domain /build/glibc-oCLvUT/glibc-2.29/intl/loadmsgcat.c:1177:9 #7 0x00007f8695f98b92 (/lib/x86_64-linux-gnu/libc.so.6+0x32b92) #8 0x0000000004503d9f llvm::APInt::getZExtValue() const llvm-project/llvm/include/llvm/ADT/APInt.h:1623:5 #9 0x0000000004503d9f clang::AlignedAttr::getAlignment(clang::ASTContext&) const llvm-project/build/tools/clang/include/clang/AST/AttrImpl.inc:1492:0 ``` Reviewers: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D78085
-
jasonliu authored
This patch intends to provide relocation support for the expression contains two unpaired relocatable terms with opposite signs. Differential Revision: https://reviews.llvm.org/D77424
-
Xing Xue authored
Summary: This patch is to fix the parsing of long double literals encoded with the e prefix on PowerPC and S390. For both PowerPC and S390, type code e is used for 64-bit long double literals and g is used for 128-bit long double literals. libcxxabi test case test_demangle.pass.cpp fails without the fix. Authored by: xingxue-ibm Reviewers: hubert.reinterpretcast, jasonliu, erik.pilkington, uweigand, mclow.li sts, libc++abi Reviewed by: hubert.reinterpretcast, erik.pilkington Differential Revision: https://reviews.llvm.org/D74163
-
Georgii Rymar authored
It did not mention the `--implicit-check-not` before, though it should (https://reviews.llvm.org/D78024#inline-715166).
-
Benjamin Kramer authored
-
Benjamin Kramer authored
No functionality change intended.
-
Dmitry Polukhin authored
Summary: Without this patch clang-tidy stops finding file configs on the nearest .clang-tidy file. In some cases it is not very convenient because it results in common parts duplication into every child .clang-tidy file. This diff adds optional config inheritance from the parent directories config files. Test Plan: Added test cases in existing config test. Reviewers: alexfh, gribozavr2, klimek, hokein Subscribers: njames93, arphaman, xazax.hun, aheejin, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D75184
-
Victor Campos authored
Summary: No error or warning is emitted when specific reserved registers are written to in inline assembly. Therefore, writes to the program counter or to the frame pointer, for instance, were permitted, which could have led to undesirable behaviour. Example: int foo() { register int a __asm__("r7"); // r7 = frame-pointer in M-class ARM __asm__ __volatile__("mov %0, r1" : "=r"(a) : : ); return a; } In contrast, GCC issues an error in the same scenario. This patch detects writes to specific reserved registers in inline assembly for ARM and emits an error in such case. The detection works for output and input operands. Clobber operands are not handled here: they are already covered at a later point in AsmPrinter::emitInlineAsm(const MachineInstr *MI). The registers covered are: program counter, frame pointer and base pointer. This is ARM only. Therefore the implementation of other targets' counterparts remain open to do. Reviewers: efriedma Reviewed By: efriedma Subscribers: kristof.beyls, hiraditya, danielkiss, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76848 -
Sanjay Patel authored
PR45539: https://bugs.llvm.org/show_bug.cgi?id=45539
-
Matt Arsenault authored
Since the default logic was based on having fast denormal/fma features, and the default target has no features, we assumed flushing by default. This fixes incorrectly assuming flushing in builds for "generic" IR libraries. The handling for no specified --cuda-gpu-arch in HIP is kind of broken. Somewhere else forces a default target of gfx803, which does not enable denormal handling by default. We don't see this default switching here, so you'll end up with a different denormal mode depending on whether you explicitly requested gfx803, or used it by default.
-
Jan Kratochvil authored
This reverts commit bd47c470. It broke Green Dragon, reason is unknown to me so far: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/15323/consoleFull Differential Revision: https://reviews.llvm.org/D77327
-
Matt Arsenault authored
-
Thomas Preud'homme authored
Summary: Improve error message in case of conflict between several implicit format to mention the operand that conflict. Reviewers: jhenderson, jdenny, probinson, grimar, arichardson, rnk Reviewed By: jdenny Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77741
-
Simon Moll authored
-
Benjamin Kramer authored
No functionality change intended.
-
David Truby authored
This removes the current undefined behavior where the function has a return type but no return statement. Fixes: https://bugs.llvm.org/show_bug.cgi?id=45530
-
Simon Moll authored
-
Simon Moll authored
-
Denis Antrushin authored
To simplify future work on statepoint representation, hide direct access to statepoint field indices and provide getters for them. Add getters for couple more statepoint fields. This also fixes two bugs in MachineVerifier for statepoint: First, the `break` statement was falling out of `if` statement scope, thus disabling following checks. Second, it was incorrectly accessing some fields like CallingConv - StatepointOpers gives index to their value directly, not to preceeding field type encoding. Reviewed By: skatkov Differential Revision: https://reviews.llvm.org/D78119
-
Kirill Bobyrev authored
Summary: Before: USAGE: dexp [options] --index-path Path to the index After: USAGE: dexp [options] <INDEX FILE> Reviewers: sammccall Reviewed By: sammccall Subscribers: jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D78089
-
Florian Hahn authored
-
Jonas Paulsson authored
adjustSubwordCmp() should not optimize a load of an i1 value. This is achieved by checking that the size and store-size of the MemoryVT are the same. Fixes https://bugs.llvm.org/show_bug.cgi?id=45511. Review: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D78187
-
Simon Pilgrim authored
Add SSE + AVX512 targets Add some illegal type store tests
-
Benjamin Kramer authored
No functionality change intended.
-
Florian Hahn authored
After introducing VPWidenSelectRecipe, the duplicated logic can be shared. Reviewers: gilr, rengolin, Ayal, hsaito Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D77973
-
Pavel Labath authored
-
Pavel Labath authored
Summary: If we have an (invalid) relocation which relocates bytes which partially lie outside the range of the relocated section, the getRelocatedValue would return confusing results. It would first read zero (because that's what the underlying DataExtractor api does for out-of-bounds reads), and then relocate that zero anyway. A more appropriate behavior is to return zero straight away. This is what this patch does. Reviewers: dblaikie, jhenderson Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78113
-
Florian Hahn authored
We can eliminate MemoryDefs of objects not accessible after the function returns (e.g. alloca), if there are no reads between the MemoryDef and any function exits. We can stop traversing paths that completely overwrite the memory location of the MemoryDef. This patch was split off D73763. Reviewers: dmgreen, bryant, asbirlea, Tyker, efriedma, george.burgess.iv Reviewed By: asbirlea, george.burgess.iv Differential Revision: https://reviews.llvm.org/D77736
-
Sam Parker authored
Make the non-exchanging versions of the multiply add/sub instructions validForTailPredication. Differential Revision: https://reviews.llvm.org/D77648
-
Sameer Sahasrabuddhe authored
This is related to commit 8c11bc0c which introduces the FixIrreducible pass. The warning seems hard to reproduce locally. The latest attempt ought to work.
-
Nandor Licker authored
Summary: Updated the documentation to better reflect features implemented on the constexpr branch at https://github.com/nandor/llvm-project and extended the TODO list with known missing features Reviewers: rsmith, Bigcheese, dexonsmith, jfb Subscribers: lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75726
-
Georgii Rymar authored
We have a few unused/broken FileCheck prefixes in `llvm/test/tools`. This patch fixes it. Differential revision: https://reviews.llvm.org/D78110
-
Simon Moll authored
Differential Revision: https://reviews.llvm.org/D78188
-