[PATCH] D129106: [RISCV] Add support for static chain

Funan Zeng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 19:16:26 PDT 2022


melonedo updated this revision to Diff 471367.
melonedo added a comment.

Use ptr for opaque pointers


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129106/new/

https://reviews.llvm.org/D129106

Files:
  llvm/test/CodeGen/RISCV/nest-register.ll


Index: llvm/test/CodeGen/RISCV/nest-register.ll
===================================================================
--- llvm/test/CodeGen/RISCV/nest-register.ll
+++ llvm/test/CodeGen/RISCV/nest-register.ll
@@ -7,7 +7,7 @@
 ; Tests that the 'nest' parameter attribute causes the relevant parameter to be
 ; passed in the right register.
 
-define i8* @nest_receiver(i8* nest %arg) nounwind {
+define ptr @nest_receiver(ptr nest %arg) nounwind {
 ; RV32I-LABEL: nest_receiver:
 ; RV32I:       # %bb.0:
 ; RV32I-NEXT:    mv a0, t2
@@ -18,10 +18,10 @@
 ; RV64I-NEXT:    mv a0, t2
 ; RV64I-NEXT:    ret
 ;
-  ret i8* %arg
+  ret ptr %arg
 }
 
-define i8* @nest_caller(i8* %arg) nounwind {
+define ptr @nest_caller(ptr %arg) nounwind {
 ; RV32I-LABEL: nest_caller:
 ; RV32I:       # %bb.0:
 ; RV32I-NEXT:    addi sp, sp, -16
@@ -42,6 +42,6 @@
 ; RV64I-NEXT:    addi sp, sp, 16
 ; RV64I-NEXT:    ret
 ;
-  %result = call i8* @nest_receiver(i8* nest %arg)
-  ret i8* %result
+  %result = call ptr @nest_receiver(ptr nest %arg)
+  ret ptr %result
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129106.471367.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221028/480c0db5/attachment.bin>


More information about the llvm-commits mailing list