[llvm] 4afedbd - [LowerIFunc] Remove typed pointer test (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 00:46:10 PST 2023


Author: Nikita Popov
Date: 2023-01-18T09:45:51+01:00
New Revision: 4afedbdbd472bd9088bf677d97a1cc3eca5171fa

URL: https://github.com/llvm/llvm-project/commit/4afedbdbd472bd9088bf677d97a1cc3eca5171fa
DIFF: https://github.com/llvm/llvm-project/commit/4afedbdbd472bd9088bf677d97a1cc3eca5171fa.diff

LOG: [LowerIFunc] Remove typed pointer test (NFC)

Added: 
    

Modified: 
    

Removed: 
    llvm/test/Transforms/LowerIFunc/ifunc-typed.ll


################################################################################
diff  --git a/llvm/test/Transforms/LowerIFunc/ifunc-typed.ll b/llvm/test/Transforms/LowerIFunc/ifunc-typed.ll
deleted file mode 100644
index 96b149cb1ee9a..0000000000000
--- a/llvm/test/Transforms/LowerIFunc/ifunc-typed.ll
+++ /dev/null
@@ -1,54 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --include-generated-funcs
-; RUN: opt -S -passes=lower-ifunc < %s | FileCheck %s
-
-; Check that typed pointers still work
-
- at ifunc0 = ifunc i32(i32), i32(i32)* ()* @func0
-
-define i32 (i32)* @func0() {
-  ret i32 (i32)* null
-}
-
-define i32 (i64)* @func1() {
-  ret i32 (i64)* null
-}
-
- at ifunc1 = ifunc float(double), float(double)* ()* bitcast (i32(i64)* ()* @func1 to float(double)* ()*)
-
-define i32 @call_ifuncs() {
-  %call0 = call i32 @ifunc0(i32 123)
-  %call1 = call i32 bitcast (float(double)* @ifunc1 to i32()*)()
-  %add = add i32 %call0, %call1
-  ret i32 %add
-}
-;.
-; CHECK: @[[GLOB0:[0-9]+]] = internal global [2 x i8*] poison, align 8
-; CHECK: @[[LLVM_GLOBAL_CTORS:[a-zA-Z0-9_$"\\.-]+]] = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 10, void ()* @[[GLOB1:[0-9]+]], i8* null }]
-; CHECK: @[[IFUNC1:[a-zA-Z0-9_$"\\.-]+]] = ifunc float (double), bitcast (i32 (i64)* ()* @func1 to float (double)* ()*)
-;.
-; CHECK-LABEL: define {{[^@]+}}@func0(
-; CHECK-NEXT:    ret i32 (i32)* null
-;
-;
-; CHECK-LABEL: define {{[^@]+}}@func1(
-; CHECK-NEXT:    ret i32 (i64)* null
-;
-;
-; CHECK-LABEL: define {{[^@]+}}@call_ifuncs(
-; CHECK-NEXT:    [[TMP1:%.*]] = load i8*, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @[[GLOB0]], i32 0, i32 0), align 8
-; CHECK-NEXT:    [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32 (i32)*
-; CHECK-NEXT:    [[CALL0:%.*]] = call i32 [[TMP2]](i32 123)
-; CHECK-NEXT:    [[CALL1:%.*]] = call i32 bitcast (float (double)* @ifunc1 to i32 ()*)()
-; CHECK-NEXT:    [[ADD:%.*]] = add i32 [[CALL0]], [[CALL1]]
-; CHECK-NEXT:    ret i32 [[ADD]]
-;
-;
-; CHECK-LABEL: define {{[^@]+}}@1(
-; CHECK-NEXT:    [[TMP1:%.*]] = call i32 (i32)* @func0()
-; CHECK-NEXT:    [[TMP2:%.*]] = bitcast i32 (i32)* [[TMP1]] to i8*
-; CHECK-NEXT:    store i8* [[TMP2]], i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @[[GLOB0]], i32 0, i32 0), align 8
-; CHECK-NEXT:    [[TMP3:%.*]] = call i32 (i64)* @func1()
-; CHECK-NEXT:    [[TMP4:%.*]] = bitcast i32 (i64)* [[TMP3]] to i8*
-; CHECK-NEXT:    store i8* [[TMP4]], i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @[[GLOB0]], i32 0, i32 1), align 8
-; CHECK-NEXT:    ret void
-;


        


More information about the llvm-commits mailing list