[llvm] [AMDGPU] Re-enable closed-world assumption as an opt-in feature (PR #115371)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 12:45:44 PST 2024


================
@@ -0,0 +1,12 @@
+; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -O3 -debug-only=amdgpu-attributor -o - %s 2>&1 | FileCheck %s --check-prefix=NO-CW
+; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes="lto<O3>" -debug-only=amdgpu-attributor -o - %s 2>&1 | FileCheck %s --check-prefix=NO-CW
+; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes="lto<O3>" -debug-only=amdgpu-attributor -amdgpu-link-time-closed-world=1 -o - %s 2>&1 | FileCheck %s --check-prefix=CW
+
+; REQUIRES: amdgpu-registered-target
+; REQUIRES: asserts
+
+; NO-CW: Module {{.*}} is not assumed to be a closed world.
+; CW: Module {{.*}} is assumed to be a closed world.
+define hidden noundef i32 @_Z3foov() {
----------------
shiltian wrote:

that is tested in other files. this PR is just to toggle the switch on/off. it doesn't introduce this as a new feature.

https://github.com/llvm/llvm-project/pull/115371


More information about the llvm-commits mailing list