[llvm] 85e8e62 - [AVR] Fix 14 Generic CodeGen tests by making address space explicit or optional
Dylan McKay via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 4 07:02:43 PST 2021
Author: Dylan McKay
Date: 2021-02-05T04:02:27+13:00
New Revision: 85e8e6246e0fcc62ba727e8fb5990f1a632125d0
URL: https://github.com/llvm/llvm-project/commit/85e8e6246e0fcc62ba727e8fb5990f1a632125d0
DIFF: https://github.com/llvm/llvm-project/commit/85e8e6246e0fcc62ba727e8fb5990f1a632125d0.diff
LOG: [AVR] Fix 14 Generic CodeGen tests by making address space explicit or optional
This fixes the vast majority of remaining failing AVR Generic CodeGen
tests.
Added:
Modified:
llvm/test/CodeGen/Generic/2007-02-25-invoke.ll
llvm/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
llvm/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
llvm/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
llvm/test/CodeGen/Generic/2009-03-17-LSR-APInt.ll
llvm/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll
llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir
llvm/test/CodeGen/Generic/MIRStripDebug/all.mir
llvm/test/CodeGen/Generic/MIRStripDebug/dont-strip-real-debug-info.mir
llvm/test/CodeGen/Generic/MIRStripDebug/multiple-moduleflags.mir
llvm/test/CodeGen/Generic/donothing.ll
llvm/test/CodeGen/Generic/exception-handling.ll
llvm/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
llvm/test/CodeGen/Generic/selection-dag-determinism.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/Generic/2007-02-25-invoke.ll b/llvm/test/CodeGen/Generic/2007-02-25-invoke.ll
index 4ca280d1587e..c3ae517d5b18 100644
--- a/llvm/test/CodeGen/Generic/2007-02-25-invoke.ll
+++ b/llvm/test/CodeGen/Generic/2007-02-25-invoke.ll
@@ -13,4 +13,4 @@ blat:
ret i32 0
}
-declare i32 @__gxx_personality_v0(...)
+declare i32 @__gxx_personality_v0(...) addrspace(0)
diff --git a/llvm/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll b/llvm/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
index f0259ec6b128..3634f9ba3e2c 100644
--- a/llvm/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
+++ b/llvm/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s
+; RUN: llc < %s
; PR1228
%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" = type { i8* }
@@ -60,4 +60,4 @@ declare void @_ZNSs7reserveEj()
declare void @_ZNSs6appendEPKcj()
-declare i32 @__gxx_personality_v0(...)
+declare i32 @__gxx_personality_v0(...) addrspace(0)
diff --git a/llvm/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll b/llvm/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
index bb8058575c82..a9d68ae5444c 100644
--- a/llvm/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
+++ b/llvm/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
@@ -1,7 +1,5 @@
; RUN: llc -no-integrated-as < %s
-; XFAIL: avr
-
define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() personality i32 (...)* @__gxx_personality_v0 {
entry:
invoke void asm "rdtsc\0A\09movl %eax, $0\0A\09movl %edx, $1", "=*imr,=*imr,~{dirflag},~{fpsr},~{flags},~{dx},~{ax}"( i32* null, i32* null )
@@ -16,4 +14,4 @@ cleanup144: ; preds = %entry
resume { i8*, i32 } %exn
}
-declare i32 @__gxx_personality_v0(...)
+declare i32 @__gxx_personality_v0(...) addrspace(0)
diff --git a/llvm/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll b/llvm/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
index 59a7b64e0dfa..547e7f4317e4 100644
--- a/llvm/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
+++ b/llvm/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
@@ -32,4 +32,4 @@ declare void @__cxa_throw(i8*, i8*, void (i8*)*) noreturn
declare void @__cxa_end_catch()
-declare i32 @__gxx_personality_v0(...)
+declare i32 @__gxx_personality_v0(...) addrspace(0)
diff --git a/llvm/test/CodeGen/Generic/2009-03-17-LSR-APInt.ll b/llvm/test/CodeGen/Generic/2009-03-17-LSR-APInt.ll
index ff5952db43b3..e2fcd72eb186 100644
--- a/llvm/test/CodeGen/Generic/2009-03-17-LSR-APInt.ll
+++ b/llvm/test/CodeGen/Generic/2009-03-17-LSR-APInt.ll
@@ -63,58 +63,58 @@ bb47: ; preds = %bb46, %bb44
br label %bb44
}
-define i32 @pthread_once(i32*, void ()*) {
+define i32 @pthread_once(i32*, void ()*) addrspace(0) {
ret i32 0
}
-define i8* @pthread_getspecific(i32) {
+define i8* @pthread_getspecific(i32) addrspace(0) {
ret i8* null
}
-define i32 @pthread_setspecific(i32, i8*) {
+define i32 @pthread_setspecific(i32, i8*) addrspace(0) {
ret i32 0
}
-define i32 @pthread_create(i64*, %struct.pthread_attr_t*, i8* (i8*)*, i8*) {
+define i32 @pthread_create(i64*, %struct.pthread_attr_t*, i8* (i8*)*, i8*) addrspace(0) {
ret i32 0
}
-define i32 @pthread_cancel(i64) {
+define i32 @pthread_cancel(i64) addrspace(0) {
ret i32 0
}
-define i32 @pthread_mutex_lock(%struct.pthread_mutex_t*) {
+define i32 @pthread_mutex_lock(%struct.pthread_mutex_t*) addrspace(0) {
ret i32 0
}
-define i32 @pthread_mutex_trylock(%struct.pthread_mutex_t*) {
+define i32 @pthread_mutex_trylock(%struct.pthread_mutex_t*) addrspace(0) {
ret i32 0
}
-define i32 @pthread_mutex_unlock(%struct.pthread_mutex_t*) {
+define i32 @pthread_mutex_unlock(%struct.pthread_mutex_t*) addrspace(0) {
ret i32 0
}
-define i32 @pthread_mutex_init(%struct.pthread_mutex_t*, %struct.Alignment*) {
+define i32 @pthread_mutex_init(%struct.pthread_mutex_t*, %struct.Alignment*) addrspace(0) {
ret i32 0
}
-define i32 @pthread_key_create(i32*, void (i8*)*) {
+define i32 @pthread_key_create(i32*, void (i8*)*) addrspace(0) {
ret i32 0
}
-define i32 @pthread_key_delete(i32) {
+define i32 @pthread_key_delete(i32) addrspace(0) {
ret i32 0
}
-define i32 @pthread_mutexattr_init(%struct.Alignment*) {
+define i32 @pthread_mutexattr_init(%struct.Alignment*) addrspace(0) {
ret i32 0
}
-define i32 @pthread_mutexattr_settype(%struct.Alignment*, i32) {
+define i32 @pthread_mutexattr_settype(%struct.Alignment*, i32) addrspace(0) {
ret i32 0
}
-define i32 @pthread_mutexattr_destroy(%struct.Alignment*) {
+define i32 @pthread_mutexattr_destroy(%struct.Alignment*) addrspace(0) {
ret i32 0
}
diff --git a/llvm/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll b/llvm/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll
index a0455cfe1aae..f6b1998e8b7e 100644
--- a/llvm/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll
+++ b/llvm/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll
@@ -74,4 +74,4 @@ lpad74: ; preds = %entry
unreachable
}
-declare i32 @__gxx_personality_v0(...)
+declare i32 @__gxx_personality_v0(...) addrspace(0)
diff --git a/llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir b/llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir
index 79dc90f017c1..13990caadfd3 100644
--- a/llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir
+++ b/llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir
@@ -4,15 +4,15 @@
--- |
; ModuleID = 'loc-only.ll'
source_filename = "loc-only.ll"
-
+
; ALL-LABEL: @test
define i32 @test(i32 %a, i32 %b) {
%add = add i32 %a, 2
; ALL-NEXT: %add = add i32 %a, 2, !dbg [[L1:![0-9]+]]
- ; VALUE-NEXT: call void @llvm.dbg.value(metadata i32 %add, metadata [[add:![0-9]+]], metadata !DIExpression()), !dbg [[L1]]
+ ; VALUE-NEXT: call {{(addrspace\([0-9]+\))?}} void @llvm.dbg.value(metadata i32 %add, metadata [[add:![0-9]+]], metadata !DIExpression()), !dbg [[L1]]
%sub = sub i32 %add, %b
; ALL-NEXT: %sub = sub i32 %add, %b, !dbg [[L2:![0-9]+]]
- ; VALUE-NEXT: call void @llvm.dbg.value(metadata i32 %sub, metadata [[sub:![0-9]+]], metadata !DIExpression()), !dbg [[L2]]
+ ; VALUE-NEXT: call {{(addrspace\([0-9]+\))?}} void @llvm.dbg.value(metadata i32 %sub, metadata [[sub:![0-9]+]], metadata !DIExpression()), !dbg [[L2]]
; ALL-NEXT: ret i32 %sub, !dbg [[L3:![0-9]+]]
ret i32 %sub
}
diff --git a/llvm/test/CodeGen/Generic/MIRStripDebug/all.mir b/llvm/test/CodeGen/Generic/MIRStripDebug/all.mir
index 7eaf60953795..489968851860 100644
--- a/llvm/test/CodeGen/Generic/MIRStripDebug/all.mir
+++ b/llvm/test/CodeGen/Generic/MIRStripDebug/all.mir
@@ -11,7 +11,7 @@
call void @llvm.dbg.value(metadata i32 %sub, metadata !11, metadata !DIExpression()), !dbg !13
ret i32 %sub, !dbg !14
}
- ; CHECK-LABEL: define i32 @test(i32 %a, i32 %b) {
+ ; CHECK-LABEL: define i32 @test(i32 %a, i32 %b) {{(addrspace\([0-9]+\))?}} {
; CHECK-NEXT: %add = add i32 %a, 2
; CHECK-NEXT: %sub = sub i32 %add, %b
; CHECK-NEXT: ret i32 %sub
diff --git a/llvm/test/CodeGen/Generic/MIRStripDebug/dont-strip-real-debug-info.mir b/llvm/test/CodeGen/Generic/MIRStripDebug/dont-strip-real-debug-info.mir
index 860cb9731ae8..6cc8c246f53b 100644
--- a/llvm/test/CodeGen/Generic/MIRStripDebug/dont-strip-real-debug-info.mir
+++ b/llvm/test/CodeGen/Generic/MIRStripDebug/dont-strip-real-debug-info.mir
@@ -11,11 +11,11 @@
call void @llvm.dbg.value(metadata i32 %sub, metadata !9, metadata !DIExpression()), !dbg !11
ret i32 %sub, !dbg !12
}
- ; CHECK-LABEL: define i32 @test(i32 %a, i32 %b) !dbg !4 {
+ ; CHECK-LABEL: define i32 @test(i32 %a, i32 %b) {{(addrspace\([0-9]+\))?}} !dbg !4 {
; CHECK-NEXT: %add = add i32 %a, 2, !dbg !10
- ; CHECK-NEXT: call void @llvm.dbg.value(metadata i32 %add, metadata !7, metadata !DIExpression()), !dbg !10
+ ; CHECK-NEXT: call {{(addrspace\([0-9]+\))?}} void @llvm.dbg.value(metadata i32 %add, metadata !7, metadata !DIExpression()), !dbg !10
; CHECK-NEXT: %sub = sub i32 %add, %b, !dbg !11
- ; CHECK-NEXT: call void @llvm.dbg.value(metadata i32 %sub, metadata !9, metadata !DIExpression()), !dbg !11
+ ; CHECK-NEXT: call {{(addrspace\([0-9]+\))?}} void @llvm.dbg.value(metadata i32 %sub, metadata !9, metadata !DIExpression()), !dbg !11
; CHECK-NEXT: ret i32 %sub, !dbg !12
; CHECK-NEXT: }
diff --git a/llvm/test/CodeGen/Generic/MIRStripDebug/multiple-moduleflags.mir b/llvm/test/CodeGen/Generic/MIRStripDebug/multiple-moduleflags.mir
index 2a62cd4bb877..df280cf0a48b 100644
--- a/llvm/test/CodeGen/Generic/MIRStripDebug/multiple-moduleflags.mir
+++ b/llvm/test/CodeGen/Generic/MIRStripDebug/multiple-moduleflags.mir
@@ -11,7 +11,7 @@
call void @llvm.dbg.value(metadata i32 %sub, metadata !11, metadata !DIExpression()), !dbg !13
ret i32 %sub, !dbg !14
}
- ; CHECK-LABEL: define i32 @test(i32 %a, i32 %b) {
+ ; CHECK-LABEL: define i32 @test(i32 %a, i32 %b) {{(addrspace\([0-9]+\))?}} {
; CHECK-NEXT: %add = add i32 %a, 2
; CHECK-NEXT: %sub = sub i32 %add, %b
; CHECK-NEXT: ret i32 %sub
diff --git a/llvm/test/CodeGen/Generic/donothing.ll b/llvm/test/CodeGen/Generic/donothing.ll
index 59ccf6be092b..3919566fcfbf 100644
--- a/llvm/test/CodeGen/Generic/donothing.ll
+++ b/llvm/test/CodeGen/Generic/donothing.ll
@@ -1,6 +1,6 @@
; RUN: llc < %s | FileCheck %s
-declare i32 @__gxx_personality_v0(...)
+declare i32 @__gxx_personality_v0(...) addrspace(0)
declare void @__cxa_call_unexpected(i8*)
declare void @llvm.donothing() readnone
diff --git a/llvm/test/CodeGen/Generic/exception-handling.ll b/llvm/test/CodeGen/Generic/exception-handling.ll
index 6e2a8678e9a6..3ee2fc0edf7c 100644
--- a/llvm/test/CodeGen/Generic/exception-handling.ll
+++ b/llvm/test/CodeGen/Generic/exception-handling.ll
@@ -26,4 +26,4 @@ lpad27: ; preds = %"10", %"9"
declare void @_ZNK14gIndexOdometer9NoIndicesEv()
-declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*)
+declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*) addrspace(0)
diff --git a/llvm/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll b/llvm/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
index 8c11cb2f0217..8dffe561bc32 100644
--- a/llvm/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
+++ b/llvm/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
@@ -17,4 +17,4 @@ handler:
ret void
}
-declare i32 @__gxx_personality_v0(...)
+declare i32 @__gxx_personality_v0(...) addrspace(0)
diff --git a/llvm/test/CodeGen/Generic/selection-dag-determinism.ll b/llvm/test/CodeGen/Generic/selection-dag-determinism.ll
index d9bc90f9ee5c..5b3fa964cde6 100644
--- a/llvm/test/CodeGen/Generic/selection-dag-determinism.ll
+++ b/llvm/test/CodeGen/Generic/selection-dag-determinism.ll
@@ -19,18 +19,18 @@ entry:
if.end:
%tobool = icmp eq i32 0, 0
- %a = select i1 %tobool, void (i32)* @f1, void (i32)* null, !dbg !8
- %b = select i1 %tobool, void (i32)* @f2, void (i32)* null, !dbg !8
- call void %a(i32 %x)
- call void %b(i32 %x)
+ %a = select i1 %tobool, void (i32) addrspace(0)* @f1, void (i32)* null, !dbg !8
+ %b = select i1 %tobool, void (i32) addrspace(0)* @f2, void (i32)* null, !dbg !8
+ call addrspace(0) void %a(i32 %x)
+ call addrspace(0) void %b(i32 %x)
unreachable
cleanup:
ret void
}
-declare void @f1(i32)
-declare void @f2(i32)
+declare void @f1(i32) addrspace(0)
+declare void @f2(i32) addrspace(0)
declare void @llvm.dbg.value(metadata, metadata, metadata)
More information about the llvm-commits
mailing list