llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) <details> <summary>Changes</summary> Same as my previous approaches, this converts 12 'slightly higher' touch versions. Each of these were cases where the only difference in checked-IR is the SSA name, so this generalizes check-lines slightly to wqork with both. --- Full diff: https://github.com/llvm/llvm-project/pull/239826.diff 12 Files Affected: - (modified) clang/test/CodeGen/AArch64/inline-asm-p-constraint.c (+3-2) - (modified) clang/test/CodeGen/AArch64/inline-asm.c (+3-2) - (modified) clang/test/CodeGen/Sparc/sparcv8-inline-asm.c (+2-1) - (modified) clang/test/CodeGen/X86/amxavx512-builtins.c (+4-2) - (modified) clang/test/CodeGen/asm-inout.c (+2-1) - (modified) clang/test/CodeGen/fp-template.cpp (+3-1) - (modified) clang/test/CodeGen/pr9614.c (+2-1) - (modified) clang/test/CodeGenCXX/copy-initialization.cpp (+2-1) - (modified) clang/test/CodeGenCXX/default-arguments-with-immediate.cpp (+2-1) - (modified) clang/test/CodeGenCXX/this-nonnull.cpp (+4-2) - (modified) clang/test/CodeGenCXX/weak-init.cpp (+4-2) - (modified) clang/test/CodeGenOpenCL/numbered-address-space.cl (+3-2) ``````````diff diff --git a/clang/test/CodeGen/AArch64/inline-asm-p-constraint.c b/clang/test/CodeGen/AArch64/inline-asm-p-constraint.c index d1cca9afcba68..ec0277b495e40 100644 --- a/clang/test/CodeGen/AArch64/inline-asm-p-constraint.c +++ b/clang/test/CodeGen/AArch64/inline-asm-p-constraint.c @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -emit-llvm %s -o - -triple aarch64-linux-gnu | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -emit-llvm %s -o - -triple aarch64-linux-gnu | FileCheck %s %} void foo(void* ptr) { asm volatile("prfm pldl1keep, %a0\n" : : "p" (ptr)); - // CHECK: call void asm sideeffect "prfm pldl1keep, ${0:a}\0A", "r"(ptr %0) - // CHECK-NOT: call void asm sideeffect "prfm pldl1keep, ${0:a}\0A", "p"(ptr %0) + // CHECK: call void asm sideeffect "prfm pldl1keep, ${0:a}\0A", "r"(ptr %{{[0-9]+}}) + // CHECK-NOT: call void asm sideeffect "prfm pldl1keep, ${0:a}\0A", "p"(ptr % } diff --git a/clang/test/CodeGen/AArch64/inline-asm.c b/clang/test/CodeGen/AArch64/inline-asm.c index 8ddee560b11da..5124df47a2055 100644 --- a/clang/test/CodeGen/AArch64/inline-asm.c +++ b/clang/test/CodeGen/AArch64/inline-asm.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple arm64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s %} // The only part clang really deals with is the lvalue/rvalue // distinction on constraints. It's sufficient to emit llvm and make @@ -78,7 +79,7 @@ void test_gcc_registers(void) { void test_tied_earlyclobber(void) { register int a asm("x1"); asm("" : "+&r"(a)); - // CHECK: call i32 asm "", "=&{x1},0"(i32 %0) + // CHECK: call i32 asm "", "=&{x1},0"(i32 %{{[0-9]+}}) } void test_reduced_gpr_constraints(int var32, long var64) { @@ -102,4 +103,4 @@ void test_sme_constraints(){ asm("movt zt0[3, mul vl], z0" : : : "zt0"); // CHECK: call void asm sideeffect "movt zt0[3, mul vl], z0", "~{zt0}"() -} \ No newline at end of file +} diff --git a/clang/test/CodeGen/Sparc/sparcv8-inline-asm.c b/clang/test/CodeGen/Sparc/sparcv8-inline-asm.c index ba89083155bf8..c56df7433ba08 100644 --- a/clang/test/CodeGen/Sparc/sparcv8-inline-asm.c +++ b/clang/test/CodeGen/Sparc/sparcv8-inline-asm.c @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -triple sparc-unknown-unknown -emit-llvm %s -o - | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple sparc-unknown-unknown -emit-llvm %s -o - | FileCheck %s %} -// CHECK: define{{.*}} float @fabsf(float noundef %a) +// CHECK: define{{.*}} float @fabsf(float noundef %{{.*}}) // CHECK: %{{.*}} = call float asm sideeffect "fabss $1, $0;", "=e,f,~{y}"(float %{{.*}}) float fabsf(float a) { float res; diff --git a/clang/test/CodeGen/X86/amxavx512-builtins.c b/clang/test/CodeGen/X86/amxavx512-builtins.c index 073adab349764..98f02b6192319 100644 --- a/clang/test/CodeGen/X86/amxavx512-builtins.c +++ b/clang/test/CodeGen/X86/amxavx512-builtins.c @@ -1,5 +1,7 @@ // RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +amx-tile -target-feature +amx-avx512 \ // RUN: -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror -pedantic -Wno-gnu-statement-expression -flax-vector-conversions=none | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +amx-tile -target-feature +amx-avx512 \ +// RUN: -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror -pedantic -Wno-gnu-statement-expression -flax-vector-conversions=none | FileCheck %s %} #include <immintrin.h> #include <stddef.h> @@ -36,7 +38,7 @@ __m512h test_tile_cvtrowps2phl(unsigned int A) { __m512i test_tile_movrow(unsigned int A) { // CHECK-LABEL: @test_tile_movrow - // CHECK: %1 = call <16 x i32> @llvm.x86.tilemovrow(i8 1, i32 %{{.*}}) + // CHECK: call <16 x i32> @llvm.x86.tilemovrow(i8 1, i32 %{{.*}}) return _tile_movrow(1, A); } @@ -72,6 +74,6 @@ __m512h test_tile_cvtrowps2phli(void) { __m512i test_tile_movrowi(void) { // CHECK-LABEL: @test_tile_movrowi - // CHECK: %0 = call <16 x i32> @llvm.x86.tilemovrowi(i8 1, i32 2) + // CHECK: call <16 x i32> @llvm.x86.tilemovrowi(i8 1, i32 2) return _tile_movrowi(1, 2); } diff --git a/clang/test/CodeGen/asm-inout.c b/clang/test/CodeGen/asm-inout.c index 6d40451b778d9..24f82830ada01 100644 --- a/clang/test/CodeGen/asm-inout.c +++ b/clang/test/CodeGen/asm-inout.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s %} // PR3800 int *foo(void); @@ -51,7 +52,7 @@ __m64 test5(__m64 __A, __m64 __B) { int test6(void) { typedef unsigned char __attribute__((vector_size(8))) _m64u8; _m64u8 __attribute__((aligned(16))) Mu8_0, __attribute__((aligned(16))) Mu8_1; - // CHECK: call <8 x i8> asm "nop", "=y,0,~{dirflag},~{fpsr},~{flags}"(<8 x i8> %0) + // CHECK: call <8 x i8> asm "nop", "=y,0,~{dirflag},~{fpsr},~{flags}"(<8 x i8> %{{[0-9]+}}) asm ("nop" : "=y"(Mu8_1 ) : "0"(Mu8_0 )); return 0; } diff --git a/clang/test/CodeGen/fp-template.cpp b/clang/test/CodeGen/fp-template.cpp index a945b23fff109..1e665b9063ba1 100644 --- a/clang/test/CodeGen/fp-template.cpp +++ b/clang/test/CodeGen/fp-template.cpp @@ -1,5 +1,7 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s %} // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -fdelayed-template-parsing -o - %s | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple x86_64-linux-gnu -emit-llvm -fdelayed-template-parsing -o - %s | FileCheck %s %} template <typename T> T templ_01(T x, T y) { @@ -35,7 +37,7 @@ float func_02(float x, float y) { } // CHECK-LABEL: define {{.*}} float @_Z8templ_02IfET_S0_S0_ -// CHECK: %add = fadd float %0, %1 +// CHECK: fadd float %{{[0-9]+}}, %{{[0-9]+}} float func_03(float x, float y) { return templ_03(x, y); diff --git a/clang/test/CodeGen/pr9614.c b/clang/test/CodeGen/pr9614.c index d8a7a1add5f7c..bf15ae36faf3c 100644 --- a/clang/test/CodeGen/pr9614.c +++ b/clang/test/CodeGen/pr9614.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s %} // REQUIRES: x86-registered-target @@ -34,7 +35,7 @@ void f(void) { // CHECK-LABEL: define{{.*}} void @f() // CHECK: call void @foo() -// CHECK: call i32 @abs(i32 noundef %0) +// CHECK: call i32 @abs(i32 noundef %{{.*}}) // CHECK: call ptr @strrchr( // CHECK: call void @llvm.prefetch.p0( // CHECK: call ptr @memchr( diff --git a/clang/test/CodeGenCXX/copy-initialization.cpp b/clang/test/CodeGenCXX/copy-initialization.cpp index e0c4f9c1af573..eeb9582bf1ec8 100644 --- a/clang/test/CodeGenCXX/copy-initialization.cpp +++ b/clang/test/CodeGenCXX/copy-initialization.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s %} struct Foo { Foo(); @@ -12,7 +13,7 @@ struct Bar { void f(Foo); -// CHECK-LABEL: define{{.*}} void @_Z1g3Foo(ptr nofreeobj noundef align 1 dead_on_return dereferenceable(1) %foo) +// CHECK-LABEL: define{{.*}} void @_Z1g3Foo(ptr nofreeobj noundef align 1 dead_on_return dereferenceable(1) %{{.*}}) void g(Foo foo) { // CHECK: call void @_ZN3BarC1Ev // CHECK: @_ZNK3BarcvRK3FooEv diff --git a/clang/test/CodeGenCXX/default-arguments-with-immediate.cpp b/clang/test/CodeGenCXX/default-arguments-with-immediate.cpp index 54a02ffc06836..f936c78bbfe07 100644 --- a/clang/test/CodeGenCXX/default-arguments-with-immediate.cpp +++ b/clang/test/CodeGenCXX/default-arguments-with-immediate.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -std=c++2a -triple x86_64-elf-gnu %s -emit-llvm -o - | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -std=c++2a -triple x86_64-elf-gnu %s -emit-llvm -o - | FileCheck %s %} consteval int immediate() { return 0;} static int ext(); @@ -28,7 +29,7 @@ void test_member() { } // CHECK: define {{.*}} void @_ZN1AC2Ev{{.*}} -// CHECK: %call = call noundef i32 @_ZL13not_immediatev() +// CHECK: call noundef i32 @_ZL13not_immediatev() int never_referenced() {return 42;}; diff --git a/clang/test/CodeGenCXX/this-nonnull.cpp b/clang/test/CodeGenCXX/this-nonnull.cpp index 975a42291e2b0..73a4e00f83f96 100644 --- a/clang/test/CodeGenCXX/this-nonnull.cpp +++ b/clang/test/CodeGenCXX/this-nonnull.cpp @@ -1,5 +1,7 @@ // RUN: %clang_cc1 -emit-llvm -o - -triple=x86_64-linux-gnu %s | FileCheck %s -check-prefix=CHECK-YES +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -emit-llvm -o - -triple=x86_64-linux-gnu %s | FileCheck %s -check-prefix=CHECK-YES %} // RUN: %clang_cc1 -emit-llvm -o - -fno-delete-null-pointer-checks -triple=x86_64-linux-gnu %s | FileCheck %s -check-prefix=CHECK-NO +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -emit-llvm -o - -fno-delete-null-pointer-checks -triple=x86_64-linux-gnu %s | FileCheck %s -check-prefix=CHECK-NO %} struct Struct { int many; @@ -11,9 +13,9 @@ struct Struct { void TestReturnsVoid(Struct &s) { s.ReturnsVoid(); - // CHECK-YES: call void @_ZN6Struct11ReturnsVoidEv(ptr noundef nonnull align 4 dereferenceable(12) %0) + // CHECK-YES: call void @_ZN6Struct11ReturnsVoidEv(ptr noundef nonnull align 4 dereferenceable(12) %{{[0-9]+}}) /// FIXME Use dereferenceable after dereferenceable respects NullPointerIsValid. - // CHECK-NO: call void @_ZN6Struct11ReturnsVoidEv(ptr noundef align 4 dereferenceable_or_null(12) %0) + // CHECK-NO: call void @_ZN6Struct11ReturnsVoidEv(ptr noundef align 4 dereferenceable_or_null(12) %{{[0-9]+}}) } // CHECK-YES: declare void @_ZN6Struct11ReturnsVoidEv(ptr noundef nonnull align 4 dereferenceable(12)) diff --git a/clang/test/CodeGenCXX/weak-init.cpp b/clang/test/CodeGenCXX/weak-init.cpp index d9b17d9ca74f8..1ef022c99ea41 100644 --- a/clang/test/CodeGenCXX/weak-init.cpp +++ b/clang/test/CodeGenCXX/weak-init.cpp @@ -1,5 +1,7 @@ // RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple=x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s %} // RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -emit-llvm %s -o - -fexperimental-new-constant-interpreter | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple=x86_64-pc-linux-gnu -emit-llvm %s -o - -fexperimental-new-constant-interpreter | FileCheck %s %} extern const int W __attribute__((weak)) = 99; const int S = 77; @@ -7,6 +9,6 @@ const int S = 77; // CHECK: @C1 = {{.*}} 77 extern const int C1 = S; -// CHECK: %0 = load {{.*}} @W -// CHECK-NEXT: store {{.*}} %0, {{.*}} @C2 +// CHECK: [[V0:%.*]] = load {{.*}} @W +// CHECK-NEXT: store {{.*}} [[V0]], {{.*}} @C2 extern const int C2 = W; diff --git a/clang/test/CodeGenOpenCL/numbered-address-space.cl b/clang/test/CodeGenOpenCL/numbered-address-space.cl index f4ed7b8ee0e7d..61b889910dc30 100644 --- a/clang/test/CodeGenOpenCL/numbered-address-space.cl +++ b/clang/test/CodeGenOpenCL/numbered-address-space.cl @@ -1,18 +1,19 @@ // REQUIRES: amdgpu-registered-target // RUN: %clang_cc1 -cl-std=CL2.0 -Wno-error=incompatible-pointer-types -triple amdgpu8.02-unknown-unknown -emit-llvm -O0 -o - %s | FileCheck %s +// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -cl-std=CL2.0 -Wno-error=incompatible-pointer-types -triple amdgpu8.02-unknown-unknown -emit-llvm -O0 -o - %s | FileCheck %s %} // Make sure using numbered address spaces doesn't trigger crashes when a // builtin has an address space parameter. // CHECK-LABEL: @test_numbered_as_to_generic( -// CHECK: addrspacecast ptr addrspace(42) %0 to ptr +// CHECK: addrspacecast ptr addrspace(42) %{{[0-9]+}} to ptr void test_numbered_as_to_generic(__attribute__((address_space(42))) int *arbitary_numbered_ptr) { generic int* generic_ptr = arbitary_numbered_ptr; *generic_ptr = 4; } // CHECK-LABEL: @test_generic_as_to_builtin_parameter_explicit_cast( -// CHECK: addrspacecast ptr addrspace(3) %0 to ptr +// CHECK: addrspacecast ptr addrspace(3) %{{[0-9]+}} to ptr void test_generic_as_to_builtin_parameter_explicit_cast(__local int *local_ptr, float src) { generic int* generic_ptr = local_ptr; volatile float result = __builtin_amdgcn_ds_fmaxf((__local float*) generic_ptr, src, 0, 0, false); `````````` </details> https://github.com/llvm/llvm-project/pull/239826 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
