[Mlir-commits] [mlir] 777784d - [MLIR] Convert some tests to opaque pointers (NFC)
Nikita Popov
llvmlistbot at llvm.org
Tue Jan 17 02:22:49 PST 2023
Author: Nikita Popov
Date: 2023-01-17T11:21:54+01:00
New Revision: 777784d9cff46768cc30214152ba7dc8ff9de0a7
URL: https://github.com/llvm/llvm-project/commit/777784d9cff46768cc30214152ba7dc8ff9de0a7
DIFF: https://github.com/llvm/llvm-project/commit/777784d9cff46768cc30214152ba7dc8ff9de0a7.diff
LOG: [MLIR] Convert some tests to opaque pointers (NFC)
Added:
Modified:
mlir/test/Target/LLVMIR/Import/import-failure.ll
mlir/test/Target/LLVMIR/Import/incorrect-instmap-assignment.ll
mlir/test/Target/LLVMIR/Import/profiling-metadata.ll
Removed:
################################################################################
diff --git a/mlir/test/Target/LLVMIR/Import/import-failure.ll b/mlir/test/Target/LLVMIR/Import/import-failure.ll
index 2086d8b8efb2..0570fe4bdeeb 100644
--- a/mlir/test/Target/LLVMIR/Import/import-failure.ll
+++ b/mlir/test/Target/LLVMIR/Import/import-failure.ll
@@ -1,9 +1,9 @@
; RUN: not mlir-translate -import-llvm -split-input-file %s 2>&1 | FileCheck %s
; CHECK: import-failure.ll
-; CHECK-SAME: error: unhandled instruction: indirectbr i8* %dst, [label %bb1, label %bb2]
-define i32 @unhandled_instruction(i8* %dst) {
- indirectbr i8* %dst, [label %bb1, label %bb2]
+; CHECK-SAME: error: unhandled instruction: indirectbr ptr %dst, [label %bb1, label %bb2]
+define i32 @unhandled_instruction(ptr %dst) {
+ indirectbr ptr %dst, [label %bb1, label %bb2]
bb1:
ret i32 0
bb2:
@@ -22,21 +22,21 @@ define i32 @unhandled_value(i32 %arg1) {
; // -----
; CHECK: import-failure.ll
-; CHECK-SAME: error: unhandled constant: i8* blockaddress(@unhandled_constant, %bb1)
+; CHECK-SAME: error: unhandled constant: ptr blockaddress(@unhandled_constant, %bb1)
; CHECK: import-failure.ll
-; CHECK-SAME: error: unhandled instruction: ret i8* blockaddress(@unhandled_constant, %bb1)
-define i8* @unhandled_constant() {
+; CHECK-SAME: error: unhandled instruction: ret ptr blockaddress(@unhandled_constant, %bb1)
+define ptr @unhandled_constant() {
bb1:
- ret i8* blockaddress(@unhandled_constant, %bb1)
+ ret ptr blockaddress(@unhandled_constant, %bb1)
}
; // -----
; CHECK: import-failure.ll
-; CHECK-SAME: error: unhandled constant: i8* blockaddress(@unhandled_global, %bb1)
+; CHECK-SAME: error: unhandled constant: ptr blockaddress(@unhandled_global, %bb1)
; CHECK: import-failure.ll
-; CHECK-SAME: error: unhandled global variable: @private = private global i8* blockaddress(@unhandled_global, %bb1)
- at private = private global i8* blockaddress(@unhandled_global, %bb1)
+; CHECK-SAME: error: unhandled global variable: @private = private global ptr blockaddress(@unhandled_global, %bb1)
+ at private = private global ptr blockaddress(@unhandled_global, %bb1)
define void @unhandled_global() {
bb1:
diff --git a/mlir/test/Target/LLVMIR/Import/incorrect-instmap-assignment.ll b/mlir/test/Target/LLVMIR/Import/incorrect-instmap-assignment.ll
index da06bed0e028..1af96ba85fab 100644
--- a/mlir/test/Target/LLVMIR/Import/incorrect-instmap-assignment.ll
+++ b/mlir/test/Target/LLVMIR/Import/incorrect-instmap-assignment.ll
@@ -103,7 +103,7 @@ define void @f(i32 %0, i32 %1) {
%92 = add i32 %90, %91
%93 = add i32 %91, %92
%94 = add i32 %92, %93
- %95 = load i32, i32* getelementptr inbounds (%my_struct, %my_struct* @gvar, i32 0, i32 0)
+ %95 = load i32, ptr @gvar
%96 = add i32 %1, %95
ret void
}
diff --git a/mlir/test/Target/LLVMIR/Import/profiling-metadata.ll b/mlir/test/Target/LLVMIR/Import/profiling-metadata.ll
index 70a66b645e5a..688dd100f982 100644
--- a/mlir/test/Target/LLVMIR/Import/profiling-metadata.ll
+++ b/mlir/test/Target/LLVMIR/Import/profiling-metadata.ll
@@ -54,11 +54,11 @@ declare void @foo()
declare i32 @__gxx_personality_v0(...)
; CHECK-LABEL: @invoke_branch_weights
-define i32 @invoke_branch_weights() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define i32 @invoke_branch_weights() personality ptr @__gxx_personality_v0 {
; CHECK: llvm.invoke @foo() to ^bb2 unwind ^bb1 {branch_weights = dense<[42, 99]> : vector<2xi32>} : () -> ()
invoke void @foo() to label %bb2 unwind label %bb1, !prof !0
bb1:
- %1 = landingpad { i8*, i32 } cleanup
+ %1 = landingpad { ptr, i32 } cleanup
br label %bb2
bb2:
ret i32 1
More information about the Mlir-commits
mailing list