- Mar 19, 2022
-
-
Simon Pilgrim authored
We should be able to perform this with MOVMSK+TEST/BT instead of spilling to stack
-
chenglin.bi authored
When N > 12, (2^N -1) is not a legal add immediate (isLegalAddImmediate will return false). ANd if SetCC input use this number, DAG combiner will generate one more SRL instruction. So combine [setcc (srl x, imm), 0, ne] to [setcc (and x, (-1 << imm)), 0, ne] to get better optimization in emitComparison Fix https://github.com/llvm/llvm-project/issues/54283 Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D121449
-
Paul Walker authored
When inverting the compare predicate trySwapVSelectOperands is incorrectly using the type of the select's cond operand rather than the type of cond's operands. This means we're treating all inversions as if they're integer. Differential Revision: https://reviews.llvm.org/D121968
-
Mark de Wever authored
Before it only accepted one output iterator type. Now it accepts all output iterator types as required by BasicFormatter. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D120916
-
Shengchen Kan authored
-
Alisamar Husain authored
Differential Revision: https://reviews.llvm.org/D121935
-
Shengchen Kan authored
Reviewed By: nigelp-xmos Differential Revision: https://reviews.llvm.org/D121982
-
Craig Topper authored
The width never decreases here.
-
Chris Bieneman authored
This patch adds triple support for: * dxil architecture * shadermodel OS (with version parsing) * shader stages as environment Reviewed By: MaskRay, pete Differential Revision: https://reviews.llvm.org/D122031
-
Med Ismail Bennani authored
Signed-off-by:Med Ismail Bennani <medismail.bennani@gmail.com>
-
Vladimir Vereschaka authored
* fixed remote test script arguments for libc++/compiler-rt libraries. * disabled shared libc++abi libraries (to let remote tests get passed).
-
William S. Moses authored
This patch slightly updates the behavior of scf.if->select to place any hoisted select statements prior to the remaining scf.if body. This allows better composition with other canonicalization passes, such as scf.if nested merging. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D122027
-
Daniel Grumberg authored
Implements an APISet specific unique ptr type that has a custom deleter that just calls the underlying APIRecord subclass destructor.
-
Peter Klausler authored
Some refactoring and related fixes for more accurate user program error recovery in the I/O runtime, especially for error recovery with IOMSG= character values. 1) Move any work in an EndIoStatement() implementation that may raise an error into a new CompleteOperation() member function. This allows error handling APIs like GetIoMsg() to complete a pending I/O statement and harvest any errors that may result. 2) Move the pending error code from ErroneousIoStatementState to a new pendingError_ data member in IoErrorHandler. This allows IoErrorHandler::InError() to return a correct result when there is a pending error that will be recovered from so that I/O list data transfers don't crash in the meantime. 3) Don't create and leak a unit for a failed OPEN(NEWUNIT=n) with error recovery, and don't modify 'n'. (Depends on changes to API call ordering in lowering, in a separate patch; code was added to ensure that OPEN statement control list specifiers, e.g. SetFile(), must be passed before GetNewUnit().) 4) Fix the code that calls a form of strerror to fill an IOMSG= variable so that it actually works for Fortran's character type: blank fill with no null or newline termination. Differential Revision: https://reviews.llvm.org/D122036
-
Peter Klausler authored
Support the names AND, OR, and XOR for the generic intrinsic functions IAND, IOR, and IEOR respectively. Differential Revision: https://reviews.llvm.org/D122034
-
Peter Klausler authored
In flang/runtime/transformational.cpp, there are many RUNTIME_CHECK assertions for errors that should have been caught in semantics, but there are alno others that signify program errors that in principle cannot be detected until execution. Convert this second group into readable fatal error messages. Also clean up some missing braces and incorrect printf formats found along the way. Differential Revision: https://reviews.llvm.org/D122037
-
Med Ismail Bennani authored
This patch introduces a generic helper class that will listen for event in a background thread and match it against a source broadcaster. If the event received matches the source broadcaster, the event is queued up in a list that the user can access later on. The motivation behind this is to easily test new kinds of events (i.e. Swift type-system progress events). However, this patch also updates `TestProgressReporting.py` and `TestDiagnosticReporting.py` to make use of this new helper class. Differential Revision: https://reviews.llvm.org/D121977 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Peter Klausler authored
Extend "extension<LanguageFeature>()" to incorporate an explanatory message better than the current generic "nonstandard usage:". Differential Revision: https://reviews.llvm.org/D122035
-
Eli Friedman authored
Regression from 2f497ec3; we should not try to generate ldrexd on targets that don't have it. Also, while I'm here, fix shouldExpandAtomicStoreInIR, for consistency. That doesn't really have any practical effect, though. On Thumb targets where we need to use __sync_* libcalls, there is no libcall for stores, so SelectionDAG calls __sync_lock_test_and_set_8 anyway.
-
Eli Friedman authored
-
Philip Reames authored
SLP is currently assuming that control dependence in these cases is irrelevant. This is only valid if none of the lib-funcs involved can throw or infinite loop in the scalar forms. This appears to be true (or at least we infer the respective attributes) for the libfuncs I spot checked. This change is mostly for shrunking the diff on an upcoming patch.
-
Thomas Raoux authored
ExpandShapeOp builder cannot infer the result type since it doesn't know how the dimension needs to be split. Remove this builder so that it doesn't get used accidently. Also remove one potential path using it in generic fusion. Differential Revision: https://reviews.llvm.org/D122019
-
Stanislav Mekhanoshin authored
-
Simon Pilgrim authored
AVX512BWVL capable cpus are required 512-bit gfni
-
Simon Pilgrim authored
We already have rotation coverage
-
Fangrui Song authored
Generalize D99629 for ELF. A default visibility non-local symbol is preemptible in a -shared link. `isInterposable` is an insufficient condition. Moreover, a non-preemptible alias may be referenced in a sub constant expression which intends to lower to a PC-relative relocation. Replacing the alias with a preemptible aliasee may introduce a linker error. Respect dso_preemptable and suppress optimization to fix the abose issues. With the change, `alias = 345` will not be rewritten to use aliasee in a `-fpic` compile. ``` int aliasee; extern int alias __attribute__((alias("aliasee"), visibility("hidden"))); void foo() { alias = 345; } // intended to access the local copy ``` While here, refine the condition for the alias as well. For some binary formats like COFF, `isInterposable` is a sufficient condition. But I think canonicalization for the changed case has little advantage, so I don't bother to add the `Triple(M.getTargetTriple()).isOSBinFormatELF()` or `getPICLevel/getPIELevel` complexity. For instrumentations, it's recommended not to create aliases that refer to globals that have a weak linkage or is preemptible. However, the following is supported and the IR needs to handle such cases. ``` int aliasee __attribute__((weak)); extern int alias __attribute__((alias("aliasee"))); ``` There are other places where GlobalAlias isInterposable usage may need to be fixed. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D107249 -
Arthur Eubanks authored
With D107249 I saw huge compile time regressions on a module (150s -> 5700s). This turned out to be due to a huge RefSCC in the module. As we ran the function simplification pipeline on functions in the SCCs in the RefSCC, some of those SCCs would be split out to their RefSCC, a child of the current RefSCC. We'd skip the remaining SCCs in the huge RefSCC because the current RefSCC is now the RefSCC just split out, then revisit the original huge RefSCC from the beginning. This happened many times because many functions in the RefSCC were optimizable to the point of becoming their own RefSCC. This patch makes it so we don't skip SCCs not in the current RefSCC so that we split out all the child RefSCCs on the first iteration of RefSCC. When we split out a RefSCC, we invalidate the original RefSCC and add the remainder of the SCCs into a new RefSCC in RCWorklist. This happens repeatedly until we finish visiting all SCCs, at which point there is only one valid RefSCC in RCWorklist from the original RefSCC containing all the SCCs that were not split out, and we visit that. For example, in the newly added test cgscc-refscc-mutation-order.ll, we'd previously run instcombine in this order: f1, f2, f1, f3, f1, f4, f1 Now it's: f1, f2, f3, f4, f1 This can cause more passes to be run in some specific cases, e.g. if f1<->f2 gets optimized to f1<-f2, we'd previously run f1, f2; now we run f1, f2, f2. This improves kimwitu++ compile times by a lot (12-15% for various -O3 configs): https://llvm-compile-time-tracker.com/compare.php?from=2371c5a0e06d22b48da0427cebaf53a5e5c54635&to=00908f1d67400cab1ad7bcd7cacc7558d1672e97&stat=instructions Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D121953
-
Paul Robinson authored
ASSERT_THAT_EXPECTED implicitly calls takeError(), and calling takeError() a second time returns nothing, so the check for the content of the error text wasn't being executed. Fixes Issue #48901 Found by the Rotten Green Tests project.
-
Mike Rice authored
Adds basic parsing/sema/serialization support for the #pragma omp target teams loop directive. Differential Revision: https://reviews.llvm.org/D122028
-
Eli Friedman authored
Fixes llvm-clang-x86_64-expensive-checks-debian failure with 2f497ec3. expandAtomicStore always modifies the function, so make sure we set MadeChange unconditionally. Not sure how nobody else has stumbled over this before.
-
Duncan P. N. Exon Smith authored
This is a follow up to 565603cc, which made macOS the default target OS for `-arch arm64` when running on an Apple Silicon Mac. Now it'll be the default when running on an Intel Mac too. clang/test/Driver/apple-arm64-arch.c was a bit odd before: it was added for the above commit, but tested the inverse behaviour and XFAIL'ed on Apple Silicon. This inverts it to the (new) behaviour (that's now correct regardless) and removes the XFAIL. Radar-Id: rdar://90500294
-
Stanislav Mekhanoshin authored
-
Stanislav Mekhanoshin authored
This is incomplete and will handle more instructions as they are added. Differential Revision: https://reviews.llvm.org/D121966
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D121956
-
Sterling Augustine authored
-
Stanislav Mekhanoshin authored
GFX940 repurposes BLGP as NEG only in DGEMM MFMA. Differential Revision: https://reviews.llvm.org/D121745
-
Dominic Chen authored
Differential Revision: https://reviews.llvm.org/D121855
-
Dominic Chen authored
Differential Revision: https://reviews.llvm.org/D121857
-
Eli Friedman authored
Without this patch, clang would generate calls to __sync_* routines on targets where it does not make sense; we can't assume the routines exist on unknown targets. Linux has special implementations of the routines that work on old ARM targets; other targets have no such routines. In general, atomics operations which aren't natively supported should go through libatomic (__atomic_*) APIs, which can support arbitrary atomics through locks. ARM targets older than v6, where this patch makes a difference, are rare in practice, but not completely extinct. See, for example, discussion on D116088. This also affects Cortex-M0, but I don't think __sync_* routines actually exist in any Cortex-M0 libraries. So in practice this just leads to a slightly different linker error for those cases, I think. Mechanically, this patch does the following: - Ensures we run atomic expansion unconditionally; it never makes sense to completely skip it. - Fixes getMaxAtomicSizeInBitsSupported() so it returns an appropriate number on all ARM subtargets. - Fixes shouldExpandAtomicRMWInIR() and shouldExpandAtomicCmpXchgInIR() to correctly handle subtargets that don't have atomic instructions. Differential Revision: https://reviews.llvm.org/D120026
-
Nico Weber authored
This reverts commit 21b97df7. 6316129e relanded in 7b983917.
-