- Mar 19, 2020
-
-
Andrzej Warzynski authored
Summary: In order to keep the names consistent with other SVE gather loads, the intrinsics for gather prefetch are renamed as follows: * @llvm.aarch64.sve.gather.prfb -> @llvm.aarch64.sve.prfb.gather Reviewed by: fpetrogalli Differential Revision: https://reviews.llvm.org/D76421
-
Florian Hahn authored
For PHIs with multiple incoming values, we can improve precision by using constant ranges for integers. We can over-approximate phis by merging the incoming values. Reviewers: davide, efriedma, mssimpso Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D71933
-
Igor Kudrin authored
We usually start error messages with lowercase letters and most of them in llvm-dwp follow that rule. This patch fixes a few messages that started with capital letters. Differential revision: https://reviews.llvm.org/D76277
-
Simon Pilgrim authored
-
Shraiysh Vaishay authored
`llvm.resume` is similar to `llvm.return` except that has to be exactly one operand and that should be derived from a `llvm.landingpad` instruction. Any function having `llvm.landingpad` instruction must have a personality attribute. Example: LLVM IR ``` define dso_local i32 @main() personality i32 (...)* @__gxx_personality_v0 { invoke void @foo(i32 42) to label %3 unwind label %1 1: ; preds = %0 %2 = landingpad i8* catch i8** @_ZTIi catch i8* bitcast (i8** @_ZTIi to i8*) resume i8* %2 3: ; preds = %0 ret i32 1 } ``` MLIR - LLVM IR Dialect ``` llvm.func @main() -> !llvm.i32 attributes {personality = @__gxx_personality_v0} { %0 = llvm.mlir.constant(1 : i32) : !llvm.i32 %1 = llvm.mlir.addressof @_ZTIi : !llvm<"i8**"> %2 = llvm.bitcast %1 : !llvm<"i8**"> to !llvm<"i8*"> %3 = llvm.mlir.addressof @_ZTIi : !llvm<"i8**"> %4 = llvm.mlir.constant(42 : i32) : !llvm.i32 llvm.invoke @foo(%4) to ^bb2 unwind ^bb1 : (!llvm.i32) -> () ^bb1: // pred: ^bb0 %5 = llvm.landingpad (catch %3 : !llvm<"i8**">) (catch %2 : !llvm<"i8*">) : !llvm<"i8*"> llvm.resume %5 : !llvm<"i8*"> ^bb2: // pred: ^bb0 llvm.return %0 : !llvm.i32 } ``` Differential Revision: https://reviews.llvm.org/D71888 -
Raphael Isemann authored
This reverts commit 939ca455. This failed on the debian bot for some reason: File "/home/worker/lldb-x86_64-debian/lldb-x86_64-debian/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py", line 67, in test_with_run_command "s summary wrong") AssertionError: 'L"hello world! מזל טוב!\\0!\\0!!!!\\0\\0A\\0\\U0000fffd\\U0000fffd\\U0000fffd\\ [truncated]... != 'L"hello world! מזל טוב!"' Diff is 2156 characters long. Set self.maxDiff to None to see it. : s summary wrong
-
Lucas Prates authored
Summary: The range checks performed for the vqrdmulh_lane and vqrdmulh_lane Neon intrinsics were incorrectly using their return type as the base type for the range check performed on their 'lane' argument. This patch updates those intrisics to use the type of the proper reference argument to perform the range checks. Reviewers: jmolloy, t.p.northover, rsmith, olista01, dnsampaio Reviewed By: dnsampaio Subscribers: dnsampaio, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74766
-
Lucas Prates authored
Summary: Range checks were not properly performed in the lane arguments of Neon intrinsics implemented based on splat operations. Calls to those intrinsics where translated to `__builtin__shufflevector` calls directly by the pre-processor through the arm_neon.h macros, missing the chance for the proper range checks. This patch enables the range check by introducing an auxiliary splat instruction in arm_neon.td, delaying the translation to shufflevector calls to CGBuiltin.cpp in clang after the checks were performed. Reviewers: jmolloy, t.p.northover, rsmith, olista01, ostannard Reviewed By: ostannard Subscribers: ostannard, dnsampaio, danielkiss, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74619
-
Lucas Prates authored
Summary: As multiple versions of the same Neon intrinsic can be created through the same TableGen definition with the same argument types, the existing `call` operator is not always able to properly perform overload resolutions. As these different intrinsic versions are differentiated later on by the NeonEmitter through name mangling, this patch introduces a new `call_mangled` operator to the TableGen definitions, which allows a call for an otherwise ambiguous intrinsic by matching its mangled name with the mangled variation of the caller. Reviewers: jmolloy, t.p.northover, rsmith, olista01, dnsampaio Reviewed By: dnsampaio Subscribers: dnsampaio, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74618
-
Lucas Prates authored
Summary: Some of the `*_laneq` intrinsics defined in arm_neon.td were missing the setting of the `isLaneQ` attribute. This patch sets the attribute on the related definitions, as they will be required to properly perform range checks on their lane arguments. Reviewers: jmolloy, t.p.northover, rsmith, olista01, dnsampaio Reviewed By: dnsampaio Subscribers: dnsampaio, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74616
-
Lucas Prates authored
This reverts commit 62ab15ff. Multiple commits were unintentionally squashed into this one. Reverting so each of them can be pushed properly.
-
Lucas Prates authored
Summary: Some of the `*_laneq` intrinsics defined in arm_neon.td were missing the setting of the `isLaneQ` attribute. This patch sets the attribute on the related definitions, as they will be required to properly perform range checks on their lane arguments. Reviewers: jmolloy, t.p.northover, rsmith, olista01, dnsampaio Reviewed By: dnsampaio Subscribers: dnsampaio, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74616
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Raphael Isemann authored
Summary: Printing a summary for an empty NSPathStore2 string currently prints random bytes behind the empty string pointer from memory (rdar://55575888). It seems the reason for this is that the SourceSize parameter in the `ReadStringAndDumpToStreamOptions` - which is supposed to contain the string length - actually uses the length 0 as a magic value for saying "read as much as possible from the buffer" which is clearly wrong for empty strings. This patch adds another flag that indicates if we have know the string length or not and makes this behaviour dependent on that (which seemingly was the original purpose of this magic value). Reviewers: aprantl, JDevlieghere, shafik Reviewed By: aprantl Subscribers: christof, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68010
-
Cullen Rhodes authored
Summary: * Remove a bunch of asserts checking for unsupported scalable types and add some more now that they are supported. * Propagate the scalable flag where necessary. * Add another `EVT::getExtendedVectorVT` method that takes an ElementCount parameter. * Add `EVT::isExtendedScalableVector` and `EVT::getExtendedVectorElementCount` - latter is currently unused. Reviewers: sdesmalen, efriedma, rengolin, craig.topper, huntergr Reviewed By: efriedma Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75672
-
Georgii Rymar authored
`.rela.dyn` is a dynamic relocation section that normally has no value in `sh_info` field. The existent `elf-reladyn-section-shinfo.yaml` which tests this piece has issues: 1) It does not check the case when we have more than one `SHT_REL[A]` section with `sh_info == 0` in the object. Because of this it did not catch the issue. Currently we print an excessive "Info" field: ``` - Name: .rela.dyn Type: SHT_RELA EntSize: 0x0000000000000018 - Name: .rel.dyn Type: SHT_REL EntSize: 0x0000000000000010 Info: ' [1]' ``` 2) It seems can be more generic. I've added a `rel-rela-section.yaml` instead. Differential revision: https://reviews.llvm.org/D76281 -
Adrian Kuegel authored
This reverts commit 79a7ed92. This breaks the asan buildbot.
-
Cullen Rhodes authored
Summary: Related to D75672, this patch adds EVT::isFixedLengthVector to determine if the underlying vector type is of fixed length. An assert is introduced in EVT::getVectorNumElements that triggers for types that aren't fixed length. This is currently guarded by a flag added D75297 that is off by default and has been renamed to the more generic ENABLE_STRICT_FIXED_SIZE_VECTORS. Ideally we want to get rid of getVectorNumElements but a quick grep shows there are >350 uses in lib/CodeGen and 75 in lib/Target/AArch64 alone. All of these probably aren't EVT::getVectorNumElements (some may be the MVT equivalent), but there are many places to fixup and having the assert on by default would make the SVE upstreaming effort difficult. Reviewers: sdesmalen, efriedma, ctetreau, huntergr, rengolin Reviewed By: efriedma Subscribers: mgorny, kristof.beyls, hiraditya, danielkiss, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76376
-
Uday Bondhugula authored
Ranked tensor types can have shape dimension size 0 Signed-off-by:
Uday Bondhugula <uday@polymagelabs.com> Differential Revision: https://reviews.llvm.org/D76405
-
LLVM GN Syncbot authored
-
Simon Moll authored
Summary: This patch adds IR intrinsics for vector-predicated integer arithmetic. It is subpatch #1 of the [integer slice](https://reviews.llvm.org/D57504#1732277) of [LLVM-VP](https://reviews.llvm.org/D57504). LLVM-VP is a larger effort to bring native vector predication to LLVM. Reviewed By: andrew.w.kaylor Differential Revision: https://reviews.llvm.org/D69891
-
Georgii Rymar authored
Fixes https://bugs.llvm.org/show_bug.cgi?id=44903 It is about the following case: ``` SECTIONS { .foo : { *(.foo) } =0x90909090 /DISCARD/ : { *(.bar) } } ``` Here while parsing the fill expression we treated the "/" of "/DISCARD/" as operator. With this change, suggested by Fangrui Song, we do not allow expressions with operators (e.g. "0x1100 + 0x22") that are not wrapped into round brackets. It should not be an issue for users, but helps to resolve parsing ambiguity. Differential revision: https://reviews.llvm.org/D74687
-
Sander de Smalen authored
The SVE ACLE allows using a short-form for the intrinsics, e.g. the following two declarations generate the same code: svuint32_t svld1(svbool_t, uint32_t const *); svuint32_t svld1_u32(svbool_t, uint32_t const *); using the attribute: __clang_arm_builtin_alias so that any call to svld1(svbool_t, uint32_t const *) will map to __builtin_sve_svld1_u32. Reviewers: SjoerdMeijer, miyuki, efriedma, simon_tatham, rengolin Reviewed By: SjoerdMeijer Tags: #clang Differential Revision: https://reviews.llvm.org/D75861
-
Florian Hahn authored
If one of the operands of a binary operator is a constant range, we can use ConstantRange::binaryOp to approximate the result. We still handle single element constant ranges as we did previously, with ConstantExpr::get(), because ConstantRange::binaryOp still gives worse results in a few cases for single element ranges. Also note that we bail out early if any of the operands is still unknown. Reviewers: davide, efriedma, mssimpso Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D71936
-
Chen Zheng authored
-
Alex Zinenko authored
Summary: These are not supported by any of the code using `type_cast`. In the general case, such casting would require memrefs to handle a non-contiguous vector representation or misaligned vectors (e.g., if the offset of the source memref is not divisible by vector size, since offset in the target memref is expressed in the number of elements). Differential Revision: https://reviews.llvm.org/D76349
-
Haojian Wu authored
The only subexpression that is considered an error now is TypoExpr, but we plan to add expressions with errors to improve editor tooling on broken code. We intend to use the same mechanism to guard against spurious diagnostics on those as well. See the follow-up revision for an actual usage of the flag. Original patch from Ilya. Reviewers: sammccall Reviewed By: sammccall Tags: #clang Differential Revision: https://reviews.llvm.org/D65591
-
Jason Molenda authored
-
Yaxun (Sam) Liu authored
Add a test for UsedDeclVisitor This test is reduced from mlir/lib/Transforms/AffineDataCopyGeneration.cpp to make sure there is no assertion due to UsedDeclVisitor.
-
River Riddle authored
-
Chen Zheng authored
On Powerpc fma is faster than fadd + fmul for some types, (PPCTargetLowering::isFMAFasterThanFMulAndFAdd). we should implement target hook isProfitableToHoist to prevent simplifyCFGpass from breaking fma pattern by hoisting fmul to predecessor block. Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D76207
-
Yaxun (Sam) Liu authored
This reverts commit b58f6bb1.
-
Yaxun (Sam) Liu authored
This test is reduced from mlir/lib/Transforms/AffineDataCopyGeneration.cpp to make sure there is no assertion due to UsedDeclVisitor.
-
Huihui Zhang authored
Summary: DataLayout::getTypeAllocSize() return TypeSize. For cases where scalable property doesn't matter (check for zero-sized alloca), we should explicitly call getKnownMinSize() to avoid implicit type conversion to uint64_t, which is invalid for scalable vector type. Reviewers: sdesmalen, efriedma, spatel, apazos Reviewed By: efriedma Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76386
-
David Blaikie authored
(would be nice to revisit the CFG traits and change them to use ranges rather than begin/end - if anyone wants to do that refactor) Also use more auto because writing the names of range utilty iterators isn't helping readability here - they're sort of implementation details for the most part, especially once you nest a few different filtering and adapting iterators.
-
Fred Riss authored
This test was stripping a binary generated by Makefile.rules which is potentially codesigned. Stripping invalidates the code signature, so we might need to re-sign after stripping.
-
Fred Riss authored
The test was stripping the binaries from the Python code. Unfortunately, if running on darwin embedded in a context that requires code signing, the stripping was invalidating the signature, thus breaking the test. This patch moves the stripping to the Makefile and resigns the stripped binaries if required.
-
Fred Riss authored
It was an inline test before. Clang stopped emitting line information for the TLS initialization and the inline test didn't have a way to break before it anymore. This rewrites the test as a full-fldeged python test and improves the checking of the error case to verify that the failure we are looking for is related to the TLS setup not being complete.
-
Fred Riss authored
The comment in the test wrongfully claimed that we support hardware breakpoints on darwin for arm64, but we never did.
-