[llvm-branch-commits] [clang] [llvm] [SPARC] Prefer RDPC over CALL to implement GETPCX for 64-bit target (PR #77196)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Jan 13 19:35:39 PST 2024


https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/77196

>From f4830825ebea96f71fb1b9d1f1192114291b093c Mon Sep 17 00:00:00 2001
From: Koakuma <koachan at protonmail.com>
Date: Sun, 14 Jan 2024 10:35:24 +0700
Subject: [PATCH] Add nounwind to test cases

Created using spr 1.3.4
---
 llvm/test/CodeGen/SPARC/getpcx-call.ll | 14 +++-----------
 llvm/test/CodeGen/SPARC/getpcx-rdpc.ll | 14 +++-----------
 2 files changed, 6 insertions(+), 22 deletions(-)

diff --git a/llvm/test/CodeGen/SPARC/getpcx-call.ll b/llvm/test/CodeGen/SPARC/getpcx-call.ll
index 63d6649f89c4fa..0f162f1cd0bb7a 100644
--- a/llvm/test/CodeGen/SPARC/getpcx-call.ll
+++ b/llvm/test/CodeGen/SPARC/getpcx-call.ll
@@ -10,14 +10,10 @@
 
 @value = external global i32
 
-define i32 @testCall() #0 {
+define i32 @testCall() nounwind #0 {
 ; SPARC-LABEL: testCall:
-; SPARC:         .cfi_startproc
-; SPARC-NEXT:  ! %bb.0:
+; SPARC:       ! %bb.0:
 ; SPARC-NEXT:    save %sp, -96, %sp
-; SPARC-NEXT:    .cfi_def_cfa_register %fp
-; SPARC-NEXT:    .cfi_window_save
-; SPARC-NEXT:    .cfi_register %o7, %i7
 ; SPARC-NEXT:  .Ltmp0:
 ; SPARC-NEXT:    call .Ltmp1
 ; SPARC-NEXT:  .Ltmp2:
@@ -33,12 +29,8 @@ define i32 @testCall() #0 {
 ; SPARC-NEXT:    restore
 ;
 ; SPARC64-LABEL: testCall:
-; SPARC64:         .cfi_startproc
-; SPARC64-NEXT:  ! %bb.0:
+; SPARC64:       ! %bb.0:
 ; SPARC64-NEXT:    save %sp, -128, %sp
-; SPARC64-NEXT:    .cfi_def_cfa_register %fp
-; SPARC64-NEXT:    .cfi_window_save
-; SPARC64-NEXT:    .cfi_register %o7, %i7
 ; SPARC64-NEXT:  .Ltmp0:
 ; SPARC64-NEXT:    call .Ltmp1
 ; SPARC64-NEXT:  .Ltmp2:
diff --git a/llvm/test/CodeGen/SPARC/getpcx-rdpc.ll b/llvm/test/CodeGen/SPARC/getpcx-rdpc.ll
index 4596d8d6824153..cb51502f7b0690 100644
--- a/llvm/test/CodeGen/SPARC/getpcx-rdpc.ll
+++ b/llvm/test/CodeGen/SPARC/getpcx-rdpc.ll
@@ -10,14 +10,10 @@
 
 @value = external global i32
 
-define i32 @testRdpc() #0 {
+define i32 @testRdpc() nounwind #0 {
 ; SPARC-LABEL: testRdpc:
-; SPARC:         .cfi_startproc
-; SPARC-NEXT:  ! %bb.0:
+; SPARC:       ! %bb.0:
 ; SPARC-NEXT:    save %sp, -96, %sp
-; SPARC-NEXT:    .cfi_def_cfa_register %fp
-; SPARC-NEXT:    .cfi_window_save
-; SPARC-NEXT:    .cfi_register %o7, %i7
 ; SPARC-NEXT:  .Ltmp0:
 ; SPARC-NEXT:    call .Ltmp1
 ; SPARC-NEXT:  .Ltmp2:
@@ -33,12 +29,8 @@ define i32 @testRdpc() #0 {
 ; SPARC-NEXT:    restore
 ;
 ; SPARC64-LABEL: testRdpc:
-; SPARC64:         .cfi_startproc
-; SPARC64-NEXT:  ! %bb.0:
+; SPARC64:       ! %bb.0:
 ; SPARC64-NEXT:    save %sp, -128, %sp
-; SPARC64-NEXT:    .cfi_def_cfa_register %fp
-; SPARC64-NEXT:    .cfi_window_save
-; SPARC64-NEXT:    .cfi_register %o7, %i7
 ; SPARC64-NEXT:  .Ltmp0:
 ; SPARC64-NEXT:    rd %pc, %o7
 ; SPARC64-NEXT:  .Ltmp2:



More information about the llvm-branch-commits mailing list