- Jan 24, 2024
-
-
Louis Dionne authored
Previously, there was a ternary conditional with a less-than comparison appearing inside a template argument, which was really confusing because of the <...> of the function template. This patch rewrites the same statement on two lines for clarity.
-
Florian Hahn authored
The result of umin may be poison and in that case the added constraints are not be valid in contexts where poison doesn't cause UB. Only queue facts for min/max intrinsics if the result is guaranteed to not be poison. This could be improved in the future, by only adding the fact when solving conditions using the result value. Fixes https://github.com/llvm/llvm-project/issues/78621.
-
Nikita Popov authored
This patch canonicalizes getelementptr instructions with constant indices to use the `i8` source element type. This makes it easier for optimizations to recognize that two GEPs are identical, because they don't need to see past many different ways to express the same offset. This is a first step towards https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699. This is limited to constant GEPs only for now, as they have a clear canonical form, while we're not yet sure how exactly to deal with variable indices. The test llvm/test/Transforms/PhaseOrdering/switch_with_geps.ll gives two representative examples of the kind of optimization improvement we expect from this change. In the first test SimplifyCFG can now realize that all switch branches are actually the same. In the second test it can convert it into simple arithmetic. These are representative of common optimization failures we see in Rust. Fixes https://github.com/llvm/llvm-project/issues/69841.
-
Florian Hahn authored
Add extra tests with different load/store alignments for https://github.com/llvm/llvm-project/pull/78637.
-
Timm Bäder authored
-
Nikita Popov authored
-
Simon Pilgrim authored
[X86] X86FixupVectorConstants - shrink vector load to movsd/movsd/movd/movq 'zero upper' instructions (#79000) If we're loading a vector constant that is known to be zero in the upper elements, then attempt to shrink the constant and just scalar load the lower 32/64 bits. Always chose the vzload/broadcast with the smallest constant load, and prefer vzload over broadcasts for same bitwidth to avoid domain flips (mainly a AVX1 issue). Fixes #73783
-
Rainer Orth authored
When using GNU ld 2.41 on FreeBSD 14.0/amd64, there are linker warnings like ``` /vol/gcc/bin/gld-2.41: warning: blake3_avx512_x86-64_unix.S.o: missing .note.GNU-stack section implies executable stack /vol/gcc/bin/gld-2.41: NOTE: This behaviour is deprecated and will be removed in a future version of the linker ``` This can be fixed by adjusting the guard of the `.note.GNU-stack` sections in `blake3_*_x86-64_unix.S` to match `llvm/lib/MC/MCAsmInfoELF.cpp:MCAsmInfoELF::getNonexecutableStackSection` which emits the section on all ELF targets but Solaris. Tested on `amd64-pc-freebsd14.0`.
-
ostannard authored
The FP/SIMD instructions are optional for v8-R, so they should not be marked as a dependency of HasV8_0rOps. This had the effect of disabling some v8R-specific system registers when any of these features was disabled. I've moved these features to be enabled by default for Cortex-R82 (currently the only v8-R AArch64 core), matching the previous behavior, and clang's default. Based on a patch by Simi Pallipurath <simi.pallipurath@arm.com>
-
Danial Klimkin authored
Fix bazel build past 72512433
-
Nikita Popov authored
This allows caching AA queries both within and across the calls, and enables us to use a custom AAQI configuration.
-
Mirko Brkušanin authored
Co-authored-by:
Petar Avramovic <Petar.Avramovic@amd.com> Co-authored-by:
Piotr Sobczak <piotr.sobczak@amd.com>
-
jeanPerier authored
Currently lowering sets the extents of assumed-size array to "undef" which was OK as long as the value was not expected to be read. But when interfacing with the runtime and when passing assumed-size to assumed-rank, this last extent may be read and must be -1 as specified in the BIND(C) case in 18.5.3 point 5. Set this value to -1, and update all the lowering code that was looking for an undef defining op to identify assumed-size: much safer to propagate and use semantic info here, the previous check actually did not work if the array was used in an internal procedure (defining op not visible anymore). @clementval and @agozillon, I left assumed-size extent to zero in the acc/omp bounds op as it was, please double check that is what you want (I can imagine -1 may create troubles here, and 0 makes some sense as it would lead to no data transfer). This also allows removing special cases in UBOUND/LBOUND lowering. Also disable allocation of cray pointee. This was never intended and would now lead to crashes with the -1 value for assumed-size cray pointee.
-
Simon Pilgrim authored
Fixes #78888
-
Simon Pilgrim authored
-
Simon Pilgrim authored
commutatvity -> commutativity
-
Timm Bäder authored
So, return a PrimType directly from classifyComplexElementType().
-
Florian Hahn authored
Tests with umin where the result may be poison for https://github.com/llvm/llvm-project/issues/78621.
-
Ivan Kosarev authored
As otherwise SGPR+IMM instructions are not distinguishable to SGPR-only ones in AsmParser, leading to ambiguities. GFX12 doesn't have special SGPR-only variants, so we still allow optional immediate offsets for the subtarget. Also rename the offset operand classes while there. Part of <https://github.com/llvm/llvm-project/issues/69256>.
-
Mariusz Sikora authored
…bf8 instructions Add VOP1, VOP1_DPP8, VOP1_DPP16, VOP3, VOP3_DPP8, VOP3_DPP16 instructions that were supported on GFX940 (MI300): - V_CVT_F32_FP8 - V_CVT_F32_BF8 - V_CVT_PK_F32_FP8 - V_CVT_PK_F32_BF8 - V_CVT_PK_FP8_F32 - V_CVT_PK_BF8_F32 - V_CVT_SR_FP8_F32 - V_CVT_SR_BF8_F32 --------- Co-authored-by:Mateja Marjanovic <mateja.marjanovic@amd.com> Co-authored-by:
Mirko Brkušanin <Mirko.Brkusanin@amd.com>
-
Petar Avramovic authored
Reverts llvm/llvm-project#78482
-
Haojian Wu authored
This is a followup of #77311.
-
Petar Avramovic authored
One V_NOP or unrelated VALU instruction in between is required for correctness when matrix A or B of current WMMA instruction overlaps with matrix D of previous WMMA instruction. Remaining cases of WMMA operand overlaps are handled by the hardware and do not require handling in hazard recognizer. Hardware may stall in cases where: - matrix C of current WMMA instruction overlaps with matrix D of previous WMMA instruction - VALU instruction reads matrix D of previous WMMA instruction - matrix A,B or C of WMMA instruction reads result of previous VALU instruction
-
Petar Avramovic authored
Implement PhiLoweringHelper for GlobalISel in DivergenceLoweringHelper. Use machine uniformity analysis to find divergent i1 phis and select them as lane mask phis in same way SILowerI1Copies select VReg_1 phis. Note that divergent i1 phis include phis created by LCSSA and all cases of uses outside of cycle are actually covered by "lowering LCSSA phis". GlobalISel lane masks are registers with sgpr register class and S1 LLT. TODO: General goal is that instructions created in this pass are fully instruction-selected so that selection of lane mask phis is not split across multiple passes. patch 3 from: https://github.com/llvm/llvm-project/pull/73337
-
Kareem Ergawy authored
Fixes a small issues in an offloading test where the test dependec on the host and device being assigned certains numeric IDs. This however is not stable and fails in situations where any of the devices is assigned an ID different from the expected value. The fix just checks that offloading succeeded by making sure the IDs are different. The test was failing locally for me.
-
Stefan Gränitz authored
This is a follow-up improvement after the discussion in #78959
-
Jeremy Morse authored
This patch extends HWASAN to support maintenance of debug-info that isn't stored as intrinsics, but is instead in a DPValue object. This is straight-forwards: we collect any such objects in StackInfoBuilder, and apply the same operations to them as we would to dbg.value and similar intrinsics. I've also replaced some calls to getNextNode with debug-info skipping next calls, and use iterators for instruction insertion rather than instruction pointers. This avoids any difference in output between intrinsic / non-intrinsic debug-info, but also means that any debug-info comes before code inserted by HWAsan, rather than afterwards. See the test modifications, where the variable assignment (presented as a dbg.value) jumps up over all the code inserted by HWAsan. Seeing how the code inserted by HWAsan is always (AFAIUI) given the source-location of the instruction being instrumented, I don't believe this will have any effect on which lines variable assignments become visible on; it may extend the number of instructions covered by the assignments though.
-
Nikita Popov authored
Remove the `--phab-token` argument (which currently eats the subsequent "auto" as the token no longer exists) and related code. I think this will fix the workflow failure in https://github.com/llvm/llvm-project/issues/79253#issuecomment-1907679229.
-
Nikolas Klauser authored
This makes the builtins list quite a bit more verbose, but IMO this is a huge win in terms of readability.
-
Nikita Popov authored
LAA currently adds memory locations with their original AATags to AST. However, scoped alias AATags may be valid only within one loop iteration, while LAA reasons across iterations. Fix this by determining which alias scopes are defined inside the loop, and drop AATags that reference these scopes. Fixes https://github.com/llvm/llvm-project/issues/79137.
-
Nikita Popov authored
-
Shengchen Kan authored
ADC/SBB with reverse encoding is never emitted by compiler before encoding optimization, which is called after flag-copy lowering. This is a partial reland for 8bbf1007
-
Nikita Popov authored
This is a followup to #76819. After those changes, we can still run into an assertion failure for a slight variation of the test case: When fixing up MemoryPhis, we map the incoming access to the access of the cloned instruction -- which may now no longer exist. Fix this by reusing the getNewDefiningAccessForClone() helper, which will look upwards for a new defining access in that case.
-
Shengchen Kan authored
Reported in 134fcc62 Incorrect opcode is used b/c there is a `[[fallthrough]]` at line 2386.
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Adrian Kuegel authored
-
Luke Lau authored
This is to add test coverage for a change in #73342
-