From 95d5d054f5d2b58e98173420221dcac3bac629ca Mon Sep 17 00:00:00 2001 From: "John F. Carr" Date: Tue, 17 Oct 2023 19:55:19 -0400 Subject: [PATCH] Update tests for new intrinsic signature --- clang/test/Cilk/hyper-array-extern-1.cpp | 2 +- clang/test/Cilk/hyper-assign.c | 14 +++++++------- clang/test/Cilk/hyper-complex.c | 6 +++--- clang/test/Cilk/hyper-copy.c | 4 ++-- clang/test/Cilk/hyper-template.cpp | 3 ++- clang/test/Cilk/hyper-unary.c | 18 +++++++++--------- llvm/test/Transforms/Tapir/157.ll | 6 +++--- .../Tapir/loop-stripmine-epilog-taskframe.ll | 14 +++++++------- 8 files changed, 34 insertions(+), 33 deletions(-) diff --git a/clang/test/Cilk/hyper-array-extern-1.cpp b/clang/test/Cilk/hyper-array-extern-1.cpp index a2fe40185797..7969ba7366f2 100644 --- a/clang/test/Cilk/hyper-array-extern-1.cpp +++ b/clang/test/Cilk/hyper-array-extern-1.cpp @@ -10,7 +10,7 @@ int read_array_hyper(unsigned i) { return x[i]; // CHECK: %[[ARRAYIDX:.+]] = getelementptr inbounds - // CHECK: %[[VIEWRAW:.+]] = call ptr @llvm.hyper.lookup.i64(ptr %[[ARRAYIDX]], i64 4, ptr null, ptr null) + // CHECK: %[[VIEWRAW:.+]] = call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr %[[ARRAYIDX]], i64 4, ptr null, ptr null) // CHECK-NOT: call ptr @llvm.hyper.lookup // CHECK: %[[VAL:.+]] = load i32, ptr %[[VIEWRAW]] // CHECK: ret i32 %[[VAL]] diff --git a/clang/test/Cilk/hyper-assign.c b/clang/test/Cilk/hyper-assign.c index 2c7fe46fd6b5..0363ad1247a4 100644 --- a/clang/test/Cilk/hyper-assign.c +++ b/clang/test/Cilk/hyper-assign.c @@ -6,18 +6,18 @@ extern long _Hyperobject x, _Hyperobject y; long chain_assign() { - // CHECK: %[[Y1RAW:.+]] = call ptr @llvm.hyper.lookup.i64(ptr @y, i64 8, ptr null, ptr null) + // CHECK: %[[Y1RAW:.+]] = call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @y, i64 8, ptr null, ptr null) // CHECK: %[[Y1VAL:.+]] = load i64, ptr %[[Y1RAW]] - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @x, i64 8, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @x, i64 8, ptr null, ptr null) // CHECK: store i64 %[[Y1VAL]] - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @y, i64 8, ptr null, ptr null) - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @x, i64 8, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @y, i64 8, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @x, i64 8, ptr null, ptr null) return x = y = x = y; } long simple_assign(long val) { - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @x, i64 8, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @x, i64 8, ptr null, ptr null) // CHECK-NOT: call ptr @llvm.hyper.lookup // CHECK: store i64 return x = val; @@ -26,11 +26,11 @@ long simple_assign(long val) long subtract() { // The order is not fixed here. - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @y, i64 8, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @y, i64 8, ptr null, ptr null) // CHECK: load i64 // CHECK: add nsw i64 %[[Y:.+]], 1 // CHECK: store i64 - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @x, i64 8, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @x, i64 8, ptr null, ptr null) // CHECK: load i64 // CHECK: sub nsw // CHECK: store i64 diff --git a/clang/test/Cilk/hyper-complex.c b/clang/test/Cilk/hyper-complex.c index 8b748b82a335..bcdb63498d66 100644 --- a/clang/test/Cilk/hyper-complex.c +++ b/clang/test/Cilk/hyper-complex.c @@ -7,7 +7,7 @@ extern __complex__ float _Hyperobject c; // CHECK-LABEL: get_real float get_real() { - // CHECK: %[[RAW1:.+]] = call ptr @llvm.hyper.lookup.i64(ptr @c, i64 8, ptr null, ptr null) + // CHECK: %[[RAW1:.+]] = call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @c, i64 8, ptr null, ptr null) // CHECK: %[[FIELD1:.+]] = getelementptr inbounds { float, float }, ptr %[[RAW1]], i32 0, i32 0 // CHECK: %[[RET1:.+]] = load float, ptr %[[FIELD1]] // CHECK: ret float %[[RET1]] @@ -16,7 +16,7 @@ float get_real() // CHECK-LABEL: get_imag float get_imag() { - // CHECK: %[[RAW2:.+]] = call ptr @llvm.hyper.lookup.i64(ptr @c, i64 8, ptr null, ptr null) + // CHECK: %[[RAW2:.+]] = call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @c, i64 8, ptr null, ptr null) // CHECK: %[[FIELD2:.+]] = getelementptr inbounds { float, float }, ptr %[[RAW2]], i32 0, i32 1 // CHECK: load float, ptr %[[FIELD2]] // CHECK: ret float @@ -27,7 +27,7 @@ float get_imag() float get_abs() { // Only one call to llvm.hyper.lookup. - // CHECK: @llvm.hyper.lookup.i64(ptr @c, i64 8, ptr null, ptr null) + // CHECK: @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @c, i64 8, ptr null, ptr null) // CHECK-NOT: @llvm.hyper.lookup // CHECK: call float @cabsf // CHECK: ret float diff --git a/clang/test/Cilk/hyper-copy.c b/clang/test/Cilk/hyper-copy.c index 73eac0728bbd..6faf48785319 100644 --- a/clang/test/Cilk/hyper-copy.c +++ b/clang/test/Cilk/hyper-copy.c @@ -9,9 +9,9 @@ extern struct S b __attribute__((aligned(8))); // CHECK-LABEL: scopy void scopy() { - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @a, i64 8, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @a, i64 8, ptr null, ptr null) // CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 8 @b, - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @a, i64 8, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @a, i64 8, ptr null, ptr null) // CHECK: call void @llvm.memcpy.p0.p0.i64 // CHECK: ret void b = a; diff --git a/clang/test/Cilk/hyper-template.cpp b/clang/test/Cilk/hyper-template.cpp index e5a5e78430be..c162d905c566 100644 --- a/clang/test/Cilk/hyper-template.cpp +++ b/clang/test/Cilk/hyper-template.cpp @@ -5,7 +5,8 @@ template struct S { T member; }; S _Hyperobject S_long; // CHECK-LABEL: @_Z1fv -// CHECK: %0 = call ptr @llvm.hyper.lookup.i64(ptr @S_long, i64 8, ptr null, ptr null) +// CHECK: %0 = call ptr @llvm.tapir.frame() +// CHECK: %1 = call ptr @llvm.hyper.lookup.i64(ptr %0, ptr @S_long, i64 8, ptr null, ptr null) // CHECK-NOT: call ptr @llvm.hyper.lookup // CHECK: getelementptr // CHECK: %[[RET:.+]] = load i64 diff --git a/clang/test/Cilk/hyper-unary.c b/clang/test/Cilk/hyper-unary.c index 609420753beb..eefecee82985 100644 --- a/clang/test/Cilk/hyper-unary.c +++ b/clang/test/Cilk/hyper-unary.c @@ -11,9 +11,9 @@ void function1() { // CHECK: store i32 1, ptr %[[Y:.+]], int _Hyperobject y = 1; - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @x, i64 4, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @x, i64 4, ptr null, ptr null) // CHECK: load i32 - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %[[Y]], i64 4, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr %[[Y]], i64 4, ptr null, ptr null) // CHECK: load i32 (void)x; (void)y; } @@ -23,9 +23,9 @@ void function2() { // CHECK: store i32 1, ptr %[[Y:.+]], int _Hyperobject y = 1; - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @x, i64 4, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @x, i64 4, ptr null, ptr null) // CHECK: load i32 - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %[[Y]], i64 4, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr %[[Y]], i64 4, ptr null, ptr null) // CHECK: load i32 (void)!x; (void)!y; } @@ -35,18 +35,18 @@ void function3() { // CHECK: store i32 1, ptr %[[Y:.+]], int _Hyperobject y = 1; - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @x, i64 4, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @x, i64 4, ptr null, ptr null) // CHECK: load i32 - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %[[Y]], i64 4, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr %[[Y]], i64 4, ptr null, ptr null) // CHECK: load i32 (void)-x; (void)-y; - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr @x, i64 4, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr @x, i64 4, ptr null, ptr null) // CHECK: load i32 - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %[[Y]], i64 4, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr %[[Y]], i64 4, ptr null, ptr null) // CHECK: load i32 (void)~x; (void)~y; // CHECK: %[[XP:.+]] = load ptr, ptr @xp - // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %[[XP]], i64 4, ptr null, ptr null) + // CHECK: call ptr @llvm.hyper.lookup.i64(ptr %{{[0-9]+}}, ptr %[[XP]], i64 4, ptr null, ptr null) // CHECK: load i32 (void)*xp; } diff --git a/llvm/test/Transforms/Tapir/157.ll b/llvm/test/Transforms/Tapir/157.ll index 09b1def9ff2a..9de69632faa4 100644 --- a/llvm/test/Transforms/Tapir/157.ll +++ b/llvm/test/Transforms/Tapir/157.ll @@ -35,7 +35,7 @@ pfor.cond: ; preds = %pfor.inc, %pfor.ph pfor.body: ; preds = %pfor.cond %2 = load i64, i64* %add.ptr, align 8, !tbaa !4 %3 = bitcast i64* %sum to i8* - %4 = call i8* @llvm.hyper.lookup(i8* nonnull %3, i64 8, i8* bitcast (void (i8*)* @zero to i8*), i8* bitcast (void (i8*, i8*)* @plus to i8*)) + %4 = call i8* @llvm.hyper.lookup(ptr null, i8* nonnull %3, i64 8, i8* bitcast (void (i8*)* @zero to i8*), i8* bitcast (void (i8*, i8*)* @plus to i8*)) %5 = bitcast i8* %4 to i64* %6 = load i64, i64* %5, align 8, !tbaa !4 %add = add nsw i64 %6, %2 @@ -52,7 +52,7 @@ pfor.cond.cleanup: ; preds = %pfor.inc pfor.end: ; preds = %entry, %pfor.cond.cleanup %7 = bitcast i64* %sum to i8* - %8 = call i8* @llvm.hyper.lookup(i8* nonnull %7, i64 8, i8* bitcast (void (i8*)* @zero to i8*), i8* bitcast (void (i8*, i8*)* @plus to i8*)) + %8 = call i8* @llvm.hyper.lookup(ptr null, i8* nonnull %7, i64 8, i8* bitcast (void (i8*)* @zero to i8*), i8* bitcast (void (i8*, i8*)* @plus to i8*)) %9 = bitcast i8* %8 to i64* %10 = load i64, i64* %9, align 8, !tbaa !4 %11 = bitcast i64* %sum to i8* @@ -92,7 +92,7 @@ declare void @llvm.reducer.register.i64(i8*, i64, i8*, i8*) #2 declare token @llvm.syncregion.start() #3 ; Function Attrs: hyper_view inaccessiblememonly injective mustprogress nofree nounwind readonly strand_pure willreturn -declare i8* @llvm.hyper.lookup(i8*, i64, i8*, i8*) #4 +declare i8* @llvm.hyper.lookup(i8 *, i8*, i64, i8*, i8*) #4 ; Function Attrs: argmemonly mustprogress nofree nosync nounwind willreturn declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #1 diff --git a/llvm/test/Transforms/Tapir/loop-stripmine-epilog-taskframe.ll b/llvm/test/Transforms/Tapir/loop-stripmine-epilog-taskframe.ll index f19908c12833..39f14ba2f5bf 100644 --- a/llvm/test/Transforms/Tapir/loop-stripmine-epilog-taskframe.ll +++ b/llvm/test/Transforms/Tapir/loop-stripmine-epilog-taskframe.ll @@ -212,13 +212,13 @@ det.achd: ; preds = %pfor.body %sum_racy.0.load = load i64, i64* %sum_racy, align 8 %add5 = add nsw i64 %sum_racy.0.load, %4 store i64 %add5, i64* %sum_racy, align 8, !tbaa !7 - %5 = call i8* @llvm.hyper.lookup.i64(i8* nonnull %0, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) + %5 = call i8* @llvm.hyper.lookup.i64(ptr null, i8* nonnull %0, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) %6 = bitcast i8* %5 to i64* %7 = load i64, i64* %6, align 8, !tbaa !7 %add7 = add nsw i64 %7, %4 store i64 %add7, i64* %6, align 8, !tbaa !7 %8 = load i64, i64* %add.ptr.i, align 8, !tbaa !7 - %9 = call i8* @llvm.hyper.lookup.i64(i8* nonnull %1, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) + %9 = call i8* @llvm.hyper.lookup.i64(ptr null, i8* nonnull %1, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) %10 = bitcast i8* %9 to i64* %11 = load i64, i64* %10, align 8, !tbaa !7 %sub9 = sub nsw i64 %11, %8 @@ -231,13 +231,13 @@ det.cont: ; preds = %det.achd, %pfor.bod %sum_racy.0.load91 = load i64, i64* %sum_racy, align 8 %add11 = add nsw i64 %sum_racy.0.load91, %12 store i64 %add11, i64* %sum_racy, align 8, !tbaa !7 - %13 = call i8* @llvm.hyper.lookup.i64(i8* nonnull %0, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) + %13 = call i8* @llvm.hyper.lookup.i64(ptr null, i8* nonnull %0, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) %14 = bitcast i8* %13 to i64* %15 = load i64, i64* %14, align 8, !tbaa !7 %add13 = add nsw i64 %15, %12 store i64 %add13, i64* %14, align 8, !tbaa !7 %16 = load i64, i64* %add.ptr.i79, align 8, !tbaa !7 - %17 = call i8* @llvm.hyper.lookup.i64(i8* nonnull %1, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) + %17 = call i8* @llvm.hyper.lookup.i64(ptr null, i8* nonnull %1, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) %18 = bitcast i8* %17 to i64* %19 = load i64, i64* %18, align 8, !tbaa !7 %sub15 = sub nsw i64 %19, %16 @@ -289,10 +289,10 @@ sync.continue21: ; preds = %pfor.cond.cleanup to label %cleanup unwind label %lpad17.loopexit.split-lp cleanup: ; preds = %sync.continue21, %entry - %21 = call i8* @llvm.hyper.lookup.i64(i8* nonnull %0, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) + %21 = call i8* @llvm.hyper.lookup.i64(ptr null, i8* nonnull %0, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) %22 = bitcast i8* %21 to i64* %23 = load i64, i64* %22, align 8, !tbaa !7 - %24 = call i8* @llvm.hyper.lookup.i64(i8* nonnull %1, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) + %24 = call i8* @llvm.hyper.lookup.i64(ptr null, i8* nonnull %1, i64 8, i8* bitcast (void (i8*)* @_ZN4cilkL4zeroIlEEvPv to i8*), i8* bitcast (void (i8*, i8*)* @_ZN4cilkL4plusIlEEvPvS1_ to i8*)) %25 = bitcast i8* %24 to i64* %26 = load i64, i64* %25, align 8, !tbaa !7 %sum_racy.0.load92 = load i64, i64* %sum_racy, align 8 @@ -467,7 +467,7 @@ declare void @llvm.reducer.register.i64(i8*, i64, i8*, i8*) #11 declare token @llvm.syncregion.start() #12 ; Function Attrs: hyper_view inaccessiblememonly injective mustprogress nofree nounwind readonly strand_pure willreturn -declare i8* @llvm.hyper.lookup.i64(i8*, i64, i8*, i8*) #13 +declare i8* @llvm.hyper.lookup.i64(i8*, i8*, i64, i8*, i8*) #13 ; Function Attrs: argmemonly mustprogress willreturn declare void @llvm.sync.unwind(token) #14