- Aug 24, 2020
-
-
Haojian Wu authored
Differential Revision: https://reviews.llvm.org/D82657
-
Florian Hahn authored
The check lines where generated before align was added for all instructions. Re-generate them, to reduce diff noise for actual functional changes.
-
Jonas Paulsson authored
Review: Ulrich Weigand
-
Florian Hahn authored
Limit elimination of stores at the end of a function to MemoryDefs with a single underlying object, to save compile time. In practice, the case with multiple underlying objects seems not very important in practice. For -O3 -flto on MultiSource/SPEC2000/SPEC2006 this results in a total of 2 more stores being eliminated. We can always re-visit that in the future.
-
Sanjay Patel authored
Similar to the existing transform - peek through a select to match a value and its negation. https://alive2.llvm.org/ce/z/MXi5KG define i8 @src(i1 %b, i8 %x) { %0: %neg = sub i8 0, %x %sel = select i1 %b, i8 %x, i8 %neg %abs = abs i8 %sel, 1 ret i8 %abs } => define i8 @tgt(i1 %b, i8 %x) { %0: %abs = abs i8 %x, 1 ret i8 %abs } Transformation seems to be correct!
-
Sanjay Patel authored
-
Raphael Isemann authored
This reverts commit ada2e8ea. Still breaking on Fuchsia (and also Fedora) with exit code 1, so back to investigating.
-
Sam Parker authored
-
Raphael Isemann authored
This relands D84013 but with a test that relies on less shell features to hopefully make the test pass on Fuchsia (where the test from the previous patch version strangely failed with a plain "Exit code 1"). Original summary: D81347 changes the ASTFileSignature to be an array of 20 uint8_t instead of 5 uint32_t. However, it didn't update the code in ObjectFilePCHContainerOperations that creates the dwoID in the module from the ASTFileSignature (`Buffer->Signature` being the array subclass that is now `std::array<uint8_t, 20>` instead of `std::array<uint32_t, 5>`). ``` uint64_t Signature = [..] (uint64_t)Buffer->Signature[1] << 32 | Buffer->Signature[0] ``` This code works with the old ASTFileSignature (where two uint32_t are enough to fill the uint64_t), but after the patch this only took two bytes from the ASTFileSignature and only partly filled the Signature uint64_t. This caused that the dwoID in the module ref and the dwoID in the actual module no longer match (which in turns causes that LLDB keeps warning about the dwoID's not matching when debugging -gmodules-compiled binaries). This patch just unifies the logic for turning the ASTFileSignature into an uint64_t which makes the dwoID match again (and should prevent issues like that in the future). Reviewed By: aprantl, dang Differential Revision: https://reviews.llvm.org/D84013
-
Pavel Labath authored
Avoids a -Wunused-variable with gcc.
-
Pavel Labath authored
Now that the number of Scalar "types" has been reduced, these don't make sense anymore.
-
Sam Parker authored
-
Julien Etienne authored
Reviewed By: dylanmckay Differential Revision: https://reviews.llvm.org/D85589 Patch by Julien Etienne
-
Sam Parker authored
Combine the cost modelling and validity checks for the phi to select conversion in SpeculativelyExecuteBB, extracting the logic out into a function.
-
Bjorn Pettersson authored
This is a fixup of commit 0819a641 (D77152) which could result in miscompiles. The miscompile could only happen for targets where isOperationLegalOrCustom could return different values for FSHL and FSHR. The commit mentioned above added logic in expandFunnelShift to convert between FSHL and FSHR by swapping direction of the funnel shift. However, that transform is only legal if we know that the shift count (modulo bitwidth) isn't zero. Basically, since fshr(-1,0,0)==0 and fshl(-1,0,0)==-1 then doing a rewrite such as fshr(X,Y,Z) => fshl(X,Y,0-Z) would be incorrect if Z modulo bitwidth, could be zero. ``` $ ./alive-tv /tmp/test.ll ---------------------------------------- define i32 @src(i32 %x, i32 %y, i32 %z) { %0: %t0 = fshl i32 %x, i32 %y, i32 %z ret i32 %t0 } => define i32 @tgt(i32 %x, i32 %y, i32 %z) { %0: %t0 = sub i32 32, %z %t1 = fshr i32 %x, i32 %y, i32 %t0 ret i32 %t1 } Transformation doesn't verify! ERROR: Value mismatch Example: i32 %x = #x00000000 (0) i32 %y = #x00000400 (1024) i32 %z = #x00000000 (0) Source: i32 %t0 = #x00000000 (0) Target: i32 %t0 = #x00000020 (32) i32 %t1 = #x00000400 (1024) Source value: #x00000000 (0) Target value: #x00000400 (1024) ``` It could be possible to add back the transform, given that logic is added to check that (Z % BW) can't be zero. Since there were no test cases proving that such a transform actually would be useful I decided to simply remove the faulty code in this patch. Reviewed By: foad, lebedev.ri Differential Revision: https://reviews.llvm.org/D86430
-
Sam Parker authored
-
Mehdi Amini authored
Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D86327
-
Sam Parker authored
Add methods to access operands in a similar manner to NAryExpr. Differential Revision: https://reviews.llvm.org/D86083
-
Fangrui Song authored
-
Stella Laurenzo authored
* Generic mlir.ir.Attribute class. * First standard attribute (mlir.ir.StringAttr), following the same pattern as generic vs standard types. * NamedAttribute class. Differential Revision: https://reviews.llvm.org/D86250
-
Qiu Chaofan authored
D70867 introduced support for expanding most ppc_fp128 operations. But sitofp/uitofp is missing. This patch adds that after D81669. Reviewed By: uweigand Differntial Revision: https://reviews.llvm.org/D81918
-
Qiu Chaofan authored
We may meet Invalid CTR loop crash when there's constrained ops inside. This patch adds constrained FP intrinsics to the list so that CTR loop verification doesn't complain about it. Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D81924
-
QingShan Zhang authored
We hit the compiling time reported by https://bugs.llvm.org/show_bug.cgi?id=46877 and the reason is the same as D77319. So we need to remove the dead node we created to avoid increase the problem size of DAGCombiner. Reviewed By: Spatel Differential Revision: https://reviews.llvm.org/D86183
-
Qiu Chaofan authored
This patch makes these operations legal, and add necessary codegen patterns. There's still some issue similar to D77033 for conversion from v1i128 type. But normal type tests synced in vector-constrained-fp-intrinsic are passed successfully. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D83654
-
Shilei Tian authored
The issue mentioned has been fixed in D84996
-
Brad Smith authored
-
Brad Smith authored
[clang][Driver] Implement AddClangSystemIncludeArgs and HasNativeLLVMSupport for the OpenBSD clang driver. If not overridden, AddClangSystemIncludeArgs's implementation is empty, so by default, no system include args are added to the Clang driver. This means that invoking Clang without the frontend must include a manual -I/usr/include flag, which is inconsistent behavior. Therefore, override and implement this method to match. Some boilerplate is also borrowed for handling of the other driver flags. While we are here, also override and enable HasNativeLLVMSupport. Patch by: 3405691582 (dana koch) Differential Revision: https://reviews.llvm.org/D86412
-
Valentin Clement authored
This patch fix the usage of the wait-argument in a clause and add several tests and fix the unparsing of the wait-argument. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D86325
-
Mehdi Amini authored
MLIR is removing "soon" the global dialect registry, this patch is transitionning FIR to not rely on it anymore.
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Florian Hahn authored
Removing terminators will result in invalid IR, making further reductions pointless. I do not think there is any valid use case where we actually want to create invalid IR as part of a reduction. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D86210
-
- Aug 23, 2020
-
-
Fangrui Song authored
The following program miscompiles because rL216012 added static relocation model support but not for PIC. ``` // clang -fpic -mcmodel=large -O0 a.cc double foo() { return 42.0; } ``` This patch adds PIC support. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D86024 -
Simon Pilgrim authored
This enables constexpr rotate intrinsics defined in ia32intrin.h, including the MS specific builtins.
-
Florian Hahn authored
Small cleanup, also removes one instance of getting DataLayout without using it later.
-
Sanjay Patel authored
The pattern matching does not account for truncating stores, so it is unlikely to work at later stages. So we are likely wasting compile-time with no hope of improvement by running this later.
-
Nithin Vadukkumchery Rajendrakumar authored
Summary: Implemented modeling for get() method in SmartPtrModeling Reviewers: NoQ, Szelethus, vsavchenko, xazax.hun Reviewed By: NoQ, xazax.hun Subscribers: martong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D86029
-
Stefan Gränitz authored
The example demonstrates how to use a module summary index file produced for ThinLTO to: * find the module that defines the main entry point * find all extra modules that are required for the build A LIT test runs the example as part of the LLVM test suite [1] and shows how to create a module summary index file. The code also provides two Error types that can be useful when working with ThinLTO summaries. [1] if LLVM_BUILD_EXAMPLES=ON and platform is not Windows Differential Revision: https://reviews.llvm.org/D85974
-
Simon Pilgrim authored
As suggested by @rsmith on D86398 - we should try to document the intrinsics that can be used in constexpr
-
Simon Pilgrim authored
As suggested by @rsmith on PR47267, by replacing the builtin_memcpy bitcast pattern with builtin_bit_cast we can use _castf32_u32, _castu32_f32, _castf64_u64 and _castu64_f64 inside constant expresssions (constexpr). Although __builtin_bit_cast was added for c++20 it works on all clang c/c++ modes. Differential Revision: https://reviews.llvm.org/D86398
-