- Apr 03, 2021
-
-
Levy Hsu authored
Implementation for RISC-V Zbr extension intrinsic. Header files are included in separate patch in case the name needs to be changed RV32 / 64: crc32b crc32h crc32w crc32cb crc32ch crc32cw RV64 Only: crc32d crc32cd Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99009 -
Thomas Preud'homme authored
LLVM test CodeGen/Hexagon/hwloop3.ll tries to check for the absence of a sequence of consecutive instructions with several CHECK-NOT with one of those directives using a variable defined in another. However CHECK-NOT are checked independently so that is using a variable defined in a pattern that should not occur in the input. This commit merges the two CHECK-NOT into a single CHECK-NOT that matches the content of two successive non-blank lines, thereby allowing to preserve the intent of the test. Reviewed By: bcahoon Differential Revision: https://reviews.llvm.org/D99778
-
peter klausler authored
API, implementation, and unit tests for the intrinsic function TRANSFER. Differential Revision: https://reviews.llvm.org/D99799
-
Craig Topper authored
For positive constants we try shifting left to remove leading zeros and fill the bottom bits with 1s. We then materialize that constant shift it right. This patch adds a new strategy to try filling the bottom bits with zeros instead. This catches some additional cases.
-
Craig Topper authored
Use -NEXT to protect against other missing lines.
-
Sanjay Patel authored
~((-X) | Y) --> (X - 1) & (~Y) We generally prefer 'add' over 'sub', this reduces the dependency chain, and this looks better for codegen on x86, ARM, and AArch64 targets. https://llvm.org/PR45755 https://alive2.llvm.org/ce/z/cxZDSp
-
Sanjay Patel authored
https://llvm.org/PR45755
-
Sanjay Patel authored
-
Dimitry Andric authored
When run under valgrind, or with a malloc that poisons freed memory, this can lead to segfaults or other problems. To avoid modifying the AdditionalUsers DenseMap while still iterating, save the instructions to be notified in a separate SmallPtrSet, and use this to later call OperandChangedState on each instruction. Fixes PR49582. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D98602
-
Nico Weber authored
Linux-only for now. Some mac bits stubbed out, but not tested. Good enough for the tiny_race.c example at https://clang.llvm.org/docs/ThreadSanitizer.html : $ out/gn/bin/clang -fsanitize=address -g -O1 tiny_race.c $ while true; do ./a.out || echo $? ; done While here, also make `-fsanitize=address` work for .c files. Differential Revision: https://reviews.llvm.org/D99795
-
Florian Hahn authored
This patch moves mapping of IR operands to VPValues out of tryToCreateWidenRecipe. This allows using existing VPValue operands when widening recipes directly, which will be introduced in future patches.
-
Philip Reames authored
Mostly because I'm about to add more attributes and the straightline copies get much uglier. What's currently there isn't too bad.
-
Greg McGary authored
`class Symbol` defines a data member `InputFile *file;` `class Defined` inherits from `Symbol` and also defines a data member `InputFile *file;` for no apparent purpose. Differential Revision: https://reviews.llvm.org/D99783
-
Philip Reames authored
The safepoints being inserted exists to free memory, or coordinate with another thread to do so. Thus, we must strip any inferred attributes and reinfer them after the lowering. I'm not aware of any active miscompiles caused by this, but since I'm working on strengthening inference of both and leveraging them in the optimization decisions, I figured a bit of future proofing was warranted.
-
- Apr 02, 2021
-
-
Philip Reames authored
-
Aaron Ballman authored
Attributes that set the SimpleHandler flag in Attr.td don't need to be explicitly handled in SemaDeclAttr.cpp.
-
peter klausler authored
A recent patch exposed an assumption that "long double" is (at least) an 80-bit floating-point type, which of course it is not in MSVC. Also get it right for non-x87 floating-point.
-
Brendon Cahoon authored
Change the definition of G_SBFX and G_UBFX so that the lsb and width can have different types than the src and dst operands. Differential Revision: https://reviews.llvm.org/D99739
-
Nikita Popov authored
If we don't know how to handle an intrinsic, we should still make use of normal call range metadata.
-
Nikita Popov authored
-
Alexey Bataev authored
-
Alexey Bataev authored
The ultimate reduction node may have multiple uses, but if the ultimate reduction is min/max reduction and based on SelectInstruction, the condition of this select instruction must have only single use. Differential Revision: https://reviews.llvm.org/D99753
-
Nico Weber authored
This reverts commit 500969f1. Makes clang assert compiling avx2 code, see https://bugs.chromium.org/p/chromium/issues/detail?id=1195353#c4 for a standalone repro.
-
Paul C. Anagnostopoulos authored
Differential Revision: https://reviews.llvm.org/D99605
-
Nico Weber authored
Else, just-built clang can't build programs that include libc++ headers on macOS if you build via the 'all' target.
-
Jun Ma authored
-
Jun Ma authored
Differential Revision: https://reviews.llvm.org/D99699
-
Jun Ma authored
-
Lei Zhang authored
This commit add utility functions for creating push constant storage variable and loading values from it. Along the way, performs some clean up: * Deleted `setABIAttrs`, which is just a 4-liner function with one user. * Moved `SPIRVConverstionTarget` into `mlir` namespace, to be consistent with `SPIRVTypeConverter` and `LLVMConversionTarget`. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D99725
-
Jeroen Dobbelaere authored
This fixes a crash found by the oss fuzzer and reported by @fhahn. The suggestion of @RKSimon seems to be the correct fix here. (See D91343). The oss fuzz report can be found here: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32759 Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D99792
-
Fraser Cormack authored
RV32 is able to use the llvm.experimental.vector.insert intrinsics too. This patch ensures they're tested. Reviewed By: khchen, asb Differential Revision: https://reviews.llvm.org/D99655
-
Muhammad Omair Javaid authored
-
Simon Pilgrim authored
Use the getTargetShuffleInputs helper for all shuffle decoding
-
LLVM GN Syncbot authored
-
Sander de Smalen authored
In order to bring up scalable vector support in LLVM incrementally, we introduced behaviour to emit a warning, instead of an error, when asking the wrong question of a scalable vector, like asking for the fixed number of elements. This patch puts that behaviour under a flag. The default behaviour is that the compiler will always error, which means that all LLVM unit tests and regression tests will now fail when a code-path is taken that still uses the wrong interface. The behaviour to demote an error to a warning can be individually enabled for tools that want to support experimental use of scalable vectors. This patch enables that behaviour when driving compilation from Clang. This means that for users who want to try out scalable-vector support, fixed-width codegen support, or build user-code with scalable vector intrinsics, Clang will not crash and burn when the compiler encounters such a case. This allows us to do away with the following pattern in many of the SVE tests: RUN: .... 2>%t RUN: cat %t | FileCheck --check-prefix=WARN WARN-NOT: warning: ... The behaviour to emit warnings is only temporary and we expect this flag to be removed in the future when scalable vector support is more stable. This patch also has fixes the following tests: unittests: ScalableVectorMVTsTest.SizeQueries SelectionDAGAddressAnalysisTest.unknownSizeFrameObjects AArch64SelectionDAGTest.computeKnownBitsSVE_ZERO_EXTEND_VECTOR_INREG regression tests: Transforms/InstCombine/vscale_gep.ll Reviewed By: paulwalker-arm, ctetreau Differential Revision: https://reviews.llvm.org/D98856
-
Florian Hahn authored
The motivation for this patch is to better estimate the cost of extracelement instructions in cases were they are going to be free, because the source vector can be used directly. A simple example is %v1.lane.0 = extractelement <2 x double> %v.1, i32 0 %v1.lane.1 = extractelement <2 x double> %v.1, i32 1 %a.lane.0 = fmul double %v1.lane.0, %x %a.lane.1 = fmul double %v1.lane.1, %y Currently we only consider the extracts free, if there are no other users. In this particular case, on AArch64 which can fit <2 x double> in a vector register, the extracts should be free, independently of other users, because the source vector of the extracts will be in a vector register directly, so it should be free to use the vector directly. The SLP vectorized version of noop_extracts_9_lanes is 30%-50% faster on certain AArch64 CPUs. It looks like this does not impact any code in SPEC2000/SPEC2006/MultiSource both on X86 and AArch64 with -O3 -flto. This originally regressed after D80773, so if there's a better alternative to explore, I'd be more than happy to do that. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D99719 -
Fraser Cormack authored
D99717 introduced some test cases which showed that the output of one vsetvli into another would not be picked up by the RISCVCleanupVSETVLI pass. This patch teaches the optimization about such a pattern. The pattern is quite common when using the RVV vsetvli intrinsic to pass the VL onto other intrinsics. The second test case introduced by D99717 is left unoptimized by this patch. It is a rarer case and will require us to rewire any uses of the redundant vset[i]vli's output to the previous one's. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99730
-
Fraser Cormack authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99717
-
Marek Kurdej authored
* This was introduced in D99515 that added -Wundef flag. CI run on macOS 10.15 and this problem wasn't caught before.
-
Evgeniy Brevnov authored
Support reassociation for min/max. With that we should be able to transform min(min(a, b), c) -> min(min(a, c), b) if min(a, c) is already available. Reviewed By: mkazantsev, lebedev.ri Differential Revision: https://reviews.llvm.org/D88287
-