- May 20, 2024
-
-
Felix Schneider authored
This patch includes the "no signed wrap" and "no unsigned wrap" flags, which can be used to annotate some Ops in the `arith` dialect and also in LLVMIR, in the integer range inference. The general approach is to use saturating arithmetic operations to infer bounds which are assumed to not wrap and use overflowing arithmetic operations in the normal case. If overflow is detected in the normal case, special handling makes sure that we don't underestimate the result range.
-
Felix Schneider authored
This patch adapts the `test.reflect_bounds` test Op to use explicitly signed and unsigned representation for signed and unsigned bounds of `IntegerType`s. This is mostly a cosmetic change as the internal representation of the ranges is unchanged. However, it improves readability of tests. Example: ```mlir // old: test.reflect_bounds {smax = 127 : i8, smin = -128 : i8, umax = -56 : i8, umin = 100 : i8} // new: test.reflect_bounds {smax = 127 : si8, smin = -128 : si8, umax = 200 : ui8, umin = 100 : ui8} ``` -
Helena Kotas authored
Add `environment` parameter to Clang availability attribute. The allowed values for this parameter are a subset of values allowed in the `llvm::Triple` environment component. If the `environment` parameters is present, the declared availability attribute applies only to targets with the same platform and environment. This new parameter will be initially used for annotating HLSL functions for the `shadermodel` platform because in HLSL built-in function availability can depend not just on the shader model version (mapped to `llvm::Triple::OSType`) but also on the target shader stage (mapped to `llvm::Triple::EnvironmentType`). See example in #89802 and microsoft/hlsl-specs#204 for more details. The environment parameter is currently supported only for HLSL. Fixes #89802
-
Isaac David authored
-
Helena Kotas authored
Design document for the HLSL availability diagnostic modes Fixes microsoft/hlsl-specs#190 --------- Co-authored-by:Xiang Li <python3kgae@outlook.com>
-
- May 19, 2024
-
-
Florian Hahn authored
Simplify a common pattern generated for masks when folding the tail. PR: https://github.com/llvm/llvm-project/pull/89386
-
Matt Arsenault authored
-
Nhat Nguyen authored
This PR is to address the issue #84640
-
aengelke authored
This saves an extra iteration over the all instructions of the function.
-
aengelke authored
This is a pure optimization to avoid redundant extensions, but iterating over all users is expensive, so don't do this at -O0.
-
Alex Voicu authored
At the moment, Clang is rather liberal in assuming that 0 (and by extension unqualified) is always a safe default. This does not work for targets that actually use a different value for the default / generic AS (for example, the SPIRV that obtains from HIPSPV or SYCL). This patch is a first, fairly safe step towards trying to clear things up by querying a modules' default AS from the target, rather than assuming it's 0, alongside fixing a few places where things break / we encode the 0 == DefaultAS assumption. A bunch of existing tests are extended to check for non-zero default AS usage.
-
Vitaly Buka authored
Issue #92687 This reverts commit 112eadd5.
-
Vitaly Buka authored
Memory leak: https://lab.llvm.org/buildbot/#/builders/5/builds/43403 Issue #92687 This reverts commit 0ec3b972.
-
Vitaly Buka authored
Revert "[Bounds-Safety] Temporarily relax a `counted_by` attribute restriction on flexible array members" Together with 0ec3b972 breaks https://lab.llvm.org/buildbot/#/builders/5/builds/43403 Issue #92687 This reverts commit cef6387e.
-
Simon Pilgrim authored
No need for this to be vector specific, and its more likely that scalar cases will appear after #92576
-
Simon Pilgrim authored
No need for this to be vector specific, and its more likely that scalar cases will appear after #92096
-
Simon Pilgrim authored
[DAG] canCreateUndefOrPoison - only compute extract/index vector elt index knownbits when not poison We were calling computeKnownBits to determine the bounds of the element index without ensuring that it wasn't poison, meaning if we did freeze the index, isGuaranteedNotToBeUndefOrPoison would then fail as we can't call computeKnownBits through FREEZE for potentially poison values. Fixes #92569
-
Vitaly Buka authored
Fixes build after cfe9deb1 on https://lab.llvm.org/buildbot/#/builders/37/builds/34828
-
Simon Pilgrim authored
The only difference is the operand index for the element index variable.
-
David Green authored
-
Yingwei Zheng authored
This patch supports `G_CONSTANT_FOLD_BARRIER` on RISCV to generate the following inst seq without crash: ``` define i64 @xor_and_i64(i64 %x) { entry: %y = and i64 %x, 16383 %z = xor i64 %y, 16368 ret i64 %z } ``` -
LLVM GN Syncbot authored
-
paperchalice authored
In order to test SelectionDAG for target AMDGPU, we need CodeGenPassBuilder.
-
NAKAMURA Takumi authored
`__sanitizer_siginfo` has been introduced in D142117. (llvmorg-16-init-17950-ged9ef9b4) It is incompatible to -pedantic. `clang_rt.ctx_profile` has been introduced in #92456.
-
NAKAMURA Takumi authored
-
Mingming Liu authored
The smaller class member are more focused and easier to maintain. This also paves the way for partial header forward compatibility in https://github.com/llvm/llvm-project/pull/88212 --------- Co-authored-by:
Kazu Hirata <kazu@google.com>
-
Mingming Liu authored
Add 'sort' here since it's helpful when container type changes (for example, https://github.com/llvm/llvm-project/pull/88024 wants to change container type from `unordered_set` to `DenseMap) @MaskRay points out `std::` doesn't randomize the iteration order of `unordered_{set,map}`, and the iteration order for single build is deterministic.
-
Nicolai Hähnle authored
Labels are matched using a regexp of the form '^(pattern):', which requires the addition of a "suffix" concept to NamelessValue. Aside from that, the key challenge is that block labels are values, and we typically capture values including the prefix '%'. However, when labels appear at the start of a basic block, the prefix '%' is not included, so we must capture block label values *without* the prefix '%'. We don't know ahead of time whether an IR value is a label or not. In most cases, they are prefixed by the word "label" (their type), but this isn't the case in phi nodes. We solve this issue by leveraging the two-phase nature of variable generalization: the first pass finds all occurences of a variable and determines whether the '%' prefix can be included or not. The second pass does the actual substitution. This change also unifies the generalization path for assembly with that for IR and analysis, in the hope that any future changes avoid diverging those cases future. I also considered the alternative of trying to detect the phi node case using more regular expression special cases but ultimately decided against that because it seemed more fragile, and perhaps the approach of keeping a tentative prefix that may later be discarded could also be eventually applied to some metadata and attribute cases. Note that an early version of this change was reviewed as https://reviews.llvm.org/D142452, before version numbers were introduced. This is a substantially updated version of that change.
-
David Green authored
This will help in later patches where the checks for operands being instructions is removed, and might help not remove unnecessary poison lanes.
-
David Green authored
As a small addition to #91148, this uses copysign to produce the correct sign for zero when converting frem to div/trunc/mul when we do not know that the input is positive (and we care about sign bits). The copysign lets us get the sign of zero correct. In testing, the only case this produced different results than fmod was: frem -inf, 4.0 -> nan vs -nan
-
Jessica Clarke authored
Fixes: 060df78c
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Florian Hahn authored
The last use of the function has been removed a while ago. Remove the unused function.
-
Alex MacLean authored
Add support for generating `st.param` instructions with direct use of immediates. This eliminates the need for a `mov` instruction prior to the `st.param` resulting in more concise emitted PTX.
-
- May 18, 2024
-
-
Mircea Trofin authored
-
Valentin Clement authored
-
Krzysztof Parzyszek authored
Turns out it was already in Analysis/CFGLoopInfo, so just move it to IR/AsmPrinter.
-
Shengchen Kan authored
``` %1:gr64 = COPY $eflags OP1 may update eflags $eflags = COPY %1 OP2 may use eflags ``` To use eflags as input at 4th instruction, we need to use SETcc to preserve the eflags before 2, and update the source condition of OP2 according to value in GPR %1. In this patch, we support CCMP/CTEST as OP2.
-
Thorsten Schütt authored
-