Commit Graph

540368 Commits

Author SHA1 Message Date
Baranov Victor
49049131bb [git][NFC] add clang-tidy formatting commits to .git-blame-ignore-revs (#143438) 2025-06-10 00:51:24 +03:00
Jorge Gorbe Moya
3c02150f02 Revert "[clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp (#143236)"
This reverts commit 897ccddcc3. It
introduced a bug when formatting multiple files in one go. When a
shorter file is passed after a longer one, a stale length from the
previous file seems to be used, triggering an "invalid length (...) is
outside the file" error.
2025-06-09 14:42:32 -07:00
Shafik Yaghmour
28b753b185 [Clang][NFC] Add nullptr check in InitializationSequence::InitializeFrom (#143067)
Static analysis flagged that Var could be nullptr but we were not
checking in the branch and unconditionally dereferences the pointer.

Note, code was added by 576161cb60
2025-06-09 14:28:47 -07:00
Nick Sarnie
339797d75b [clang][analyzer] Update python dependency versions (#143433)
We need to make sure we aren't vulnerable to
[PYSEC-2020-73](https://osv.dev/vulnerability/PYSEC-2020-73) and
[PYSEC-2019-41](https://osv.dev/vulnerability/PYSEC-2019-41).

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
2025-06-09 21:25:58 +00:00
Jonathan Thackray
62cae4ffcb [AArch64] Fix a multitude of AArch64 typos (NFC) (#143370)
Fix a multitude of typos in the AArch64 codebase using the
https://github.com/crate-ci/typos Rust package.
2025-06-09 22:13:22 +01:00
Florian Hahn
4a6d31f4bf [LV] Pass resume phi to fixReductionScalarResumeWhenVectorizing (NFC).
fixReductionScalarResumeWhenVectorizingEpilog updates the resume phis in
the scalar preheader. Instead of looking at all recipes in the middle
block and finding their resume-phi users we can iterate over all resume
phis in the scalar preheader directly.

This slightly simplifies the code and removes the need to look for the
resume phi.

Also slightly simplifies https://github.com/llvm/llvm-project/pull/141860.
2025-06-09 22:11:20 +01:00
Louis Dionne
4d50b405f1 [libc++] Remap headers in the debug info when building the library (#143004)
The libc++ build includes a step where headers are generated. This is
required in order to preprocess some files such as the assertion handler
and the __config_site header. As a result, the library is built against
headers located inside the build directory, and the path to those
headers is what's included in the debug information of the library.

However, these headers in the build directory are usually not
persistent, which means that the debug information might end up
referring to headers that don't exist anymore. To solve this problem,
this patch uses the -fdebug-prefix-map flag supported by Clang and GCC
to remap the generated headers to the original headers in the source
directory. This provides the illusion that the library was truly built
against the in-source version of the headers.
2025-06-09 16:52:29 -04:00
Eli Friedman
9f82ac5738 Remove GlobalObject::getAlign/setAlignment (#143188)
Currently, GlobalObject has an "alignment" property... but it's
basically nonsense: alignment doesn't mean the same thing for variables
and functions, and it's completely meaningless for ifuncs.

This "removes" (actually marking protected) the methods from
GlobalObject, adds the relevant methods to Function and GlobalVariable,
and adjusts the code appropriately.

This should make future alignment-related cleanups easier.
2025-06-09 13:51:03 -07:00
Florian Hahn
f9b98e386e [LV] Remove unused LoopMiddleBlock arg from fixReductionScalarRes (NFC)
The argument isn't used, remove it.
2025-06-09 21:47:03 +01:00
Prabhu Rajasekaran
d0a1dce126 [llvm][X86] REX profile for UEFI (#138362)
Use the appropriate REX prefix for UEFI X86_64 target.
2025-06-09 13:46:40 -07:00
David Peixotto
d4fe522eb4 Add commands to list/enable/disable plugins (#134418)
This commit adds three new commands for managing plugins. The `list`
command will show which plugins are currently registered and their
enabled state. The `enable` and `disable` commands can be used to enable
or disable plugins.

A disabled plugin will not show up to the PluginManager when it iterates
over available plugins of a particular type.

The purpose of these commands is to provide more visibility into
registered plugins and allow users to disable plugins for experimental
perf reasons.

There are a few limitations to the current implementation

1. Only SystemRuntime and InstrumentationRuntime plugins are currently
supported. We can easily extend the existing implementation to support
more types. The scope was limited to these plugins to keep the PR size
manageable.

2. Only "statically" know plugin types are supported (i.e. those managed
by the PluginManager and not from `plugin load`). It is possibly we
could support dynamic plugins as well, but I have not looked into it
yet.
2025-06-09 13:30:13 -07:00
David Green
61cdba602a [AArch64][GlobalISel] Expand 64bit extracts to 128bit to allow more patterns (#142904)
SDAG will promote a 64bit G_EXTRACT_VECTOR_ELT to 128 to reduce the
number of duplicate lane-extract patterns needed. This patch does the
same for gisel inside regbankselect, so that selection will operate on
the larger vectors.

Most of the tests just add kill markers, but arm64-neon-v8.1a.ll shows the
lanewise patterns now being selected (which, as of this patch is now
fully producing the same code as SDAG).
2025-06-09 21:19:09 +01:00
Andy Kaylor
6559831025 [CIR] Add support for accessing members of base classes (#143195)
This change adds the support for accessing a member of a base class from
a derived class object.
2025-06-09 13:11:12 -07:00
Amr Hesham
f12e4f2faf [CIR][NFS] Add test cases for VecShuffle with -1 index (#143304)
Add a test case for __builtin_shufflevector with -1 index, it was useful
in the incubator to catch an issue in the folder
2025-06-09 22:08:55 +02:00
Florian Hahn
6108d50aed [VPlan] Add ReductionStartVector VPInstruction. (#142290)
Add a new VPInstruction::ReductionStartVector opcode to create the start
values for wide reductions. This more accurately models the start value
creation in VPlan and simplifies VPReductionPHIRecipe::execute. Down the
line it also allows removing VPReductionPHIRecipe::RdxDesc.

PR: https://github.com/llvm/llvm-project/pull/142290
2025-06-09 20:59:12 +01:00
David Green
6cbd91ea52 [AArch64][GlobalISel] Combine G_UNMERGE(G_DUPLANE16) -> G_DUPLANE16 (#142731)
We will generate G_UNMERGE(G_DUPLANE16) due to the legalization of
shuffle vector splats with mismatching vector sizes. The G_DUPLANE
intrinsics can handle different vector sizes (128bit and 64bit output,
for example), and we can combine away the unmerge.
2025-06-09 20:57:45 +01:00
Jon Roelofs
274f5a817b [Matrix] Propagate shape information through (f)abs insts (#141704) 2025-06-09 12:52:43 -07:00
Kazu Hirata
efc3c1ba29 [memprof] Use std::tie to implement operator< (NFC) (#143401) 2025-06-09 12:46:38 -07:00
Kazu Hirata
9fe3ede185 [X86] Use llvm::none_of (NFC) (#143398) 2025-06-09 12:46:30 -07:00
Kazu Hirata
6e6ba60336 [mlir] Use llvm::max_element (NFC) (#143396) 2025-06-09 12:46:23 -07:00
Kazu Hirata
629aebcd17 [CodeGen] Use llvm::has_single_bit (NFC) (#143394) 2025-06-09 12:46:15 -07:00
Kazu Hirata
0f5a78516a [lld] Use llvm::has_single_bit (NFC) (#143393) 2025-06-09 12:46:07 -07:00
Kazu Hirata
17999f01bb [BPF] Initialize SmallVector (NFC) (#143392) 2025-06-09 12:45:59 -07:00
Kazu Hirata
60cd76bc34 [CodeGen] Construct SmallVector with ArrayRef (NFC) (#143391) 2025-06-09 12:45:52 -07:00
Yifei Xu
787efa78a4 [bazel] Revert "[bazel] llvm-config.h: Turn on LLVM_ENABLE_PLUGINS" as it fails TensorFlow Windows build (#143419)
Here is the error message

[3,466 / 5,762] 1 / 149 tests; [Sched] Compiling
llvm/lib/Support/BinaryStreamError.cpp ... (456 actions, 2 running)
ERROR: C:/t/g5cdusdm/external/llvm-project/llvm/BUILD.bazel:253:11:
Compiling llvm/lib/Support/ExtensibleRTTI.cpp [for tool] failed: (Exit
1): clang-cl.exe failed: error executing CppCompile command (from target
@@llvm-project//llvm:Support)
  cd /d C:/t/g5cdusdm/execroot/org_tensorflow
SET INCLUDE=C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include;C:\Program
Files\Microsoft Visual
Studio\2022\Community\VC\Auxiliary\VS\include;C:\Program Files
(x86)\Windows Kits\10\include\10.0.22621.0\ucrt;C:\Program Files
(x86)\Windows Kits\10\\include\10.0.22621.0\\um;C:\Program Files
(x86)\Windows Kits\10\\include\10.0.22621.0\\shared;C:\Program Files
(x86)\Windows Kits\10\\include\10.0.22621.0\\winrt;C:\Program Files
(x86)\Windows
Kits\10\\include\10.0.22621.0\\cppwinrt;C:\tools\LLVM\lib\clang\18\include
SET PATH=C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.42.34433\bin\HostX64\x64;C:\Program
Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\VC\VCPackages;C:\Program
Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program
Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team
Explorer;C:\Program Files\Microsoft Visual
Studio\2022\Community\MSBuild\Current\bin\Roslyn;C:\Program Files
(x86)\Windows Kits\10\bin\10.0.22621.0\\x64;C:\Program Files
(x86)\Windows Kits\10\bin\\x64;C:\Program Files\Microsoft Visual
Studio\2022\Community\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program
Files\Microsoft Visual Studio\2022\Community\Common7\IDE\;C:\Program
Files\Microsoft Visual
Studio\2022\Community\Common7\Tools\;;C:\Windows\system32;C:\Program
Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe
    SET PWD=/proc/self/cwd
    SET TEMP=C:\TMP
    SET TMP=C:\TMP
    SET VSLANG=1033
C:\tools\LLVM\bin\clang-cl.exe /nologo /DCOMPILER_MSVC /DNOMINMAX
/D_WIN32_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE
/D_CRT_SECURE_NO_WARNINGS /bigobj /Zm500 /EHsc /wd4351 /wd4291 /wd4250
/wd4996 /Iexternal/llvm-project
/Ibazel-out/x64_windows-opt-exec-ST-766941a09caf/bin/external/llvm-project
/Iexternal/llvm-project/llvm/include
/Ibazel-out/x64_windows-opt-exec-ST-766941a09caf/bin/external/llvm-project/llvm/include
/D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS
/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_NONSTDC_NO_WARNINGS
/D_SCL_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS /DUNICODE
/D_UNICODE /DLTDL_SHLIB_EXT=".dll" /DLLVM_PLUGIN_EXT=".dll"
/DLLVM_NATIVE_ARCH="X86"
/DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser
/DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter
/DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler
/DLLVM_NATIVE_TARGET=LLVMInitializeX86Target
/DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo
/DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC
/DLLVM_NATIVE_TARGETMCA=LLVMInitializeX86TargetMCA
/DLLVM_HOST_TRIPLE="x86_64-pc-win32"
/DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-pc-win32" /DLLVM_VERSION_MAJOR=21
/DLLVM_VERSION_MINOR=0 /DLLVM_VERSION_PATCH=0
/DLLVM_VERSION_STRING="21.0.0git" /D__STDC_LIMIT_MACROS
/D__STDC_CONSTANT_MACROS /D__STDC_FORMAT_MACROS
/DLLVM_HAS_AArch64_TARGET=1 /DLLVM_HAS_AMDGPU_TARGET=1
/DLLVM_HAS_ARM_TARGET=1 /DLLVM_HAS_NVPTX_TARGET=1
/DLLVM_HAS_PowerPC_TARGET=1 /DLLVM_HAS_RISCV_TARGET=1
/DLLVM_HAS_SystemZ_TARGET=1 /DLLVM_HAS_X86_TARGET=1 /DBLAKE3_USE_NEON=0
/DBLAKE3_NO_AVX2 /DBLAKE3_NO_AVX512 /DBLAKE3_NO_SSE2 /DBLAKE3_NO_SSE41
/showIncludes /MD /O2 /Oy- /DNDEBUG /wd4117 -D__DATE__="redacted"
-D__TIMESTAMP__="redacted" -D__TIME__="redacted"
-Wno-builtin-macro-redefined /Gy /Gw /W0 /Zc:__cplusplus
/D_USE_MATH_DEFINES /d2ReducedOptimizeHugeFunctions
-D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN32_LEAN_AND_MEAN -DNOGDI
/Zc:preprocessor /clang:-Weverything /clang:-Weverything
/d2ReducedOptimizeHugeFunctions /std:c++17
/Fobazel-out/x64_windows-opt-exec-ST-766941a09caf/bin/external/llvm-project/llvm/_objs/Support/ExtensibleRTTI.obj
/c external/llvm-project/llvm/lib/Support/ExtensibleRTTI.cpp
# Configuration:
f85b29406574d83c673497718f542456050c5649ae41eb37a803b7085e15c4ef
# Execution platform:
//tensorflow/tools/toolchains/win2022:windows_ltsc2022_clang
external/llvm-project/llvm/lib/Support/ExtensibleRTTI.cpp(12,22): error:
definition of dllimport static field not allowed
   12 | char llvm::RTTIRoot::ID = 0;
      |                      ^
external/llvm-project/llvm/include\llvm/Support/ExtensibleRTTI.h(71,7):
note: attribute is here
   71 | class LLVM_ABI RTTIRoot {
      |       ^
external/llvm-project/llvm/include\llvm/Support/Compiler.h(205,29):
note: expanded from macro 'LLVM_ABI'
  205 | #define LLVM_ABI __declspec(dllimport)
      |                             ^
1 error generated.
2025-06-09 12:41:47 -07:00
Craig Topper
112490f06a [ConstantFolding] Add support for llvm.atan in constant folding. (#143416)
Fixes #143360
2025-06-09 12:38:08 -07:00
jeremyd2019
d659364295 [Support][Cygwin] Fix handling of Process symbol lookup. (#143072)
In Unix/DynamicLibrary.inc, it was already known that Cygwin required
use of `RTLD_DEFAULT` as the `Handle` parameter to `DLSym` to search all
modules for a symbol. Unfortunately, RTLD_DEFAULT is defined as NULL, so
the existing checks of the `Process` handle meant `DLSym` would never be
called on Cygwin. Use the existing `&Invalid` sentinel instead of
`nullptr` for the `Process` handle.
2025-06-09 22:19:37 +03:00
Tomohiro Kashiwada
e7739eb6cc [Clang] [Cygwin] wint_t is unsigned int (#143117)
On Cygwin environment, wint_t is unsigned int as shown here:
```
$ echo | gcc -m32 -xc - -E -dM | grep WINT_T
145:#define __SIZEOF_WINT_T__ 4
315:#define __WINT_TYPE__ unsigned int
```

```
$ echo | gcc -xc - -E -dM | grep WINT_T
147:#define __SIZEOF_WINT_T__ 4
317:#define __WINT_TYPE__ unsigned int
```

```
$ LANG=C gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/15/lto-wrapper.exe
Target: x86_64-pc-cygwin
(snip)
```
2025-06-09 22:19:06 +03:00
Corentin Jabot
c8009797d3 [Clang] Implement CWG2496 (#142975)
https://cplusplus.github.io/CWG/issues/2496.html

We failed to diagnose the following in C++23 mode

```
struct S {
    virtual void f(); // expected-note {{previous declaration is here}}
};

struct T : S {
    virtual void f() &;
};
```
2025-06-09 21:16:57 +02:00
Brox Chen
8380a5500b [AMDGPU][True16][CodeGen] atomic load/store i8 in true16 mode (#143044)
Follow up patch from https://github.com/llvm/llvm-project/pull/142822.

Update other 16bit atomic load/store pattern in t16 mode
2025-06-09 15:05:06 -04:00
arysef
78af498035 [LLVM][IR] Support target extension types in vectors (#140630)
This change is to support target extension types in vectors. The change
allows sized target extension types to opt-in to being a valid vector
element.
Allowing target extension types as vector elements will allow backends
to use vector operations such as `insertelement` and `extractelement` on
their target types with minimal changes.

RFC:
https://discourse.llvm.org/t/rfc-supporting-sized-target-extension-types-in-vector/86431
2025-06-09 12:03:15 -07:00
Jeremy Morse
7433d8ce50 Follow up to 0e4b8b8f81, squash unused variable warning 2025-06-09 20:02:04 +01:00
Charitha Saumya
10dc8bc519 [mlir][vector] Fix for WarpOpScfForOp failure when scf.for has results that are unused. (#141853)
Currently, only the values defined outside ForOp but inside the original
WarpOp are considered "escaping values". However this is not true if the
ForOp has some unused results. In this case, corresponding IterArgs must
also be yielded by the original WarpOp. This PR adds the required code
changes to achieve this.
2025-06-09 11:56:34 -07:00
Baranov Victor
5213c57cb1 [clang-tidy][NFC] run clang-format over clang-tidy checks and tool code. (#143324) 2025-06-09 21:54:48 +03:00
Chenguang Wang
13b1803b64 [CodeGen] Add <4096 x i32> value type (#143417)
Similar to https://github.com/llvm/llvm-project/pull/139294; just
realized we need this as well.
2025-06-09 11:49:39 -07:00
Florian Hahn
c2ea9404ab [LV] Simplify finding EPResumeValue (NFC).
It should be sufficient to check that the resume phi has the correct
type, as the vector trip count as incoming value and starts at 0
otherwise. There is no need to find the middle block.
2025-06-09 19:37:33 +01:00
Jeremy Morse
0e4b8b8f81 [DebugInfo][RemoveDIs] Rip out the UseNewDbgInfoFormat flag (#143207)
Start removing debug intrinsics support -- starting with the flag that
controls production of their replacement, debug records. This patch
removes the command-line-flag and with it the ability to switch back to
intrinsics. The module / function / block level "IsNewDbgInfoFormat"
flags get hardcoded to true, I'll to incrementally remove things that
depend on those flags.
2025-06-09 19:36:34 +01:00
Umang Yadav
7f08503a3b Introduce arith.scaling_extf and arith.scaling_truncf (#141965)
This PR adds `arith.scaling_truncf` and `arith.scaling_extf` operations
which supports the block quantization following OCP MXFP specs listed
here
https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf

OCP MXFP Spec comes with reference implementation here
https://github.com/microsoft/microxcaling/tree/main

Interesting piece of reference code is this method `_quantize_mx`
7bc41952de/mx/mx_ops.py (L173).

Both `arith.scaling_truncf` and `arith.scaling_extf` are designed to be
an elementwise operation. Please see description about them in
`ArithOps.td` file for more details.
 
Internally, 

`arith.scaling_truncf` does the
`arith.truncf(arith.divf(input/(2^scale)))`. `scale` should have
necessary broadcast, clamping, normalization and NaN propagation done
before callling into `arith.scaling_truncf`.

`arith.scaling_extf` does the `arith.mulf(2^scale, input)` after taking
care of necessary data type conversions.


CC: @krzysz00 @dhernandez0 @bjacob @pashu123 @MaheshRavishankar
@tgymnich

---------

Co-authored-by: Prashant Kumar <pk5561@gmail.com>
Co-authored-by: Krzysztof Drewniak <Krzysztof.Drewniak@amd.com>
2025-06-09 13:13:31 -05:00
RolandF77
5d6218d311 [PowerPC] extend smaller splats into bigger splats (with fix) (#142194)
For pwr9, xxspltib is a byte splat with a range -128 to 127 - it can be
used with a following vector extend sign to make splats of i16, i32, or
i64 element size. For pwr8, vspltisw with a following vector extend sign
can be used to make splats of i64 elements in the range -16 to 15.

Add check for P8 to make sure the 64-bit vector ops are there.
2025-06-09 14:01:38 -04:00
Simon Pilgrim
01671ff849 [X86] collectConcatOps - handle extract_subvector(concat_subvectors(...)) patterns (#143406) 2025-06-09 18:40:15 +01:00
Artem Belevich
59ef2c34a1 [CUDA] Disallow use of address_space(N) on CUDA device variables. (#142857)
The variables have implicit host-side shadow instances and explicit
address space attribute breaks them on the host.
2025-06-09 10:39:04 -07:00
Lei Huang
649020c680 [PowerPC] Change default for auto gen stxvp for cpu=future (#142826)
For cpu=future, we want to auto generate stxvp instructions by default.
2025-06-09 12:34:50 -04:00
Philip Reames
a85525f875 [RISCV][LV] Add tests for masked interleaved access 2025-06-09 09:32:39 -07:00
Thurston Dang
a178c06add [tsan] Don't symbolize stack traces if dl_iterate_phdr is not ready (#143199)
When a CHECK() fails during TSan initialization, it may segfault (e.g., https://github.com/google/sanitizers/issues/837#issuecomment-2939267531). This is because a failed CHECK() will attempt to print a symbolized stack trace, which requires dl_iterate_phdr, but the interceptor may not yet be set up.

This patch fixes the issue by not symbolizing the stack trace if the dl_iterate_phdr interceptor is not ready.
2025-06-09 09:29:16 -07:00
Andy Kaylor
4ed0ff8756 [CIR] Add support for using enum constants (#143214)
Although support for declaring enums and using values whose type was an
enum was previously upstreamed, we didn't have support for referencing
the constant values declared in the enum. This change adds that support.
2025-06-09 09:19:31 -07:00
Craig Topper
58cce436d6 [RISCV] Pass SDLoc by const reference. NFC 2025-06-09 09:14:50 -07:00
Corentin Jabot
9c52b3c52e [Clang] Clarify the [[trivial_abi]] documentation. (#143243)
Fixes #36667
2025-06-09 17:32:48 +02:00
Ross Brunton
637df705e5 [Offload] Add OFFLOAD_INCLUDE_TESTS (#143388)
This is a cmake variable which, if set to `OFF` will disable building of
tests. It defaults to the value of `LLVM_INCLUDE_TESTS`.
2025-06-09 10:27:40 -05:00
Darren Wihandi
a3c7d46145 [mlir][spirv] Implement UMod canonicalization for vector constants (#141902)
Closes #63174. 

Implements this transformation pattern, which is currently only applied
to scalars, for vectors:
```
%1 = "spirv.UMod"(%0, %CONST_32) : (i32, i32) -> i32
%2 = "spirv.UMod"(%1, %CONST_4) : (i32, i32) -> i32
```
to
```
%1 = "spirv.UMod"(%0, %CONST_32) : (i32, i32) -> i32
%2 = "spirv.UMod"(%0, %CONST_4) : (i32, i32) -> i32
```

Additionally fixes and issue where patterns like this:
```
%1 = "spirv.UMod"(%0, %CONST_4) : (i32, i32) -> i32
%2 = "spirv.UMod"(%1, %CONST_32) : (i32, i32) -> i32
```
were incorrectly canonicalized to:
```
%1 = "spirv.UMod"(%0, %CONST_4) : (i32, i32) -> i32
%2 = "spirv.UMod"(%0, %CONST_32) : (i32, i32) -> i32
```
which is incorrect since `(X % A) % B` == `(X % B)` IFF A is a multiple
of B, i.e., B divides A.
2025-06-09 11:09:36 -04:00
Corentin Jabot
02f0f5c3ec [Clang] Explain why a type is not replaceable. (#143265)
As a drive by fix the definition of replaceable, that did not correctly
implement https://eel.is/c++draft/class.prop#6.3
2025-06-09 17:05:25 +02:00