[all-commits] [llvm/llvm-project] 1504fc: AMDGPU: Stop emitting an error on illegal addrspac...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Fri Feb 21 09:36:15 PST 2025
Branch: refs/heads/release/20.x
Home: https://github.com/llvm/llvm-project
Commit: 1504fc57d88d5d700d5f8053ebc46b33e8bb12bf
https://github.com/llvm/llvm-project/commit/1504fc57d88d5d700d5f8053ebc46b33e8bb12bf
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2025-02-21 (Fri, 21 Feb 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/test/CodeGen/AMDGPU/atomicrmw-expand.ll
M llvm/test/CodeGen/AMDGPU/invalid-addrspacecast.ll
Log Message:
-----------
AMDGPU: Stop emitting an error on illegal addrspacecasts (#127487) (#127751)
These cannot be static compile errors, and should be treated as
poison. Invalid casts may be introduced which are dynamically dead.
For example:
```
void foo(volatile generic int* x) {
__builtin_assume(is_shared(x));
*x = 4;
}
void bar() {
private int y;
foo(&y); // violation, wrong address space
}
```
This could produce a compile time backend error or not depending on
the optimization level. Similarly, the new test demonstrates a failure
on a lowered atomicrmw which required inserting runtime address
space checks. The invalid cases are dynamically dead, we should not
error, and the AtomicExpand pass shouldn't have to consider the details
of the incoming pointer to produce valid IR.
This should go to the release branch. This fixes broken -O0 compiles
with 64-bit atomics which would have started failing in
1d03708.
(cherry picked from commit 18ea6c9)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list