[llvm] 423ac3d - [CSKY] Convert tests to opaque pointers (NFC)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 12:54:24 PST 2024


Author: Fangrui Song
Date: 2024-02-06T12:54:21-08:00
New Revision: 423ac3d9ee82ff48da91b35ec80497089bc55b9e

URL: https://github.com/llvm/llvm-project/commit/423ac3d9ee82ff48da91b35ec80497089bc55b9e
DIFF: https://github.com/llvm/llvm-project/commit/423ac3d9ee82ff48da91b35ec80497089bc55b9e.diff

LOG: [CSKY] Convert tests to opaque pointers (NFC)

Added: 
    

Modified: 
    llvm/test/CodeGen/CSKY/atomic-cmpxchg-flag.ll
    llvm/test/CodeGen/CSKY/atomic-cmpxchg.ll
    llvm/test/CodeGen/CSKY/atomic-load-store.ll
    llvm/test/CodeGen/CSKY/atomic-rmw.ll
    llvm/test/CodeGen/CSKY/call-16bit.ll
    llvm/test/CodeGen/CSKY/call.ll
    llvm/test/CodeGen/CSKY/constantpool.ll
    llvm/test/CodeGen/CSKY/dwarf-eh.ll
    llvm/test/CodeGen/CSKY/fpu/ldst-d.ll
    llvm/test/CodeGen/CSKY/fpu/ldst-f.ll
    llvm/test/CodeGen/CSKY/frameaddr-returnaddr.ll
    llvm/test/CodeGen/CSKY/indirectbr.ll
    llvm/test/CodeGen/CSKY/inline-asm-d-constraint-f.ll
    llvm/test/CodeGen/CSKY/inline-asm-f-constraint-f.ll
    llvm/test/CodeGen/CSKY/inline-asm.ll
    llvm/test/CodeGen/CSKY/ldst-i.ll
    llvm/test/CodeGen/CSKY/tls-models.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/CSKY/atomic-cmpxchg-flag.ll b/llvm/test/CodeGen/CSKY/atomic-cmpxchg-flag.ll
index 8b2c28701adbd7..bd74e4608645a6 100644
--- a/llvm/test/CodeGen/CSKY/atomic-cmpxchg-flag.ll
+++ b/llvm/test/CodeGen/CSKY/atomic-cmpxchg-flag.ll
@@ -2,7 +2,7 @@
 ; RUN: llc -mtriple=csky -verify-machineinstrs -csky-no-aliases -mattr=+2e3 < %s \
 ; RUN:   | FileCheck -check-prefix=CSKY %s
 
-define i1 @cmpxchg_i32_seq_cst_seq_cst(i32* %ptr, i32 signext %cmp,
+define i1 @cmpxchg_i32_seq_cst_seq_cst(ptr %ptr, i32 signext %cmp,
                                        i32 signext %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_seq_cst_seq_cst:
 ; CSKY:       # %bb.0: # %entry
@@ -26,7 +26,7 @@ define i1 @cmpxchg_i32_seq_cst_seq_cst(i32* %ptr, i32 signext %cmp,
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
 entry:
-  %0 = cmpxchg i32* %ptr, i32 %cmp, i32 %val seq_cst seq_cst
+  %0 = cmpxchg ptr %ptr, i32 %cmp, i32 %val seq_cst seq_cst
   %1 = extractvalue { i32, i1 } %0, 1
   ret i1 %1
 }

diff  --git a/llvm/test/CodeGen/CSKY/atomic-cmpxchg.ll b/llvm/test/CodeGen/CSKY/atomic-cmpxchg.ll
index fc0c08b27234bf..a257a0444d8b9d 100644
--- a/llvm/test/CodeGen/CSKY/atomic-cmpxchg.ll
+++ b/llvm/test/CodeGen/CSKY/atomic-cmpxchg.ll
@@ -2,7 +2,7 @@
 ; RUN: llc -mtriple=csky -verify-machineinstrs -csky-no-aliases -mattr=+2e3 < %s \
 ; RUN:   | FileCheck -check-prefix=CSKY %s
 
-define void @cmpxchg_i8_monotonic_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_monotonic_monotonic(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_monotonic_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -24,11 +24,11 @@ define void @cmpxchg_i8_monotonic_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind
 ; CSKY-NEXT:  .LCPI0_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val monotonic monotonic
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val monotonic monotonic
   ret void
 }
 
-define void @cmpxchg_i8_acquire_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_acquire_monotonic(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_acquire_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -50,11 +50,11 @@ define void @cmpxchg_i8_acquire_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-NEXT:  .LCPI1_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val acquire monotonic
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val acquire monotonic
   ret void
 }
 
-define void @cmpxchg_i8_acquire_acquire(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_acquire_acquire(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_acquire_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -76,11 +76,11 @@ define void @cmpxchg_i8_acquire_acquire(i8* %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-NEXT:  .LCPI2_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val acquire acquire
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val acquire acquire
   ret void
 }
 
-define void @cmpxchg_i8_release_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_release_monotonic(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_release_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -102,11 +102,11 @@ define void @cmpxchg_i8_release_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-NEXT:  .LCPI3_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val release monotonic
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val release monotonic
   ret void
 }
 
-define void @cmpxchg_i8_release_acquire(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_release_acquire(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_release_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -128,11 +128,11 @@ define void @cmpxchg_i8_release_acquire(i8* %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-NEXT:  .LCPI4_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val release acquire
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val release acquire
   ret void
 }
 
-define void @cmpxchg_i8_acq_rel_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_acq_rel_monotonic(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_acq_rel_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -154,11 +154,11 @@ define void @cmpxchg_i8_acq_rel_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-NEXT:  .LCPI5_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val acq_rel monotonic
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val acq_rel monotonic
   ret void
 }
 
-define void @cmpxchg_i8_acq_rel_acquire(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_acq_rel_acquire(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_acq_rel_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -180,11 +180,11 @@ define void @cmpxchg_i8_acq_rel_acquire(i8* %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-NEXT:  .LCPI6_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val acq_rel acquire
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val acq_rel acquire
   ret void
 }
 
-define void @cmpxchg_i8_seq_cst_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_seq_cst_monotonic(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_seq_cst_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -206,11 +206,11 @@ define void @cmpxchg_i8_seq_cst_monotonic(i8* %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-NEXT:  .LCPI7_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val seq_cst monotonic
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val seq_cst monotonic
   ret void
 }
 
-define void @cmpxchg_i8_seq_cst_acquire(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_seq_cst_acquire(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_seq_cst_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -232,11 +232,11 @@ define void @cmpxchg_i8_seq_cst_acquire(i8* %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-NEXT:  .LCPI8_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val seq_cst acquire
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val seq_cst acquire
   ret void
 }
 
-define void @cmpxchg_i8_seq_cst_seq_cst(i8* %ptr, i8 %cmp, i8 %val) nounwind {
+define void @cmpxchg_i8_seq_cst_seq_cst(ptr %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i8_seq_cst_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -258,11 +258,11 @@ define void @cmpxchg_i8_seq_cst_seq_cst(i8* %ptr, i8 %cmp, i8 %val) nounwind {
 ; CSKY-NEXT:  .LCPI9_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
 ;
-  %res = cmpxchg i8* %ptr, i8 %cmp, i8 %val seq_cst seq_cst
+  %res = cmpxchg ptr %ptr, i8 %cmp, i8 %val seq_cst seq_cst
   ret void
 }
 
-define void @cmpxchg_i16_monotonic_monotonic(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_monotonic_monotonic(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_monotonic_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -284,11 +284,11 @@ define void @cmpxchg_i16_monotonic_monotonic(i16* %ptr, i16 %cmp, i16 %val) noun
 ; CSKY-NEXT:  .LCPI10_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val monotonic monotonic
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val monotonic monotonic
   ret void
 }
 
-define void @cmpxchg_i16_acquire_monotonic(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_acquire_monotonic(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_acquire_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -310,11 +310,11 @@ define void @cmpxchg_i16_acquire_monotonic(i16* %ptr, i16 %cmp, i16 %val) nounwi
 ; CSKY-NEXT:  .LCPI11_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val acquire monotonic
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val acquire monotonic
   ret void
 }
 
-define void @cmpxchg_i16_acquire_acquire(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_acquire_acquire(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_acquire_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -336,11 +336,11 @@ define void @cmpxchg_i16_acquire_acquire(i16* %ptr, i16 %cmp, i16 %val) nounwind
 ; CSKY-NEXT:  .LCPI12_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val acquire acquire
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val acquire acquire
   ret void
 }
 
-define void @cmpxchg_i16_release_monotonic(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_release_monotonic(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_release_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -362,11 +362,11 @@ define void @cmpxchg_i16_release_monotonic(i16* %ptr, i16 %cmp, i16 %val) nounwi
 ; CSKY-NEXT:  .LCPI13_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val release monotonic
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val release monotonic
   ret void
 }
 
-define void @cmpxchg_i16_release_acquire(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_release_acquire(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_release_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -388,11 +388,11 @@ define void @cmpxchg_i16_release_acquire(i16* %ptr, i16 %cmp, i16 %val) nounwind
 ; CSKY-NEXT:  .LCPI14_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val release acquire
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val release acquire
   ret void
 }
 
-define void @cmpxchg_i16_acq_rel_monotonic(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_acq_rel_monotonic(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_acq_rel_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -414,11 +414,11 @@ define void @cmpxchg_i16_acq_rel_monotonic(i16* %ptr, i16 %cmp, i16 %val) nounwi
 ; CSKY-NEXT:  .LCPI15_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val acq_rel monotonic
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val acq_rel monotonic
   ret void
 }
 
-define void @cmpxchg_i16_acq_rel_acquire(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_acq_rel_acquire(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_acq_rel_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -440,11 +440,11 @@ define void @cmpxchg_i16_acq_rel_acquire(i16* %ptr, i16 %cmp, i16 %val) nounwind
 ; CSKY-NEXT:  .LCPI16_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val acq_rel acquire
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val acq_rel acquire
   ret void
 }
 
-define void @cmpxchg_i16_seq_cst_monotonic(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_seq_cst_monotonic(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_seq_cst_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -466,11 +466,11 @@ define void @cmpxchg_i16_seq_cst_monotonic(i16* %ptr, i16 %cmp, i16 %val) nounwi
 ; CSKY-NEXT:  .LCPI17_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val seq_cst monotonic
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val seq_cst monotonic
   ret void
 }
 
-define void @cmpxchg_i16_seq_cst_acquire(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_seq_cst_acquire(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_seq_cst_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -492,11 +492,11 @@ define void @cmpxchg_i16_seq_cst_acquire(i16* %ptr, i16 %cmp, i16 %val) nounwind
 ; CSKY-NEXT:  .LCPI18_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val seq_cst acquire
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val seq_cst acquire
   ret void
 }
 
-define void @cmpxchg_i16_seq_cst_seq_cst(i16* %ptr, i16 %cmp, i16 %val) nounwind {
+define void @cmpxchg_i16_seq_cst_seq_cst(ptr %ptr, i16 %cmp, i16 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i16_seq_cst_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -518,11 +518,11 @@ define void @cmpxchg_i16_seq_cst_seq_cst(i16* %ptr, i16 %cmp, i16 %val) nounwind
 ; CSKY-NEXT:  .LCPI19_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
 ;
-  %res = cmpxchg i16* %ptr, i16 %cmp, i16 %val seq_cst seq_cst
+  %res = cmpxchg ptr %ptr, i16 %cmp, i16 %val seq_cst seq_cst
   ret void
 }
 
-define void @cmpxchg_i32_monotonic_monotonic(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_monotonic_monotonic(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_monotonic_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -544,11 +544,11 @@ define void @cmpxchg_i32_monotonic_monotonic(i32* %ptr, i32 %cmp, i32 %val) noun
 ; CSKY-NEXT:  .LCPI20_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val monotonic monotonic
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val monotonic monotonic
   ret void
 }
 
-define void @cmpxchg_i32_acquire_monotonic(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_acquire_monotonic(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_acquire_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -570,11 +570,11 @@ define void @cmpxchg_i32_acquire_monotonic(i32* %ptr, i32 %cmp, i32 %val) nounwi
 ; CSKY-NEXT:  .LCPI21_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val acquire monotonic
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val acquire monotonic
   ret void
 }
 
-define void @cmpxchg_i32_acquire_acquire(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_acquire_acquire(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_acquire_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -596,11 +596,11 @@ define void @cmpxchg_i32_acquire_acquire(i32* %ptr, i32 %cmp, i32 %val) nounwind
 ; CSKY-NEXT:  .LCPI22_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val acquire acquire
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val acquire acquire
   ret void
 }
 
-define void @cmpxchg_i32_release_monotonic(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_release_monotonic(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_release_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -622,11 +622,11 @@ define void @cmpxchg_i32_release_monotonic(i32* %ptr, i32 %cmp, i32 %val) nounwi
 ; CSKY-NEXT:  .LCPI23_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val release monotonic
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val release monotonic
   ret void
 }
 
-define void @cmpxchg_i32_release_acquire(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_release_acquire(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_release_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -648,11 +648,11 @@ define void @cmpxchg_i32_release_acquire(i32* %ptr, i32 %cmp, i32 %val) nounwind
 ; CSKY-NEXT:  .LCPI24_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val release acquire
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val release acquire
   ret void
 }
 
-define void @cmpxchg_i32_acq_rel_monotonic(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_acq_rel_monotonic(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_acq_rel_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -674,11 +674,11 @@ define void @cmpxchg_i32_acq_rel_monotonic(i32* %ptr, i32 %cmp, i32 %val) nounwi
 ; CSKY-NEXT:  .LCPI25_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val acq_rel monotonic
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val acq_rel monotonic
   ret void
 }
 
-define void @cmpxchg_i32_acq_rel_acquire(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_acq_rel_acquire(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_acq_rel_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -700,11 +700,11 @@ define void @cmpxchg_i32_acq_rel_acquire(i32* %ptr, i32 %cmp, i32 %val) nounwind
 ; CSKY-NEXT:  .LCPI26_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val acq_rel acquire
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val acq_rel acquire
   ret void
 }
 
-define void @cmpxchg_i32_seq_cst_monotonic(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_seq_cst_monotonic(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_seq_cst_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -726,11 +726,11 @@ define void @cmpxchg_i32_seq_cst_monotonic(i32* %ptr, i32 %cmp, i32 %val) nounwi
 ; CSKY-NEXT:  .LCPI27_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val seq_cst monotonic
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val seq_cst monotonic
   ret void
 }
 
-define void @cmpxchg_i32_seq_cst_acquire(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_seq_cst_acquire(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_seq_cst_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -752,11 +752,11 @@ define void @cmpxchg_i32_seq_cst_acquire(i32* %ptr, i32 %cmp, i32 %val) nounwind
 ; CSKY-NEXT:  .LCPI28_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val seq_cst acquire
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val seq_cst acquire
   ret void
 }
 
-define void @cmpxchg_i32_seq_cst_seq_cst(i32* %ptr, i32 %cmp, i32 %val) nounwind {
+define void @cmpxchg_i32_seq_cst_seq_cst(ptr %ptr, i32 %cmp, i32 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i32_seq_cst_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -778,11 +778,11 @@ define void @cmpxchg_i32_seq_cst_seq_cst(i32* %ptr, i32 %cmp, i32 %val) nounwind
 ; CSKY-NEXT:  .LCPI29_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
 ;
-  %res = cmpxchg i32* %ptr, i32 %cmp, i32 %val seq_cst seq_cst
+  %res = cmpxchg ptr %ptr, i32 %cmp, i32 %val seq_cst seq_cst
   ret void
 }
 
-define void @cmpxchg_i64_monotonic_monotonic(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_monotonic_monotonic(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_monotonic_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -808,11 +808,11 @@ define void @cmpxchg_i64_monotonic_monotonic(i64* %ptr, i64 %cmp, i64 %val) noun
 ; CSKY-NEXT:  .LCPI30_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val monotonic monotonic
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val monotonic monotonic
   ret void
 }
 
-define void @cmpxchg_i64_acquire_monotonic(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_acquire_monotonic(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_acquire_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -839,11 +839,11 @@ define void @cmpxchg_i64_acquire_monotonic(i64* %ptr, i64 %cmp, i64 %val) nounwi
 ; CSKY-NEXT:  .LCPI31_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val acquire monotonic
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val acquire monotonic
   ret void
 }
 
-define void @cmpxchg_i64_acquire_acquire(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_acquire_acquire(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_acquire_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -869,11 +869,11 @@ define void @cmpxchg_i64_acquire_acquire(i64* %ptr, i64 %cmp, i64 %val) nounwind
 ; CSKY-NEXT:  .LCPI32_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val acquire acquire
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val acquire acquire
   ret void
 }
 
-define void @cmpxchg_i64_release_monotonic(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_release_monotonic(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_release_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -900,11 +900,11 @@ define void @cmpxchg_i64_release_monotonic(i64* %ptr, i64 %cmp, i64 %val) nounwi
 ; CSKY-NEXT:  .LCPI33_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val release monotonic
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val release monotonic
   ret void
 }
 
-define void @cmpxchg_i64_release_acquire(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_release_acquire(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_release_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -931,11 +931,11 @@ define void @cmpxchg_i64_release_acquire(i64* %ptr, i64 %cmp, i64 %val) nounwind
 ; CSKY-NEXT:  .LCPI34_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val release acquire
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val release acquire
   ret void
 }
 
-define void @cmpxchg_i64_acq_rel_monotonic(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_acq_rel_monotonic(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_acq_rel_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -962,11 +962,11 @@ define void @cmpxchg_i64_acq_rel_monotonic(i64* %ptr, i64 %cmp, i64 %val) nounwi
 ; CSKY-NEXT:  .LCPI35_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val acq_rel monotonic
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val acq_rel monotonic
   ret void
 }
 
-define void @cmpxchg_i64_acq_rel_acquire(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_acq_rel_acquire(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_acq_rel_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -993,11 +993,11 @@ define void @cmpxchg_i64_acq_rel_acquire(i64* %ptr, i64 %cmp, i64 %val) nounwind
 ; CSKY-NEXT:  .LCPI36_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val acq_rel acquire
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val acq_rel acquire
   ret void
 }
 
-define void @cmpxchg_i64_seq_cst_monotonic(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_seq_cst_monotonic(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_seq_cst_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1024,11 +1024,11 @@ define void @cmpxchg_i64_seq_cst_monotonic(i64* %ptr, i64 %cmp, i64 %val) nounwi
 ; CSKY-NEXT:  .LCPI37_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val seq_cst monotonic
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val seq_cst monotonic
   ret void
 }
 
-define void @cmpxchg_i64_seq_cst_acquire(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_seq_cst_acquire(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_seq_cst_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1055,11 +1055,11 @@ define void @cmpxchg_i64_seq_cst_acquire(i64* %ptr, i64 %cmp, i64 %val) nounwind
 ; CSKY-NEXT:  .LCPI38_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val seq_cst acquire
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val seq_cst acquire
   ret void
 }
 
-define void @cmpxchg_i64_seq_cst_seq_cst(i64* %ptr, i64 %cmp, i64 %val) nounwind {
+define void @cmpxchg_i64_seq_cst_seq_cst(ptr %ptr, i64 %cmp, i64 %val) nounwind {
 ; CSKY-LABEL: cmpxchg_i64_seq_cst_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1085,6 +1085,6 @@ define void @cmpxchg_i64_seq_cst_seq_cst(i64* %ptr, i64 %cmp, i64 %val) nounwind
 ; CSKY-NEXT:  .LCPI39_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
 ;
-  %res = cmpxchg i64* %ptr, i64 %cmp, i64 %val seq_cst seq_cst
+  %res = cmpxchg ptr %ptr, i64 %cmp, i64 %val seq_cst seq_cst
   ret void
 }

diff  --git a/llvm/test/CodeGen/CSKY/atomic-load-store.ll b/llvm/test/CodeGen/CSKY/atomic-load-store.ll
index 064f05b326938c..553e8ffb1ff211 100644
--- a/llvm/test/CodeGen/CSKY/atomic-load-store.ll
+++ b/llvm/test/CodeGen/CSKY/atomic-load-store.ll
@@ -2,7 +2,7 @@
 ; RUN: llc -mtriple=csky -verify-machineinstrs -csky-no-aliases -mattr=+2e3 < %s \
 ; RUN:   | FileCheck -check-prefix=CSKY %s
 
-define i8 @atomic_load_i8_unordered(i8 *%a) nounwind {
+define i8 @atomic_load_i8_unordered(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i8_unordered:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -18,11 +18,11 @@ define i8 @atomic_load_i8_unordered(i8 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI0_0:
 ; CSKY-NEXT:    .long __atomic_load_1
 ;
-  %1 = load atomic i8, i8* %a unordered, align 1
+  %1 = load atomic i8, ptr %a unordered, align 1
   ret i8 %1
 }
 
-define i8 @atomic_load_i8_monotonic(i8 *%a) nounwind {
+define i8 @atomic_load_i8_monotonic(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -38,11 +38,11 @@ define i8 @atomic_load_i8_monotonic(i8 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI1_0:
 ; CSKY-NEXT:    .long __atomic_load_1
 ;
-  %1 = load atomic i8, i8* %a monotonic, align 1
+  %1 = load atomic i8, ptr %a monotonic, align 1
   ret i8 %1
 }
 
-define i8 @atomic_load_i8_acquire(i8 *%a) nounwind {
+define i8 @atomic_load_i8_acquire(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -58,11 +58,11 @@ define i8 @atomic_load_i8_acquire(i8 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI2_0:
 ; CSKY-NEXT:    .long __atomic_load_1
 ;
-  %1 = load atomic i8, i8* %a acquire, align 1
+  %1 = load atomic i8, ptr %a acquire, align 1
   ret i8 %1
 }
 
-define i8 @atomic_load_i8_seq_cst(i8 *%a) nounwind {
+define i8 @atomic_load_i8_seq_cst(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -78,11 +78,11 @@ define i8 @atomic_load_i8_seq_cst(i8 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI3_0:
 ; CSKY-NEXT:    .long __atomic_load_1
 ;
-  %1 = load atomic i8, i8* %a seq_cst, align 1
+  %1 = load atomic i8, ptr %a seq_cst, align 1
   ret i8 %1
 }
 
-define i16 @atomic_load_i16_unordered(i16 *%a) nounwind {
+define i16 @atomic_load_i16_unordered(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i16_unordered:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -98,11 +98,11 @@ define i16 @atomic_load_i16_unordered(i16 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI4_0:
 ; CSKY-NEXT:    .long __atomic_load_2
 ;
-  %1 = load atomic i16, i16* %a unordered, align 2
+  %1 = load atomic i16, ptr %a unordered, align 2
   ret i16 %1
 }
 
-define i16 @atomic_load_i16_monotonic(i16 *%a) nounwind {
+define i16 @atomic_load_i16_monotonic(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -118,11 +118,11 @@ define i16 @atomic_load_i16_monotonic(i16 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI5_0:
 ; CSKY-NEXT:    .long __atomic_load_2
 ;
-  %1 = load atomic i16, i16* %a monotonic, align 2
+  %1 = load atomic i16, ptr %a monotonic, align 2
   ret i16 %1
 }
 
-define i16 @atomic_load_i16_acquire(i16 *%a) nounwind {
+define i16 @atomic_load_i16_acquire(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -138,11 +138,11 @@ define i16 @atomic_load_i16_acquire(i16 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI6_0:
 ; CSKY-NEXT:    .long __atomic_load_2
 ;
-  %1 = load atomic i16, i16* %a acquire, align 2
+  %1 = load atomic i16, ptr %a acquire, align 2
   ret i16 %1
 }
 
-define i16 @atomic_load_i16_seq_cst(i16 *%a) nounwind {
+define i16 @atomic_load_i16_seq_cst(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -158,11 +158,11 @@ define i16 @atomic_load_i16_seq_cst(i16 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI7_0:
 ; CSKY-NEXT:    .long __atomic_load_2
 ;
-  %1 = load atomic i16, i16* %a seq_cst, align 2
+  %1 = load atomic i16, ptr %a seq_cst, align 2
   ret i16 %1
 }
 
-define i32 @atomic_load_i32_unordered(i32 *%a) nounwind {
+define i32 @atomic_load_i32_unordered(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i32_unordered:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -178,11 +178,11 @@ define i32 @atomic_load_i32_unordered(i32 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI8_0:
 ; CSKY-NEXT:    .long __atomic_load_4
 ;
-  %1 = load atomic i32, i32* %a unordered, align 4
+  %1 = load atomic i32, ptr %a unordered, align 4
   ret i32 %1
 }
 
-define i32 @atomic_load_i32_monotonic(i32 *%a) nounwind {
+define i32 @atomic_load_i32_monotonic(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -198,11 +198,11 @@ define i32 @atomic_load_i32_monotonic(i32 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI9_0:
 ; CSKY-NEXT:    .long __atomic_load_4
 ;
-  %1 = load atomic i32, i32* %a monotonic, align 4
+  %1 = load atomic i32, ptr %a monotonic, align 4
   ret i32 %1
 }
 
-define i32 @atomic_load_i32_acquire(i32 *%a) nounwind {
+define i32 @atomic_load_i32_acquire(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -218,11 +218,11 @@ define i32 @atomic_load_i32_acquire(i32 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI10_0:
 ; CSKY-NEXT:    .long __atomic_load_4
 ;
-  %1 = load atomic i32, i32* %a acquire, align 4
+  %1 = load atomic i32, ptr %a acquire, align 4
   ret i32 %1
 }
 
-define i32 @atomic_load_i32_seq_cst(i32 *%a) nounwind {
+define i32 @atomic_load_i32_seq_cst(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -238,11 +238,11 @@ define i32 @atomic_load_i32_seq_cst(i32 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI11_0:
 ; CSKY-NEXT:    .long __atomic_load_4
 ;
-  %1 = load atomic i32, i32* %a seq_cst, align 4
+  %1 = load atomic i32, ptr %a seq_cst, align 4
   ret i32 %1
 }
 
-define i64 @atomic_load_i64_unordered(i64 *%a) nounwind {
+define i64 @atomic_load_i64_unordered(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i64_unordered:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -258,11 +258,11 @@ define i64 @atomic_load_i64_unordered(i64 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI12_0:
 ; CSKY-NEXT:    .long __atomic_load_8
 ;
-  %1 = load atomic i64, i64* %a unordered, align 8
+  %1 = load atomic i64, ptr %a unordered, align 8
   ret i64 %1
 }
 
-define i64 @atomic_load_i64_monotonic(i64 *%a) nounwind {
+define i64 @atomic_load_i64_monotonic(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -278,11 +278,11 @@ define i64 @atomic_load_i64_monotonic(i64 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI13_0:
 ; CSKY-NEXT:    .long __atomic_load_8
 ;
-  %1 = load atomic i64, i64* %a monotonic, align 8
+  %1 = load atomic i64, ptr %a monotonic, align 8
   ret i64 %1
 }
 
-define i64 @atomic_load_i64_acquire(i64 *%a) nounwind {
+define i64 @atomic_load_i64_acquire(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -298,11 +298,11 @@ define i64 @atomic_load_i64_acquire(i64 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI14_0:
 ; CSKY-NEXT:    .long __atomic_load_8
 ;
-  %1 = load atomic i64, i64* %a acquire, align 8
+  %1 = load atomic i64, ptr %a acquire, align 8
   ret i64 %1
 }
 
-define i64 @atomic_load_i64_seq_cst(i64 *%a) nounwind {
+define i64 @atomic_load_i64_seq_cst(ptr %a) nounwind {
 ; CSKY-LABEL: atomic_load_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -318,11 +318,11 @@ define i64 @atomic_load_i64_seq_cst(i64 *%a) nounwind {
 ; CSKY-NEXT:  .LCPI15_0:
 ; CSKY-NEXT:    .long __atomic_load_8
 ;
-  %1 = load atomic i64, i64* %a seq_cst, align 8
+  %1 = load atomic i64, ptr %a seq_cst, align 8
   ret i64 %1
 }
 
-define void @atomic_store_i8_unordered(i8 *%a, i8 %b) nounwind {
+define void @atomic_store_i8_unordered(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i8_unordered:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -338,11 +338,11 @@ define void @atomic_store_i8_unordered(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:  .LCPI16_0:
 ; CSKY-NEXT:    .long __atomic_store_1
 ;
-  store atomic i8 %b, i8* %a unordered, align 1
+  store atomic i8 %b, ptr %a unordered, align 1
   ret void
 }
 
-define void @atomic_store_i8_monotonic(i8 *%a, i8 %b) nounwind {
+define void @atomic_store_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -358,11 +358,11 @@ define void @atomic_store_i8_monotonic(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:  .LCPI17_0:
 ; CSKY-NEXT:    .long __atomic_store_1
 ;
-  store atomic i8 %b, i8* %a monotonic, align 1
+  store atomic i8 %b, ptr %a monotonic, align 1
   ret void
 }
 
-define void @atomic_store_i8_release(i8 *%a, i8 %b) nounwind {
+define void @atomic_store_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -378,11 +378,11 @@ define void @atomic_store_i8_release(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:  .LCPI18_0:
 ; CSKY-NEXT:    .long __atomic_store_1
 ;
-  store atomic i8 %b, i8* %a release, align 1
+  store atomic i8 %b, ptr %a release, align 1
   ret void
 }
 
-define void @atomic_store_i8_seq_cst(i8 *%a, i8 %b) nounwind {
+define void @atomic_store_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -398,11 +398,11 @@ define void @atomic_store_i8_seq_cst(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:  .LCPI19_0:
 ; CSKY-NEXT:    .long __atomic_store_1
 ;
-  store atomic i8 %b, i8* %a seq_cst, align 1
+  store atomic i8 %b, ptr %a seq_cst, align 1
   ret void
 }
 
-define void @atomic_store_i16_unordered(i16 *%a, i16 %b) nounwind {
+define void @atomic_store_i16_unordered(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i16_unordered:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -418,11 +418,11 @@ define void @atomic_store_i16_unordered(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:  .LCPI20_0:
 ; CSKY-NEXT:    .long __atomic_store_2
 ;
-  store atomic i16 %b, i16* %a unordered, align 2
+  store atomic i16 %b, ptr %a unordered, align 2
   ret void
 }
 
-define void @atomic_store_i16_monotonic(i16 *%a, i16 %b) nounwind {
+define void @atomic_store_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -438,11 +438,11 @@ define void @atomic_store_i16_monotonic(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:  .LCPI21_0:
 ; CSKY-NEXT:    .long __atomic_store_2
 ;
-  store atomic i16 %b, i16* %a monotonic, align 2
+  store atomic i16 %b, ptr %a monotonic, align 2
   ret void
 }
 
-define void @atomic_store_i16_release(i16 *%a, i16 %b) nounwind {
+define void @atomic_store_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -458,11 +458,11 @@ define void @atomic_store_i16_release(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:  .LCPI22_0:
 ; CSKY-NEXT:    .long __atomic_store_2
 ;
-  store atomic i16 %b, i16* %a release, align 2
+  store atomic i16 %b, ptr %a release, align 2
   ret void
 }
 
-define void @atomic_store_i16_seq_cst(i16 *%a, i16 %b) nounwind {
+define void @atomic_store_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -478,11 +478,11 @@ define void @atomic_store_i16_seq_cst(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:  .LCPI23_0:
 ; CSKY-NEXT:    .long __atomic_store_2
 ;
-  store atomic i16 %b, i16* %a seq_cst, align 2
+  store atomic i16 %b, ptr %a seq_cst, align 2
   ret void
 }
 
-define void @atomic_store_i32_unordered(i32 *%a, i32 %b) nounwind {
+define void @atomic_store_i32_unordered(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i32_unordered:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -498,11 +498,11 @@ define void @atomic_store_i32_unordered(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:  .LCPI24_0:
 ; CSKY-NEXT:    .long __atomic_store_4
 ;
-  store atomic i32 %b, i32* %a unordered, align 4
+  store atomic i32 %b, ptr %a unordered, align 4
   ret void
 }
 
-define void @atomic_store_i32_monotonic(i32 *%a, i32 %b) nounwind {
+define void @atomic_store_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -518,11 +518,11 @@ define void @atomic_store_i32_monotonic(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:  .LCPI25_0:
 ; CSKY-NEXT:    .long __atomic_store_4
 ;
-  store atomic i32 %b, i32* %a monotonic, align 4
+  store atomic i32 %b, ptr %a monotonic, align 4
   ret void
 }
 
-define void @atomic_store_i32_release(i32 *%a, i32 %b) nounwind {
+define void @atomic_store_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -538,11 +538,11 @@ define void @atomic_store_i32_release(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:  .LCPI26_0:
 ; CSKY-NEXT:    .long __atomic_store_4
 ;
-  store atomic i32 %b, i32* %a release, align 4
+  store atomic i32 %b, ptr %a release, align 4
   ret void
 }
 
-define void @atomic_store_i32_seq_cst(i32 *%a, i32 %b) nounwind {
+define void @atomic_store_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -558,11 +558,11 @@ define void @atomic_store_i32_seq_cst(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:  .LCPI27_0:
 ; CSKY-NEXT:    .long __atomic_store_4
 ;
-  store atomic i32 %b, i32* %a seq_cst, align 4
+  store atomic i32 %b, ptr %a seq_cst, align 4
   ret void
 }
 
-define void @atomic_store_i64_unordered(i64 *%a, i64 %b) nounwind {
+define void @atomic_store_i64_unordered(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i64_unordered:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -578,11 +578,11 @@ define void @atomic_store_i64_unordered(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:  .LCPI28_0:
 ; CSKY-NEXT:    .long __atomic_store_8
 ;
-  store atomic i64 %b, i64* %a unordered, align 8
+  store atomic i64 %b, ptr %a unordered, align 8
   ret void
 }
 
-define void @atomic_store_i64_monotonic(i64 *%a, i64 %b) nounwind {
+define void @atomic_store_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -598,11 +598,11 @@ define void @atomic_store_i64_monotonic(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:  .LCPI29_0:
 ; CSKY-NEXT:    .long __atomic_store_8
 ;
-  store atomic i64 %b, i64* %a monotonic, align 8
+  store atomic i64 %b, ptr %a monotonic, align 8
   ret void
 }
 
-define void @atomic_store_i64_release(i64 *%a, i64 %b) nounwind {
+define void @atomic_store_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -618,11 +618,11 @@ define void @atomic_store_i64_release(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:  .LCPI30_0:
 ; CSKY-NEXT:    .long __atomic_store_8
 ;
-  store atomic i64 %b, i64* %a release, align 8
+  store atomic i64 %b, ptr %a release, align 8
   ret void
 }
 
-define void @atomic_store_i64_seq_cst(i64 *%a, i64 %b) nounwind {
+define void @atomic_store_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomic_store_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -638,6 +638,6 @@ define void @atomic_store_i64_seq_cst(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:  .LCPI31_0:
 ; CSKY-NEXT:    .long __atomic_store_8
 ;
-  store atomic i64 %b, i64* %a seq_cst, align 8
+  store atomic i64 %b, ptr %a seq_cst, align 8
   ret void
 }

diff  --git a/llvm/test/CodeGen/CSKY/atomic-rmw.ll b/llvm/test/CodeGen/CSKY/atomic-rmw.ll
index c9fd90bb8c3478..ee1c8194cd3595 100644
--- a/llvm/test/CodeGen/CSKY/atomic-rmw.ll
+++ b/llvm/test/CodeGen/CSKY/atomic-rmw.ll
@@ -2,7 +2,7 @@
 ; RUN: llc -mtriple=csky -verify-machineinstrs -csky-no-aliases -mattr=+2e3 < %s \
 ; RUN:   | FileCheck -check-prefix=CSKY %s
 
-define i8 @atomicrmw_xchg_i8_monotonic(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_xchg_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -17,11 +17,11 @@ define i8 @atomicrmw_xchg_i8_monotonic(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI0_0:
 ; CSKY-NEXT:    .long __atomic_exchange_1
-  %1 = atomicrmw xchg i8* %a, i8 %b monotonic
+  %1 = atomicrmw xchg ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_xchg_i8_acquire(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_xchg_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -36,11 +36,11 @@ define i8 @atomicrmw_xchg_i8_acquire(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI1_0:
 ; CSKY-NEXT:    .long __atomic_exchange_1
-  %1 = atomicrmw xchg i8* %a, i8 %b acquire
+  %1 = atomicrmw xchg ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_xchg_i8_release(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_xchg_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -55,11 +55,11 @@ define i8 @atomicrmw_xchg_i8_release(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI2_0:
 ; CSKY-NEXT:    .long __atomic_exchange_1
-  %1 = atomicrmw xchg i8* %a, i8 %b release
+  %1 = atomicrmw xchg ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_xchg_i8_acq_rel(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_xchg_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -74,11 +74,11 @@ define i8 @atomicrmw_xchg_i8_acq_rel(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI3_0:
 ; CSKY-NEXT:    .long __atomic_exchange_1
-  %1 = atomicrmw xchg i8* %a, i8 %b acq_rel
+  %1 = atomicrmw xchg ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_xchg_i8_seq_cst(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_xchg_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -93,11 +93,11 @@ define i8 @atomicrmw_xchg_i8_seq_cst(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI4_0:
 ; CSKY-NEXT:    .long __atomic_exchange_1
-  %1 = atomicrmw xchg i8* %a, i8 %b seq_cst
+  %1 = atomicrmw xchg ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_add_i8_monotonic(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_add_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -112,11 +112,11 @@ define i8 @atomicrmw_add_i8_monotonic(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI5_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_1
-  %1 = atomicrmw add i8* %a, i8 %b monotonic
+  %1 = atomicrmw add ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_add_i8_acquire(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_add_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -131,11 +131,11 @@ define i8 @atomicrmw_add_i8_acquire(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI6_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_1
-  %1 = atomicrmw add i8* %a, i8 %b acquire
+  %1 = atomicrmw add ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_add_i8_release(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_add_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -150,11 +150,11 @@ define i8 @atomicrmw_add_i8_release(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI7_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_1
-  %1 = atomicrmw add i8* %a, i8 %b release
+  %1 = atomicrmw add ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_add_i8_acq_rel(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_add_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -169,11 +169,11 @@ define i8 @atomicrmw_add_i8_acq_rel(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI8_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_1
-  %1 = atomicrmw add i8* %a, i8 %b acq_rel
+  %1 = atomicrmw add ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_add_i8_seq_cst(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_add_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -188,11 +188,11 @@ define i8 @atomicrmw_add_i8_seq_cst(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI9_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_1
-  %1 = atomicrmw add i8* %a, i8 %b seq_cst
+  %1 = atomicrmw add ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_sub_i8_monotonic(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_sub_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -207,11 +207,11 @@ define i8 @atomicrmw_sub_i8_monotonic(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI10_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_1
-  %1 = atomicrmw sub i8* %a, i8 %b monotonic
+  %1 = atomicrmw sub ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_sub_i8_acquire(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_sub_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -226,11 +226,11 @@ define i8 @atomicrmw_sub_i8_acquire(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI11_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_1
-  %1 = atomicrmw sub i8* %a, i8 %b acquire
+  %1 = atomicrmw sub ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_sub_i8_release(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_sub_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -245,11 +245,11 @@ define i8 @atomicrmw_sub_i8_release(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI12_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_1
-  %1 = atomicrmw sub i8* %a, i8 %b release
+  %1 = atomicrmw sub ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_sub_i8_acq_rel(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_sub_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -264,11 +264,11 @@ define i8 @atomicrmw_sub_i8_acq_rel(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI13_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_1
-  %1 = atomicrmw sub i8* %a, i8 %b acq_rel
+  %1 = atomicrmw sub ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_sub_i8_seq_cst(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_sub_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -283,11 +283,11 @@ define i8 @atomicrmw_sub_i8_seq_cst(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI14_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_1
-  %1 = atomicrmw sub i8* %a, i8 %b seq_cst
+  %1 = atomicrmw sub ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_and_i8_monotonic(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_and_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -302,11 +302,11 @@ define i8 @atomicrmw_and_i8_monotonic(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI15_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_1
-  %1 = atomicrmw and i8* %a, i8 %b monotonic
+  %1 = atomicrmw and ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_and_i8_acquire(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_and_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -321,11 +321,11 @@ define i8 @atomicrmw_and_i8_acquire(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI16_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_1
-  %1 = atomicrmw and i8* %a, i8 %b acquire
+  %1 = atomicrmw and ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_and_i8_release(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_and_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -340,11 +340,11 @@ define i8 @atomicrmw_and_i8_release(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI17_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_1
-  %1 = atomicrmw and i8* %a, i8 %b release
+  %1 = atomicrmw and ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_and_i8_acq_rel(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_and_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -359,11 +359,11 @@ define i8 @atomicrmw_and_i8_acq_rel(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI18_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_1
-  %1 = atomicrmw and i8* %a, i8 %b acq_rel
+  %1 = atomicrmw and ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_and_i8_seq_cst(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_and_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -378,11 +378,11 @@ define i8 @atomicrmw_and_i8_seq_cst(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI19_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_1
-  %1 = atomicrmw and i8* %a, i8 %b seq_cst
+  %1 = atomicrmw and ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_nand_i8_monotonic(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_nand_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -397,11 +397,11 @@ define i8 @atomicrmw_nand_i8_monotonic(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI20_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_1
-  %1 = atomicrmw nand i8* %a, i8 %b monotonic
+  %1 = atomicrmw nand ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_nand_i8_acquire(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_nand_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -416,11 +416,11 @@ define i8 @atomicrmw_nand_i8_acquire(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI21_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_1
-  %1 = atomicrmw nand i8* %a, i8 %b acquire
+  %1 = atomicrmw nand ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_nand_i8_release(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_nand_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -435,11 +435,11 @@ define i8 @atomicrmw_nand_i8_release(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI22_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_1
-  %1 = atomicrmw nand i8* %a, i8 %b release
+  %1 = atomicrmw nand ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_nand_i8_acq_rel(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_nand_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -454,11 +454,11 @@ define i8 @atomicrmw_nand_i8_acq_rel(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI23_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_1
-  %1 = atomicrmw nand i8* %a, i8 %b acq_rel
+  %1 = atomicrmw nand ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_nand_i8_seq_cst(i8* %a, i8 %b) nounwind {
+define i8 @atomicrmw_nand_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -473,11 +473,11 @@ define i8 @atomicrmw_nand_i8_seq_cst(i8* %a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI24_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_1
-  %1 = atomicrmw nand i8* %a, i8 %b seq_cst
+  %1 = atomicrmw nand ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_or_i8_monotonic(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_or_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -492,11 +492,11 @@ define i8 @atomicrmw_or_i8_monotonic(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI25_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_1
-  %1 = atomicrmw or i8* %a, i8 %b monotonic
+  %1 = atomicrmw or ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_or_i8_acquire(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_or_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -511,11 +511,11 @@ define i8 @atomicrmw_or_i8_acquire(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI26_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_1
-  %1 = atomicrmw or i8* %a, i8 %b acquire
+  %1 = atomicrmw or ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_or_i8_release(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_or_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -530,11 +530,11 @@ define i8 @atomicrmw_or_i8_release(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI27_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_1
-  %1 = atomicrmw or i8* %a, i8 %b release
+  %1 = atomicrmw or ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_or_i8_acq_rel(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_or_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -549,11 +549,11 @@ define i8 @atomicrmw_or_i8_acq_rel(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI28_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_1
-  %1 = atomicrmw or i8* %a, i8 %b acq_rel
+  %1 = atomicrmw or ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_or_i8_seq_cst(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_or_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -568,11 +568,11 @@ define i8 @atomicrmw_or_i8_seq_cst(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI29_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_1
-  %1 = atomicrmw or i8* %a, i8 %b seq_cst
+  %1 = atomicrmw or ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_xor_i8_monotonic(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_xor_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -587,11 +587,11 @@ define i8 @atomicrmw_xor_i8_monotonic(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI30_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_1
-  %1 = atomicrmw xor i8* %a, i8 %b monotonic
+  %1 = atomicrmw xor ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_xor_i8_acquire(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_xor_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -606,11 +606,11 @@ define i8 @atomicrmw_xor_i8_acquire(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI31_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_1
-  %1 = atomicrmw xor i8* %a, i8 %b acquire
+  %1 = atomicrmw xor ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_xor_i8_release(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_xor_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -625,11 +625,11 @@ define i8 @atomicrmw_xor_i8_release(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI32_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_1
-  %1 = atomicrmw xor i8* %a, i8 %b release
+  %1 = atomicrmw xor ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_xor_i8_acq_rel(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_xor_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -644,11 +644,11 @@ define i8 @atomicrmw_xor_i8_acq_rel(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI33_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_1
-  %1 = atomicrmw xor i8* %a, i8 %b acq_rel
+  %1 = atomicrmw xor ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_xor_i8_seq_cst(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_xor_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -663,11 +663,11 @@ define i8 @atomicrmw_xor_i8_seq_cst(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI34_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_1
-  %1 = atomicrmw xor i8* %a, i8 %b seq_cst
+  %1 = atomicrmw xor ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_max_i8_monotonic(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_max_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -711,11 +711,11 @@ define i8 @atomicrmw_max_i8_monotonic(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI35_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw max i8* %a, i8 %b monotonic
+  %1 = atomicrmw max ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_max_i8_acquire(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_max_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -759,11 +759,11 @@ define i8 @atomicrmw_max_i8_acquire(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI36_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw max i8* %a, i8 %b acquire
+  %1 = atomicrmw max ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_max_i8_release(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_max_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -807,11 +807,11 @@ define i8 @atomicrmw_max_i8_release(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI37_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw max i8* %a, i8 %b release
+  %1 = atomicrmw max ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_max_i8_acq_rel(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_max_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -855,11 +855,11 @@ define i8 @atomicrmw_max_i8_acq_rel(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI38_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw max i8* %a, i8 %b acq_rel
+  %1 = atomicrmw max ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_max_i8_seq_cst(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_max_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -903,11 +903,11 @@ define i8 @atomicrmw_max_i8_seq_cst(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI39_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw max i8* %a, i8 %b seq_cst
+  %1 = atomicrmw max ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_min_i8_monotonic(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_min_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -951,11 +951,11 @@ define i8 @atomicrmw_min_i8_monotonic(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI40_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw min i8* %a, i8 %b monotonic
+  %1 = atomicrmw min ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_min_i8_acquire(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_min_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -999,11 +999,11 @@ define i8 @atomicrmw_min_i8_acquire(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI41_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw min i8* %a, i8 %b acquire
+  %1 = atomicrmw min ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_min_i8_release(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_min_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1047,11 +1047,11 @@ define i8 @atomicrmw_min_i8_release(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI42_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw min i8* %a, i8 %b release
+  %1 = atomicrmw min ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_min_i8_acq_rel(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_min_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1095,11 +1095,11 @@ define i8 @atomicrmw_min_i8_acq_rel(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI43_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw min i8* %a, i8 %b acq_rel
+  %1 = atomicrmw min ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_min_i8_seq_cst(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_min_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1143,11 +1143,11 @@ define i8 @atomicrmw_min_i8_seq_cst(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI44_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw min i8* %a, i8 %b seq_cst
+  %1 = atomicrmw min ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_umax_i8_monotonic(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umax_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1191,11 +1191,11 @@ define i8 @atomicrmw_umax_i8_monotonic(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI45_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umax i8* %a, i8 %b monotonic
+  %1 = atomicrmw umax ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_umax_i8_acquire(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umax_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1239,11 +1239,11 @@ define i8 @atomicrmw_umax_i8_acquire(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI46_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umax i8* %a, i8 %b acquire
+  %1 = atomicrmw umax ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_umax_i8_release(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umax_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1287,11 +1287,11 @@ define i8 @atomicrmw_umax_i8_release(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI47_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umax i8* %a, i8 %b release
+  %1 = atomicrmw umax ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_umax_i8_acq_rel(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umax_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1335,11 +1335,11 @@ define i8 @atomicrmw_umax_i8_acq_rel(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI48_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umax i8* %a, i8 %b acq_rel
+  %1 = atomicrmw umax ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_umax_i8_seq_cst(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umax_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1383,11 +1383,11 @@ define i8 @atomicrmw_umax_i8_seq_cst(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI49_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umax i8* %a, i8 %b seq_cst
+  %1 = atomicrmw umax ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i8 @atomicrmw_umin_i8_monotonic(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umin_i8_monotonic(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i8_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1431,11 +1431,11 @@ define i8 @atomicrmw_umin_i8_monotonic(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI50_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umin i8* %a, i8 %b monotonic
+  %1 = atomicrmw umin ptr %a, i8 %b monotonic
   ret i8 %1
 }
 
-define i8 @atomicrmw_umin_i8_acquire(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umin_i8_acquire(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i8_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1479,11 +1479,11 @@ define i8 @atomicrmw_umin_i8_acquire(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI51_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umin i8* %a, i8 %b acquire
+  %1 = atomicrmw umin ptr %a, i8 %b acquire
   ret i8 %1
 }
 
-define i8 @atomicrmw_umin_i8_release(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umin_i8_release(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i8_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1527,11 +1527,11 @@ define i8 @atomicrmw_umin_i8_release(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI52_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umin i8* %a, i8 %b release
+  %1 = atomicrmw umin ptr %a, i8 %b release
   ret i8 %1
 }
 
-define i8 @atomicrmw_umin_i8_acq_rel(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umin_i8_acq_rel(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i8_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1575,11 +1575,11 @@ define i8 @atomicrmw_umin_i8_acq_rel(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI53_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umin i8* %a, i8 %b acq_rel
+  %1 = atomicrmw umin ptr %a, i8 %b acq_rel
   ret i8 %1
 }
 
-define i8 @atomicrmw_umin_i8_seq_cst(i8 *%a, i8 %b) nounwind {
+define i8 @atomicrmw_umin_i8_seq_cst(ptr %a, i8 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i8_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -1623,11 +1623,11 @@ define i8 @atomicrmw_umin_i8_seq_cst(i8 *%a, i8 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI54_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_1
-  %1 = atomicrmw umin i8* %a, i8 %b seq_cst
+  %1 = atomicrmw umin ptr %a, i8 %b seq_cst
   ret i8 %1
 }
 
-define i16 @atomicrmw_xchg_i16_monotonic(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_xchg_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1642,11 +1642,11 @@ define i16 @atomicrmw_xchg_i16_monotonic(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI55_0:
 ; CSKY-NEXT:    .long __atomic_exchange_2
-  %1 = atomicrmw xchg i16* %a, i16 %b monotonic
+  %1 = atomicrmw xchg ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_xchg_i16_acquire(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_xchg_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1661,11 +1661,11 @@ define i16 @atomicrmw_xchg_i16_acquire(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI56_0:
 ; CSKY-NEXT:    .long __atomic_exchange_2
-  %1 = atomicrmw xchg i16* %a, i16 %b acquire
+  %1 = atomicrmw xchg ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_xchg_i16_release(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_xchg_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1680,11 +1680,11 @@ define i16 @atomicrmw_xchg_i16_release(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI57_0:
 ; CSKY-NEXT:    .long __atomic_exchange_2
-  %1 = atomicrmw xchg i16* %a, i16 %b release
+  %1 = atomicrmw xchg ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_xchg_i16_acq_rel(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_xchg_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1699,11 +1699,11 @@ define i16 @atomicrmw_xchg_i16_acq_rel(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI58_0:
 ; CSKY-NEXT:    .long __atomic_exchange_2
-  %1 = atomicrmw xchg i16* %a, i16 %b acq_rel
+  %1 = atomicrmw xchg ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_xchg_i16_seq_cst(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_xchg_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1718,11 +1718,11 @@ define i16 @atomicrmw_xchg_i16_seq_cst(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI59_0:
 ; CSKY-NEXT:    .long __atomic_exchange_2
-  %1 = atomicrmw xchg i16* %a, i16 %b seq_cst
+  %1 = atomicrmw xchg ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_add_i16_monotonic(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_add_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1737,11 +1737,11 @@ define i16 @atomicrmw_add_i16_monotonic(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI60_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_2
-  %1 = atomicrmw add i16* %a, i16 %b monotonic
+  %1 = atomicrmw add ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_add_i16_acquire(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_add_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1756,11 +1756,11 @@ define i16 @atomicrmw_add_i16_acquire(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI61_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_2
-  %1 = atomicrmw add i16* %a, i16 %b acquire
+  %1 = atomicrmw add ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_add_i16_release(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_add_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1775,11 +1775,11 @@ define i16 @atomicrmw_add_i16_release(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI62_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_2
-  %1 = atomicrmw add i16* %a, i16 %b release
+  %1 = atomicrmw add ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_add_i16_acq_rel(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_add_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1794,11 +1794,11 @@ define i16 @atomicrmw_add_i16_acq_rel(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI63_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_2
-  %1 = atomicrmw add i16* %a, i16 %b acq_rel
+  %1 = atomicrmw add ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_add_i16_seq_cst(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_add_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1813,11 +1813,11 @@ define i16 @atomicrmw_add_i16_seq_cst(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI64_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_2
-  %1 = atomicrmw add i16* %a, i16 %b seq_cst
+  %1 = atomicrmw add ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_sub_i16_monotonic(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_sub_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1832,11 +1832,11 @@ define i16 @atomicrmw_sub_i16_monotonic(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI65_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_2
-  %1 = atomicrmw sub i16* %a, i16 %b monotonic
+  %1 = atomicrmw sub ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_sub_i16_acquire(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_sub_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1851,11 +1851,11 @@ define i16 @atomicrmw_sub_i16_acquire(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI66_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_2
-  %1 = atomicrmw sub i16* %a, i16 %b acquire
+  %1 = atomicrmw sub ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_sub_i16_release(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_sub_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1870,11 +1870,11 @@ define i16 @atomicrmw_sub_i16_release(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI67_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_2
-  %1 = atomicrmw sub i16* %a, i16 %b release
+  %1 = atomicrmw sub ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_sub_i16_acq_rel(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_sub_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1889,11 +1889,11 @@ define i16 @atomicrmw_sub_i16_acq_rel(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI68_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_2
-  %1 = atomicrmw sub i16* %a, i16 %b acq_rel
+  %1 = atomicrmw sub ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_sub_i16_seq_cst(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_sub_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1908,11 +1908,11 @@ define i16 @atomicrmw_sub_i16_seq_cst(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI69_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_2
-  %1 = atomicrmw sub i16* %a, i16 %b seq_cst
+  %1 = atomicrmw sub ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_and_i16_monotonic(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_and_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1927,11 +1927,11 @@ define i16 @atomicrmw_and_i16_monotonic(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI70_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_2
-  %1 = atomicrmw and i16* %a, i16 %b monotonic
+  %1 = atomicrmw and ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_and_i16_acquire(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_and_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1946,11 +1946,11 @@ define i16 @atomicrmw_and_i16_acquire(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI71_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_2
-  %1 = atomicrmw and i16* %a, i16 %b acquire
+  %1 = atomicrmw and ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_and_i16_release(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_and_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1965,11 +1965,11 @@ define i16 @atomicrmw_and_i16_release(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI72_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_2
-  %1 = atomicrmw and i16* %a, i16 %b release
+  %1 = atomicrmw and ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_and_i16_acq_rel(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_and_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -1984,11 +1984,11 @@ define i16 @atomicrmw_and_i16_acq_rel(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI73_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_2
-  %1 = atomicrmw and i16* %a, i16 %b acq_rel
+  %1 = atomicrmw and ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_and_i16_seq_cst(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_and_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2003,11 +2003,11 @@ define i16 @atomicrmw_and_i16_seq_cst(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI74_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_2
-  %1 = atomicrmw and i16* %a, i16 %b seq_cst
+  %1 = atomicrmw and ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_nand_i16_monotonic(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_nand_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2022,11 +2022,11 @@ define i16 @atomicrmw_nand_i16_monotonic(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI75_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_2
-  %1 = atomicrmw nand i16* %a, i16 %b monotonic
+  %1 = atomicrmw nand ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_nand_i16_acquire(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_nand_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2041,11 +2041,11 @@ define i16 @atomicrmw_nand_i16_acquire(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI76_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_2
-  %1 = atomicrmw nand i16* %a, i16 %b acquire
+  %1 = atomicrmw nand ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_nand_i16_release(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_nand_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2060,11 +2060,11 @@ define i16 @atomicrmw_nand_i16_release(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI77_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_2
-  %1 = atomicrmw nand i16* %a, i16 %b release
+  %1 = atomicrmw nand ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_nand_i16_acq_rel(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_nand_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2079,11 +2079,11 @@ define i16 @atomicrmw_nand_i16_acq_rel(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI78_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_2
-  %1 = atomicrmw nand i16* %a, i16 %b acq_rel
+  %1 = atomicrmw nand ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_nand_i16_seq_cst(i16* %a, i16 %b) nounwind {
+define i16 @atomicrmw_nand_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2098,11 +2098,11 @@ define i16 @atomicrmw_nand_i16_seq_cst(i16* %a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI79_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_2
-  %1 = atomicrmw nand i16* %a, i16 %b seq_cst
+  %1 = atomicrmw nand ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_or_i16_monotonic(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_or_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2117,11 +2117,11 @@ define i16 @atomicrmw_or_i16_monotonic(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI80_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_2
-  %1 = atomicrmw or i16* %a, i16 %b monotonic
+  %1 = atomicrmw or ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_or_i16_acquire(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_or_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2136,11 +2136,11 @@ define i16 @atomicrmw_or_i16_acquire(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI81_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_2
-  %1 = atomicrmw or i16* %a, i16 %b acquire
+  %1 = atomicrmw or ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_or_i16_release(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_or_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2155,11 +2155,11 @@ define i16 @atomicrmw_or_i16_release(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI82_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_2
-  %1 = atomicrmw or i16* %a, i16 %b release
+  %1 = atomicrmw or ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_or_i16_acq_rel(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_or_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2174,11 +2174,11 @@ define i16 @atomicrmw_or_i16_acq_rel(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI83_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_2
-  %1 = atomicrmw or i16* %a, i16 %b acq_rel
+  %1 = atomicrmw or ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_or_i16_seq_cst(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_or_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2193,11 +2193,11 @@ define i16 @atomicrmw_or_i16_seq_cst(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI84_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_2
-  %1 = atomicrmw or i16* %a, i16 %b seq_cst
+  %1 = atomicrmw or ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_xor_i16_monotonic(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_xor_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2212,11 +2212,11 @@ define i16 @atomicrmw_xor_i16_monotonic(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI85_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_2
-  %1 = atomicrmw xor i16* %a, i16 %b monotonic
+  %1 = atomicrmw xor ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_xor_i16_acquire(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_xor_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2231,11 +2231,11 @@ define i16 @atomicrmw_xor_i16_acquire(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI86_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_2
-  %1 = atomicrmw xor i16* %a, i16 %b acquire
+  %1 = atomicrmw xor ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_xor_i16_release(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_xor_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2250,11 +2250,11 @@ define i16 @atomicrmw_xor_i16_release(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI87_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_2
-  %1 = atomicrmw xor i16* %a, i16 %b release
+  %1 = atomicrmw xor ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_xor_i16_acq_rel(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_xor_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2269,11 +2269,11 @@ define i16 @atomicrmw_xor_i16_acq_rel(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI88_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_2
-  %1 = atomicrmw xor i16* %a, i16 %b acq_rel
+  %1 = atomicrmw xor ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_xor_i16_seq_cst(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_xor_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -2288,11 +2288,11 @@ define i16 @atomicrmw_xor_i16_seq_cst(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI89_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_2
-  %1 = atomicrmw xor i16* %a, i16 %b seq_cst
+  %1 = atomicrmw xor ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_max_i16_monotonic(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_max_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2336,11 +2336,11 @@ define i16 @atomicrmw_max_i16_monotonic(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI90_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw max i16* %a, i16 %b monotonic
+  %1 = atomicrmw max ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_max_i16_acquire(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_max_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2384,11 +2384,11 @@ define i16 @atomicrmw_max_i16_acquire(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI91_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw max i16* %a, i16 %b acquire
+  %1 = atomicrmw max ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_max_i16_release(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_max_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2432,11 +2432,11 @@ define i16 @atomicrmw_max_i16_release(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI92_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw max i16* %a, i16 %b release
+  %1 = atomicrmw max ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_max_i16_acq_rel(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_max_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2480,11 +2480,11 @@ define i16 @atomicrmw_max_i16_acq_rel(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI93_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw max i16* %a, i16 %b acq_rel
+  %1 = atomicrmw max ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_max_i16_seq_cst(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_max_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2528,11 +2528,11 @@ define i16 @atomicrmw_max_i16_seq_cst(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI94_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw max i16* %a, i16 %b seq_cst
+  %1 = atomicrmw max ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_min_i16_monotonic(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_min_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2576,11 +2576,11 @@ define i16 @atomicrmw_min_i16_monotonic(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI95_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw min i16* %a, i16 %b monotonic
+  %1 = atomicrmw min ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_min_i16_acquire(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_min_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2624,11 +2624,11 @@ define i16 @atomicrmw_min_i16_acquire(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI96_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw min i16* %a, i16 %b acquire
+  %1 = atomicrmw min ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_min_i16_release(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_min_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2672,11 +2672,11 @@ define i16 @atomicrmw_min_i16_release(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI97_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw min i16* %a, i16 %b release
+  %1 = atomicrmw min ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_min_i16_acq_rel(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_min_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2720,11 +2720,11 @@ define i16 @atomicrmw_min_i16_acq_rel(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI98_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw min i16* %a, i16 %b acq_rel
+  %1 = atomicrmw min ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_min_i16_seq_cst(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_min_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2768,11 +2768,11 @@ define i16 @atomicrmw_min_i16_seq_cst(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI99_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw min i16* %a, i16 %b seq_cst
+  %1 = atomicrmw min ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_umax_i16_monotonic(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umax_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2816,11 +2816,11 @@ define i16 @atomicrmw_umax_i16_monotonic(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI100_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umax i16* %a, i16 %b monotonic
+  %1 = atomicrmw umax ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_umax_i16_acquire(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umax_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2864,11 +2864,11 @@ define i16 @atomicrmw_umax_i16_acquire(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI101_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umax i16* %a, i16 %b acquire
+  %1 = atomicrmw umax ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_umax_i16_release(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umax_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2912,11 +2912,11 @@ define i16 @atomicrmw_umax_i16_release(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI102_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umax i16* %a, i16 %b release
+  %1 = atomicrmw umax ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_umax_i16_acq_rel(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umax_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -2960,11 +2960,11 @@ define i16 @atomicrmw_umax_i16_acq_rel(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI103_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umax i16* %a, i16 %b acq_rel
+  %1 = atomicrmw umax ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_umax_i16_seq_cst(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umax_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -3008,11 +3008,11 @@ define i16 @atomicrmw_umax_i16_seq_cst(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI104_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umax i16* %a, i16 %b seq_cst
+  %1 = atomicrmw umax ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i16 @atomicrmw_umin_i16_monotonic(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umin_i16_monotonic(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i16_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -3056,11 +3056,11 @@ define i16 @atomicrmw_umin_i16_monotonic(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI105_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umin i16* %a, i16 %b monotonic
+  %1 = atomicrmw umin ptr %a, i16 %b monotonic
   ret i16 %1
 }
 
-define i16 @atomicrmw_umin_i16_acquire(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umin_i16_acquire(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i16_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -3104,11 +3104,11 @@ define i16 @atomicrmw_umin_i16_acquire(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI106_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umin i16* %a, i16 %b acquire
+  %1 = atomicrmw umin ptr %a, i16 %b acquire
   ret i16 %1
 }
 
-define i16 @atomicrmw_umin_i16_release(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umin_i16_release(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i16_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -3152,11 +3152,11 @@ define i16 @atomicrmw_umin_i16_release(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI107_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umin i16* %a, i16 %b release
+  %1 = atomicrmw umin ptr %a, i16 %b release
   ret i16 %1
 }
 
-define i16 @atomicrmw_umin_i16_acq_rel(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umin_i16_acq_rel(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i16_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -3200,11 +3200,11 @@ define i16 @atomicrmw_umin_i16_acq_rel(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI108_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umin i16* %a, i16 %b acq_rel
+  %1 = atomicrmw umin ptr %a, i16 %b acq_rel
   ret i16 %1
 }
 
-define i16 @atomicrmw_umin_i16_seq_cst(i16 *%a, i16 %b) nounwind {
+define i16 @atomicrmw_umin_i16_seq_cst(ptr %a, i16 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i16_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -3248,11 +3248,11 @@ define i16 @atomicrmw_umin_i16_seq_cst(i16 *%a, i16 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI109_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_2
-  %1 = atomicrmw umin i16* %a, i16 %b seq_cst
+  %1 = atomicrmw umin ptr %a, i16 %b seq_cst
   ret i16 %1
 }
 
-define i32 @atomicrmw_xchg_i32_monotonic(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_xchg_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3267,11 +3267,11 @@ define i32 @atomicrmw_xchg_i32_monotonic(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI110_0:
 ; CSKY-NEXT:    .long __atomic_exchange_4
-  %1 = atomicrmw xchg i32* %a, i32 %b monotonic
+  %1 = atomicrmw xchg ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_xchg_i32_acquire(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_xchg_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3286,11 +3286,11 @@ define i32 @atomicrmw_xchg_i32_acquire(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI111_0:
 ; CSKY-NEXT:    .long __atomic_exchange_4
-  %1 = atomicrmw xchg i32* %a, i32 %b acquire
+  %1 = atomicrmw xchg ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_xchg_i32_release(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_xchg_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3305,11 +3305,11 @@ define i32 @atomicrmw_xchg_i32_release(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI112_0:
 ; CSKY-NEXT:    .long __atomic_exchange_4
-  %1 = atomicrmw xchg i32* %a, i32 %b release
+  %1 = atomicrmw xchg ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_xchg_i32_acq_rel(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_xchg_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3324,11 +3324,11 @@ define i32 @atomicrmw_xchg_i32_acq_rel(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI113_0:
 ; CSKY-NEXT:    .long __atomic_exchange_4
-  %1 = atomicrmw xchg i32* %a, i32 %b acq_rel
+  %1 = atomicrmw xchg ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_xchg_i32_seq_cst(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_xchg_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3343,11 +3343,11 @@ define i32 @atomicrmw_xchg_i32_seq_cst(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI114_0:
 ; CSKY-NEXT:    .long __atomic_exchange_4
-  %1 = atomicrmw xchg i32* %a, i32 %b seq_cst
+  %1 = atomicrmw xchg ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_add_i32_monotonic(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_add_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3362,11 +3362,11 @@ define i32 @atomicrmw_add_i32_monotonic(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI115_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_4
-  %1 = atomicrmw add i32* %a, i32 %b monotonic
+  %1 = atomicrmw add ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_add_i32_acquire(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_add_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3381,11 +3381,11 @@ define i32 @atomicrmw_add_i32_acquire(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI116_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_4
-  %1 = atomicrmw add i32* %a, i32 %b acquire
+  %1 = atomicrmw add ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_add_i32_release(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_add_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3400,11 +3400,11 @@ define i32 @atomicrmw_add_i32_release(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI117_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_4
-  %1 = atomicrmw add i32* %a, i32 %b release
+  %1 = atomicrmw add ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_add_i32_acq_rel(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_add_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3419,11 +3419,11 @@ define i32 @atomicrmw_add_i32_acq_rel(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI118_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_4
-  %1 = atomicrmw add i32* %a, i32 %b acq_rel
+  %1 = atomicrmw add ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_add_i32_seq_cst(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_add_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3438,11 +3438,11 @@ define i32 @atomicrmw_add_i32_seq_cst(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI119_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_4
-  %1 = atomicrmw add i32* %a, i32 %b seq_cst
+  %1 = atomicrmw add ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_sub_i32_monotonic(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_sub_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3457,11 +3457,11 @@ define i32 @atomicrmw_sub_i32_monotonic(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI120_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_4
-  %1 = atomicrmw sub i32* %a, i32 %b monotonic
+  %1 = atomicrmw sub ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_sub_i32_acquire(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_sub_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3476,11 +3476,11 @@ define i32 @atomicrmw_sub_i32_acquire(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI121_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_4
-  %1 = atomicrmw sub i32* %a, i32 %b acquire
+  %1 = atomicrmw sub ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_sub_i32_release(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_sub_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3495,11 +3495,11 @@ define i32 @atomicrmw_sub_i32_release(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI122_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_4
-  %1 = atomicrmw sub i32* %a, i32 %b release
+  %1 = atomicrmw sub ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_sub_i32_acq_rel(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_sub_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3514,11 +3514,11 @@ define i32 @atomicrmw_sub_i32_acq_rel(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI123_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_4
-  %1 = atomicrmw sub i32* %a, i32 %b acq_rel
+  %1 = atomicrmw sub ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_sub_i32_seq_cst(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_sub_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3533,11 +3533,11 @@ define i32 @atomicrmw_sub_i32_seq_cst(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI124_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_4
-  %1 = atomicrmw sub i32* %a, i32 %b seq_cst
+  %1 = atomicrmw sub ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_and_i32_monotonic(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_and_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3552,11 +3552,11 @@ define i32 @atomicrmw_and_i32_monotonic(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI125_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_4
-  %1 = atomicrmw and i32* %a, i32 %b monotonic
+  %1 = atomicrmw and ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_and_i32_acquire(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_and_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3571,11 +3571,11 @@ define i32 @atomicrmw_and_i32_acquire(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI126_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_4
-  %1 = atomicrmw and i32* %a, i32 %b acquire
+  %1 = atomicrmw and ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_and_i32_release(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_and_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3590,11 +3590,11 @@ define i32 @atomicrmw_and_i32_release(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI127_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_4
-  %1 = atomicrmw and i32* %a, i32 %b release
+  %1 = atomicrmw and ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_and_i32_acq_rel(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_and_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3609,11 +3609,11 @@ define i32 @atomicrmw_and_i32_acq_rel(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI128_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_4
-  %1 = atomicrmw and i32* %a, i32 %b acq_rel
+  %1 = atomicrmw and ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_and_i32_seq_cst(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_and_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3628,11 +3628,11 @@ define i32 @atomicrmw_and_i32_seq_cst(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI129_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_4
-  %1 = atomicrmw and i32* %a, i32 %b seq_cst
+  %1 = atomicrmw and ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_nand_i32_monotonic(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_nand_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3647,11 +3647,11 @@ define i32 @atomicrmw_nand_i32_monotonic(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI130_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_4
-  %1 = atomicrmw nand i32* %a, i32 %b monotonic
+  %1 = atomicrmw nand ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_nand_i32_acquire(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_nand_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3666,11 +3666,11 @@ define i32 @atomicrmw_nand_i32_acquire(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI131_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_4
-  %1 = atomicrmw nand i32* %a, i32 %b acquire
+  %1 = atomicrmw nand ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_nand_i32_release(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_nand_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3685,11 +3685,11 @@ define i32 @atomicrmw_nand_i32_release(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI132_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_4
-  %1 = atomicrmw nand i32* %a, i32 %b release
+  %1 = atomicrmw nand ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_nand_i32_acq_rel(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_nand_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3704,11 +3704,11 @@ define i32 @atomicrmw_nand_i32_acq_rel(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI133_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_4
-  %1 = atomicrmw nand i32* %a, i32 %b acq_rel
+  %1 = atomicrmw nand ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_nand_i32_seq_cst(i32* %a, i32 %b) nounwind {
+define i32 @atomicrmw_nand_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3723,11 +3723,11 @@ define i32 @atomicrmw_nand_i32_seq_cst(i32* %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI134_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_4
-  %1 = atomicrmw nand i32* %a, i32 %b seq_cst
+  %1 = atomicrmw nand ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_or_i32_monotonic(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_or_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3742,11 +3742,11 @@ define i32 @atomicrmw_or_i32_monotonic(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI135_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_4
-  %1 = atomicrmw or i32* %a, i32 %b monotonic
+  %1 = atomicrmw or ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_or_i32_acquire(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_or_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3761,11 +3761,11 @@ define i32 @atomicrmw_or_i32_acquire(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI136_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_4
-  %1 = atomicrmw or i32* %a, i32 %b acquire
+  %1 = atomicrmw or ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_or_i32_release(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_or_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3780,11 +3780,11 @@ define i32 @atomicrmw_or_i32_release(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI137_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_4
-  %1 = atomicrmw or i32* %a, i32 %b release
+  %1 = atomicrmw or ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_or_i32_acq_rel(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_or_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3799,11 +3799,11 @@ define i32 @atomicrmw_or_i32_acq_rel(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI138_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_4
-  %1 = atomicrmw or i32* %a, i32 %b acq_rel
+  %1 = atomicrmw or ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_or_i32_seq_cst(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_or_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3818,11 +3818,11 @@ define i32 @atomicrmw_or_i32_seq_cst(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI139_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_4
-  %1 = atomicrmw or i32* %a, i32 %b seq_cst
+  %1 = atomicrmw or ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_xor_i32_monotonic(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_xor_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3837,11 +3837,11 @@ define i32 @atomicrmw_xor_i32_monotonic(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI140_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_4
-  %1 = atomicrmw xor i32* %a, i32 %b monotonic
+  %1 = atomicrmw xor ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_xor_i32_acquire(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_xor_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3856,11 +3856,11 @@ define i32 @atomicrmw_xor_i32_acquire(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI141_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_4
-  %1 = atomicrmw xor i32* %a, i32 %b acquire
+  %1 = atomicrmw xor ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_xor_i32_release(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_xor_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3875,11 +3875,11 @@ define i32 @atomicrmw_xor_i32_release(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI142_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_4
-  %1 = atomicrmw xor i32* %a, i32 %b release
+  %1 = atomicrmw xor ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_xor_i32_acq_rel(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_xor_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3894,11 +3894,11 @@ define i32 @atomicrmw_xor_i32_acq_rel(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI143_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_4
-  %1 = atomicrmw xor i32* %a, i32 %b acq_rel
+  %1 = atomicrmw xor ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_xor_i32_seq_cst(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_xor_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -3913,11 +3913,11 @@ define i32 @atomicrmw_xor_i32_seq_cst(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI144_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_4
-  %1 = atomicrmw xor i32* %a, i32 %b seq_cst
+  %1 = atomicrmw xor ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_max_i32_monotonic(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_max_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -3957,11 +3957,11 @@ define i32 @atomicrmw_max_i32_monotonic(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI145_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw max i32* %a, i32 %b monotonic
+  %1 = atomicrmw max ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_max_i32_acquire(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_max_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4001,11 +4001,11 @@ define i32 @atomicrmw_max_i32_acquire(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI146_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw max i32* %a, i32 %b acquire
+  %1 = atomicrmw max ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_max_i32_release(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_max_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4045,11 +4045,11 @@ define i32 @atomicrmw_max_i32_release(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI147_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw max i32* %a, i32 %b release
+  %1 = atomicrmw max ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_max_i32_acq_rel(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_max_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4089,11 +4089,11 @@ define i32 @atomicrmw_max_i32_acq_rel(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI148_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw max i32* %a, i32 %b acq_rel
+  %1 = atomicrmw max ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_max_i32_seq_cst(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_max_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4133,11 +4133,11 @@ define i32 @atomicrmw_max_i32_seq_cst(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI149_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw max i32* %a, i32 %b seq_cst
+  %1 = atomicrmw max ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_min_i32_monotonic(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_min_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4177,11 +4177,11 @@ define i32 @atomicrmw_min_i32_monotonic(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI150_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw min i32* %a, i32 %b monotonic
+  %1 = atomicrmw min ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_min_i32_acquire(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_min_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4221,11 +4221,11 @@ define i32 @atomicrmw_min_i32_acquire(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI151_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw min i32* %a, i32 %b acquire
+  %1 = atomicrmw min ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_min_i32_release(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_min_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4265,11 +4265,11 @@ define i32 @atomicrmw_min_i32_release(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI152_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw min i32* %a, i32 %b release
+  %1 = atomicrmw min ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_min_i32_acq_rel(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_min_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4309,11 +4309,11 @@ define i32 @atomicrmw_min_i32_acq_rel(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI153_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw min i32* %a, i32 %b acq_rel
+  %1 = atomicrmw min ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_min_i32_seq_cst(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_min_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4353,11 +4353,11 @@ define i32 @atomicrmw_min_i32_seq_cst(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI154_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw min i32* %a, i32 %b seq_cst
+  %1 = atomicrmw min ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_umax_i32_monotonic(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umax_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4397,11 +4397,11 @@ define i32 @atomicrmw_umax_i32_monotonic(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI155_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umax i32* %a, i32 %b monotonic
+  %1 = atomicrmw umax ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_umax_i32_acquire(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umax_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4441,11 +4441,11 @@ define i32 @atomicrmw_umax_i32_acquire(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI156_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umax i32* %a, i32 %b acquire
+  %1 = atomicrmw umax ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_umax_i32_release(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umax_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4485,11 +4485,11 @@ define i32 @atomicrmw_umax_i32_release(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI157_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umax i32* %a, i32 %b release
+  %1 = atomicrmw umax ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_umax_i32_acq_rel(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umax_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4529,11 +4529,11 @@ define i32 @atomicrmw_umax_i32_acq_rel(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI158_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umax i32* %a, i32 %b acq_rel
+  %1 = atomicrmw umax ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_umax_i32_seq_cst(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umax_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4573,11 +4573,11 @@ define i32 @atomicrmw_umax_i32_seq_cst(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI159_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umax i32* %a, i32 %b seq_cst
+  %1 = atomicrmw umax ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i32 @atomicrmw_umin_i32_monotonic(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umin_i32_monotonic(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i32_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4617,11 +4617,11 @@ define i32 @atomicrmw_umin_i32_monotonic(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI160_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umin i32* %a, i32 %b monotonic
+  %1 = atomicrmw umin ptr %a, i32 %b monotonic
   ret i32 %1
 }
 
-define i32 @atomicrmw_umin_i32_acquire(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umin_i32_acquire(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i32_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4661,11 +4661,11 @@ define i32 @atomicrmw_umin_i32_acquire(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI161_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umin i32* %a, i32 %b acquire
+  %1 = atomicrmw umin ptr %a, i32 %b acquire
   ret i32 %1
 }
 
-define i32 @atomicrmw_umin_i32_release(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umin_i32_release(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i32_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4705,11 +4705,11 @@ define i32 @atomicrmw_umin_i32_release(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI162_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umin i32* %a, i32 %b release
+  %1 = atomicrmw umin ptr %a, i32 %b release
   ret i32 %1
 }
 
-define i32 @atomicrmw_umin_i32_acq_rel(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umin_i32_acq_rel(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i32_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4749,11 +4749,11 @@ define i32 @atomicrmw_umin_i32_acq_rel(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI163_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umin i32* %a, i32 %b acq_rel
+  %1 = atomicrmw umin ptr %a, i32 %b acq_rel
   ret i32 %1
 }
 
-define i32 @atomicrmw_umin_i32_seq_cst(i32 *%a, i32 %b) nounwind {
+define i32 @atomicrmw_umin_i32_seq_cst(ptr %a, i32 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i32_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 16
@@ -4793,11 +4793,11 @@ define i32 @atomicrmw_umin_i32_seq_cst(i32 *%a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI164_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_4
-  %1 = atomicrmw umin i32* %a, i32 %b seq_cst
+  %1 = atomicrmw umin ptr %a, i32 %b seq_cst
   ret i32 %1
 }
 
-define i64 @atomicrmw_xchg_i64_monotonic(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_xchg_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4812,11 +4812,11 @@ define i64 @atomicrmw_xchg_i64_monotonic(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI165_0:
 ; CSKY-NEXT:    .long __atomic_exchange_8
-  %1 = atomicrmw xchg i64* %a, i64 %b monotonic
+  %1 = atomicrmw xchg ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_xchg_i64_acquire(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_xchg_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4831,11 +4831,11 @@ define i64 @atomicrmw_xchg_i64_acquire(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI166_0:
 ; CSKY-NEXT:    .long __atomic_exchange_8
-  %1 = atomicrmw xchg i64* %a, i64 %b acquire
+  %1 = atomicrmw xchg ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_xchg_i64_release(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_xchg_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4850,11 +4850,11 @@ define i64 @atomicrmw_xchg_i64_release(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI167_0:
 ; CSKY-NEXT:    .long __atomic_exchange_8
-  %1 = atomicrmw xchg i64* %a, i64 %b release
+  %1 = atomicrmw xchg ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_xchg_i64_acq_rel(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_xchg_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4869,11 +4869,11 @@ define i64 @atomicrmw_xchg_i64_acq_rel(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI168_0:
 ; CSKY-NEXT:    .long __atomic_exchange_8
-  %1 = atomicrmw xchg i64* %a, i64 %b acq_rel
+  %1 = atomicrmw xchg ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_xchg_i64_seq_cst(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_xchg_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xchg_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4888,11 +4888,11 @@ define i64 @atomicrmw_xchg_i64_seq_cst(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI169_0:
 ; CSKY-NEXT:    .long __atomic_exchange_8
-  %1 = atomicrmw xchg i64* %a, i64 %b seq_cst
+  %1 = atomicrmw xchg ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_add_i64_monotonic(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_add_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4907,11 +4907,11 @@ define i64 @atomicrmw_add_i64_monotonic(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI170_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_8
-  %1 = atomicrmw add i64* %a, i64 %b monotonic
+  %1 = atomicrmw add ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_add_i64_acquire(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_add_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4926,11 +4926,11 @@ define i64 @atomicrmw_add_i64_acquire(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI171_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_8
-  %1 = atomicrmw add i64* %a, i64 %b acquire
+  %1 = atomicrmw add ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_add_i64_release(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_add_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4945,11 +4945,11 @@ define i64 @atomicrmw_add_i64_release(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI172_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_8
-  %1 = atomicrmw add i64* %a, i64 %b release
+  %1 = atomicrmw add ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_add_i64_acq_rel(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_add_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4964,11 +4964,11 @@ define i64 @atomicrmw_add_i64_acq_rel(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI173_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_8
-  %1 = atomicrmw add i64* %a, i64 %b acq_rel
+  %1 = atomicrmw add ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_add_i64_seq_cst(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_add_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_add_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -4983,11 +4983,11 @@ define i64 @atomicrmw_add_i64_seq_cst(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI174_0:
 ; CSKY-NEXT:    .long __atomic_fetch_add_8
-  %1 = atomicrmw add i64* %a, i64 %b seq_cst
+  %1 = atomicrmw add ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_sub_i64_monotonic(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_sub_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5002,11 +5002,11 @@ define i64 @atomicrmw_sub_i64_monotonic(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI175_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_8
-  %1 = atomicrmw sub i64* %a, i64 %b monotonic
+  %1 = atomicrmw sub ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_sub_i64_acquire(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_sub_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5021,11 +5021,11 @@ define i64 @atomicrmw_sub_i64_acquire(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI176_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_8
-  %1 = atomicrmw sub i64* %a, i64 %b acquire
+  %1 = atomicrmw sub ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_sub_i64_release(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_sub_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5040,11 +5040,11 @@ define i64 @atomicrmw_sub_i64_release(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI177_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_8
-  %1 = atomicrmw sub i64* %a, i64 %b release
+  %1 = atomicrmw sub ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_sub_i64_acq_rel(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_sub_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5059,11 +5059,11 @@ define i64 @atomicrmw_sub_i64_acq_rel(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI178_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_8
-  %1 = atomicrmw sub i64* %a, i64 %b acq_rel
+  %1 = atomicrmw sub ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_sub_i64_seq_cst(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_sub_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_sub_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5078,11 +5078,11 @@ define i64 @atomicrmw_sub_i64_seq_cst(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI179_0:
 ; CSKY-NEXT:    .long __atomic_fetch_sub_8
-  %1 = atomicrmw sub i64* %a, i64 %b seq_cst
+  %1 = atomicrmw sub ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_and_i64_monotonic(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_and_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5097,11 +5097,11 @@ define i64 @atomicrmw_and_i64_monotonic(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI180_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_8
-  %1 = atomicrmw and i64* %a, i64 %b monotonic
+  %1 = atomicrmw and ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_and_i64_acquire(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_and_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5116,11 +5116,11 @@ define i64 @atomicrmw_and_i64_acquire(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI181_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_8
-  %1 = atomicrmw and i64* %a, i64 %b acquire
+  %1 = atomicrmw and ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_and_i64_release(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_and_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5135,11 +5135,11 @@ define i64 @atomicrmw_and_i64_release(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI182_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_8
-  %1 = atomicrmw and i64* %a, i64 %b release
+  %1 = atomicrmw and ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_and_i64_acq_rel(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_and_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5154,11 +5154,11 @@ define i64 @atomicrmw_and_i64_acq_rel(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI183_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_8
-  %1 = atomicrmw and i64* %a, i64 %b acq_rel
+  %1 = atomicrmw and ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_and_i64_seq_cst(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_and_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_and_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5173,11 +5173,11 @@ define i64 @atomicrmw_and_i64_seq_cst(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI184_0:
 ; CSKY-NEXT:    .long __atomic_fetch_and_8
-  %1 = atomicrmw and i64* %a, i64 %b seq_cst
+  %1 = atomicrmw and ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_nand_i64_monotonic(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_nand_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5192,11 +5192,11 @@ define i64 @atomicrmw_nand_i64_monotonic(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI185_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_8
-  %1 = atomicrmw nand i64* %a, i64 %b monotonic
+  %1 = atomicrmw nand ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_nand_i64_acquire(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_nand_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5211,11 +5211,11 @@ define i64 @atomicrmw_nand_i64_acquire(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI186_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_8
-  %1 = atomicrmw nand i64* %a, i64 %b acquire
+  %1 = atomicrmw nand ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_nand_i64_release(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_nand_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5230,11 +5230,11 @@ define i64 @atomicrmw_nand_i64_release(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI187_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_8
-  %1 = atomicrmw nand i64* %a, i64 %b release
+  %1 = atomicrmw nand ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_nand_i64_acq_rel(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_nand_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5249,11 +5249,11 @@ define i64 @atomicrmw_nand_i64_acq_rel(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI188_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_8
-  %1 = atomicrmw nand i64* %a, i64 %b acq_rel
+  %1 = atomicrmw nand ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_nand_i64_seq_cst(i64* %a, i64 %b) nounwind {
+define i64 @atomicrmw_nand_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_nand_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5268,11 +5268,11 @@ define i64 @atomicrmw_nand_i64_seq_cst(i64* %a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI189_0:
 ; CSKY-NEXT:    .long __atomic_fetch_nand_8
-  %1 = atomicrmw nand i64* %a, i64 %b seq_cst
+  %1 = atomicrmw nand ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_or_i64_monotonic(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_or_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5287,11 +5287,11 @@ define i64 @atomicrmw_or_i64_monotonic(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI190_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_8
-  %1 = atomicrmw or i64* %a, i64 %b monotonic
+  %1 = atomicrmw or ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_or_i64_acquire(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_or_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5306,11 +5306,11 @@ define i64 @atomicrmw_or_i64_acquire(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI191_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_8
-  %1 = atomicrmw or i64* %a, i64 %b acquire
+  %1 = atomicrmw or ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_or_i64_release(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_or_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5325,11 +5325,11 @@ define i64 @atomicrmw_or_i64_release(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI192_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_8
-  %1 = atomicrmw or i64* %a, i64 %b release
+  %1 = atomicrmw or ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_or_i64_acq_rel(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_or_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5344,11 +5344,11 @@ define i64 @atomicrmw_or_i64_acq_rel(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI193_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_8
-  %1 = atomicrmw or i64* %a, i64 %b acq_rel
+  %1 = atomicrmw or ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_or_i64_seq_cst(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_or_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_or_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5363,11 +5363,11 @@ define i64 @atomicrmw_or_i64_seq_cst(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI194_0:
 ; CSKY-NEXT:    .long __atomic_fetch_or_8
-  %1 = atomicrmw or i64* %a, i64 %b seq_cst
+  %1 = atomicrmw or ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_xor_i64_monotonic(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_xor_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5382,11 +5382,11 @@ define i64 @atomicrmw_xor_i64_monotonic(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI195_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_8
-  %1 = atomicrmw xor i64* %a, i64 %b monotonic
+  %1 = atomicrmw xor ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_xor_i64_acquire(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_xor_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5401,11 +5401,11 @@ define i64 @atomicrmw_xor_i64_acquire(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI196_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_8
-  %1 = atomicrmw xor i64* %a, i64 %b acquire
+  %1 = atomicrmw xor ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_xor_i64_release(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_xor_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5420,11 +5420,11 @@ define i64 @atomicrmw_xor_i64_release(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI197_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_8
-  %1 = atomicrmw xor i64* %a, i64 %b release
+  %1 = atomicrmw xor ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_xor_i64_acq_rel(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_xor_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5439,11 +5439,11 @@ define i64 @atomicrmw_xor_i64_acq_rel(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI198_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_8
-  %1 = atomicrmw xor i64* %a, i64 %b acq_rel
+  %1 = atomicrmw xor ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_xor_i64_seq_cst(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_xor_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_xor_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -5458,11 +5458,11 @@ define i64 @atomicrmw_xor_i64_seq_cst(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI199_0:
 ; CSKY-NEXT:    .long __atomic_fetch_xor_8
-  %1 = atomicrmw xor i64* %a, i64 %b seq_cst
+  %1 = atomicrmw xor ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_max_i64_monotonic(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_max_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -5524,11 +5524,11 @@ define i64 @atomicrmw_max_i64_monotonic(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI200_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw max i64* %a, i64 %b monotonic
+  %1 = atomicrmw max ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_max_i64_acquire(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_max_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -5590,11 +5590,11 @@ define i64 @atomicrmw_max_i64_acquire(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI201_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw max i64* %a, i64 %b acquire
+  %1 = atomicrmw max ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_max_i64_release(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_max_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 24
@@ -5659,11 +5659,11 @@ define i64 @atomicrmw_max_i64_release(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI202_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw max i64* %a, i64 %b release
+  %1 = atomicrmw max ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_max_i64_acq_rel(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_max_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 24
@@ -5728,11 +5728,11 @@ define i64 @atomicrmw_max_i64_acq_rel(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI203_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw max i64* %a, i64 %b acq_rel
+  %1 = atomicrmw max ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_max_i64_seq_cst(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_max_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_max_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -5794,11 +5794,11 @@ define i64 @atomicrmw_max_i64_seq_cst(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI204_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw max i64* %a, i64 %b seq_cst
+  %1 = atomicrmw max ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_min_i64_monotonic(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_min_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -5860,11 +5860,11 @@ define i64 @atomicrmw_min_i64_monotonic(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI205_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw min i64* %a, i64 %b monotonic
+  %1 = atomicrmw min ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_min_i64_acquire(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_min_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -5926,11 +5926,11 @@ define i64 @atomicrmw_min_i64_acquire(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI206_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw min i64* %a, i64 %b acquire
+  %1 = atomicrmw min ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_min_i64_release(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_min_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 24
@@ -5995,11 +5995,11 @@ define i64 @atomicrmw_min_i64_release(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI207_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw min i64* %a, i64 %b release
+  %1 = atomicrmw min ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_min_i64_acq_rel(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_min_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 24
@@ -6064,11 +6064,11 @@ define i64 @atomicrmw_min_i64_acq_rel(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI208_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw min i64* %a, i64 %b acq_rel
+  %1 = atomicrmw min ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_min_i64_seq_cst(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_min_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_min_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -6130,11 +6130,11 @@ define i64 @atomicrmw_min_i64_seq_cst(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI209_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw min i64* %a, i64 %b seq_cst
+  %1 = atomicrmw min ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_umax_i64_monotonic(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umax_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -6192,11 +6192,11 @@ define i64 @atomicrmw_umax_i64_monotonic(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI210_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umax i64* %a, i64 %b monotonic
+  %1 = atomicrmw umax ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_umax_i64_acquire(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umax_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -6254,11 +6254,11 @@ define i64 @atomicrmw_umax_i64_acquire(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI211_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umax i64* %a, i64 %b acquire
+  %1 = atomicrmw umax ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_umax_i64_release(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umax_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 24
@@ -6319,11 +6319,11 @@ define i64 @atomicrmw_umax_i64_release(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI212_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umax i64* %a, i64 %b release
+  %1 = atomicrmw umax ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_umax_i64_acq_rel(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umax_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 24
@@ -6384,11 +6384,11 @@ define i64 @atomicrmw_umax_i64_acq_rel(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI213_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umax i64* %a, i64 %b acq_rel
+  %1 = atomicrmw umax ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_umax_i64_seq_cst(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umax_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umax_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -6446,11 +6446,11 @@ define i64 @atomicrmw_umax_i64_seq_cst(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI214_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umax i64* %a, i64 %b seq_cst
+  %1 = atomicrmw umax ptr %a, i64 %b seq_cst
   ret i64 %1
 }
 
-define i64 @atomicrmw_umin_i64_monotonic(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umin_i64_monotonic(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i64_monotonic:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -6516,11 +6516,11 @@ define i64 @atomicrmw_umin_i64_monotonic(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI215_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umin i64* %a, i64 %b monotonic
+  %1 = atomicrmw umin ptr %a, i64 %b monotonic
   ret i64 %1
 }
 
-define i64 @atomicrmw_umin_i64_acquire(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umin_i64_acquire(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i64_acquire:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -6586,11 +6586,11 @@ define i64 @atomicrmw_umin_i64_acquire(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI216_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umin i64* %a, i64 %b acquire
+  %1 = atomicrmw umin ptr %a, i64 %b acquire
   ret i64 %1
 }
 
-define i64 @atomicrmw_umin_i64_release(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umin_i64_release(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i64_release:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 24
@@ -6659,11 +6659,11 @@ define i64 @atomicrmw_umin_i64_release(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI217_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umin i64* %a, i64 %b release
+  %1 = atomicrmw umin ptr %a, i64 %b release
   ret i64 %1
 }
 
-define i64 @atomicrmw_umin_i64_acq_rel(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umin_i64_acq_rel(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i64_acq_rel:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 24
@@ -6732,11 +6732,11 @@ define i64 @atomicrmw_umin_i64_acq_rel(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI218_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umin i64* %a, i64 %b acq_rel
+  %1 = atomicrmw umin ptr %a, i64 %b acq_rel
   ret i64 %1
 }
 
-define i64 @atomicrmw_umin_i64_seq_cst(i64 *%a, i64 %b) nounwind {
+define i64 @atomicrmw_umin_i64_seq_cst(ptr %a, i64 %b) nounwind {
 ; CSKY-LABEL: atomicrmw_umin_i64_seq_cst:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 20
@@ -6802,6 +6802,6 @@ define i64 @atomicrmw_umin_i64_seq_cst(i64 *%a, i64 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI219_0:
 ; CSKY-NEXT:    .long __atomic_compare_exchange_8
-  %1 = atomicrmw umin i64* %a, i64 %b seq_cst
+  %1 = atomicrmw umin ptr %a, i64 %b seq_cst
   ret i64 %1
 }

diff  --git a/llvm/test/CodeGen/CSKY/call-16bit.ll b/llvm/test/CodeGen/CSKY/call-16bit.ll
index e7f169a9df1209..f30c0285985c3d 100644
--- a/llvm/test/CodeGen/CSKY/call-16bit.ll
+++ b/llvm/test/CodeGen/CSKY/call-16bit.ll
@@ -1,11 +1,11 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky  | FileCheck %s
 
- at p_fun = global void (i32, i32)* @bar, align 8
+ at p_fun = global ptr @bar, align 8
 
 declare void @bar(i32, i32)
 
-define void @foo(i32 %a, i32* %ptr){
+define void @foo(i32 %a, ptr %ptr){
 ; CHECK-LABEL: foo:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    subi16 sp, sp, 4
@@ -28,12 +28,12 @@ define void @foo(i32 %a, i32* %ptr){
 ; CHECK-NEXT:    .long bar
 ;
 entry:
-  %0 = load i32, i32* %ptr
+  %0 = load i32, ptr %ptr
   tail call void (i32, i32) @bar(i32 %a, i32 %0)
   ret void
 }
 
-define void @foo_indirect(i32 %a, i32* %ptr) {
+define void @foo_indirect(i32 %a, ptr %ptr) {
 ; CHECK-LABEL: foo_indirect:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    subi16 sp, sp, 4
@@ -57,8 +57,8 @@ define void @foo_indirect(i32 %a, i32* %ptr) {
 ; CHECK-NEXT:    .long p_fun
 ;
 entry:
-  %0 = load void (i32, i32)*, void (i32, i32)** @p_fun, align 8
-  %1 = load i32, i32* %ptr
+  %0 = load ptr, ptr @p_fun, align 8
+  %1 = load i32, ptr %ptr
   tail call void (i32, i32) %0(i32 %a, i32 %1)
   ret void
 }

diff  --git a/llvm/test/CodeGen/CSKY/call.ll b/llvm/test/CodeGen/CSKY/call.ll
index 8804756802fc92..c6621c9da964ee 100644
--- a/llvm/test/CodeGen/CSKY/call.ll
+++ b/llvm/test/CodeGen/CSKY/call.ll
@@ -3,11 +3,11 @@
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky -relocation-model=pic -code-model=small -mattr=+2e3 | FileCheck %s --check-prefix=CHECK-PIC-SMALL
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky -relocation-model=pic -code-model=large -mattr=+2e3 | FileCheck %s --check-prefix=CHECK-PIC-LARGE
 
- at p_fun = global void (i32, i32)* @bar, align 8
+ at p_fun = global ptr @bar, align 8
 
 declare void @bar(i32, i32)
 
-define void @foo(i32 %a, i32* %ptr){
+define void @foo(i32 %a, ptr %ptr){
 ; CHECK-LABEL: foo:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    subi16 sp, sp, 4
@@ -63,12 +63,12 @@ define void @foo(i32 %a, i32* %ptr){
 ; CHECK-PIC-NEXT:    ld32.w a1, a1, 0
 ; CHECK-PIC-NEXT:    br32 bar
 entry:
-  %0 = load i32, i32* %ptr
+  %0 = load i32, ptr %ptr
   tail call void (i32, i32) @bar(i32 %a, i32 %0)
   ret void
 }
 
-define void @foo_indirect(i32 %a, i32* %ptr) {
+define void @foo_indirect(i32 %a, ptr %ptr) {
 ; CHECK-LABEL: foo_indirect:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    subi16 sp, sp, 4
@@ -132,8 +132,8 @@ define void @foo_indirect(i32 %a, i32* %ptr) {
 ; CHECK-PIC-NEXT:    ld32.w a1, a1, 0
 ; CHECK-PIC-NEXT:    jmp32 a2
 entry:
-  %0 = load void (i32, i32)*, void (i32, i32)** @p_fun, align 8
-  %1 = load i32, i32* %ptr
+  %0 = load ptr, ptr @p_fun, align 8
+  %1 = load i32, ptr %ptr
   tail call void (i32, i32) %0(i32 %a, i32 %1)
   ret void
 }

diff  --git a/llvm/test/CodeGen/CSKY/constantpool.ll b/llvm/test/CodeGen/CSKY/constantpool.ll
index d7741f2e1a1bbe..b333968e9a438f 100644
--- a/llvm/test/CodeGen/CSKY/constantpool.ll
+++ b/llvm/test/CodeGen/CSKY/constantpool.ll
@@ -4,7 +4,7 @@
 
 declare i32 @llvm.cttz.i32(i32, i1)
 
-define void @cttztest(i32 %C, i32* %CP) {
+define void @cttztest(i32 %C, ptr %CP) {
 ; GENERIC-LABEL: cttztest:
 ; GENERIC:       # %bb.0:
 ; GENERIC-NEXT:    .cfi_def_cfa_offset 0
@@ -39,6 +39,6 @@ define void @cttztest(i32 %C, i32* %CP) {
 ; GENERIC-NEXT:  .LCPI0_0:
 ; GENERIC-NEXT:    .ascii "\000\001\034\002\035\016\030\003\036\026\024\017\031\021\004\b\037\033\r\027\025\023\020\007\032\f\022\006\013\005\n\t"
 	%c = call i32 @llvm.cttz.i32( i32 %C, i1 true )
-	store i32 %c, i32* %CP
+	store i32 %c, ptr %CP
 	ret void
 }

diff  --git a/llvm/test/CodeGen/CSKY/dwarf-eh.ll b/llvm/test/CodeGen/CSKY/dwarf-eh.ll
index 706db07c3036ce..c38b894d53a1be 100644
--- a/llvm/test/CodeGen/CSKY/dwarf-eh.ll
+++ b/llvm/test/CodeGen/CSKY/dwarf-eh.ll
@@ -12,7 +12,7 @@ declare void @throw_exception()
 
 declare i32 @__gxx_personality_v0(...)
 
-declare i8* @__cxa_begin_catch(i8*)
+declare ptr @__cxa_begin_catch(ptr)
 
 declare void @__cxa_end_catch()
 
@@ -22,7 +22,7 @@ declare void @__cxa_end_catch()
 ; LSDAEncoding = DW_EH_PE_pcrel | DW_EH_PE_sdata4
 ; CHECK-NEXT:	.cfi_lsda 27, .Lexception0
 
-define void @test1() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define void @test1() personality ptr @__gxx_personality_v0 {
 ; SMALL:       # %bb.0: # %entry
 ; SMALL-NEXT:    subi16 sp, sp, 4
 ; SMALL-NEXT:    .cfi_def_cfa_offset 4
@@ -162,10 +162,10 @@ entry:
   invoke void @throw_exception() to label %try.cont unwind label %lpad
 
 lpad:
-  %0 = landingpad { i8*, i32 }
-          catch i8* null
-  %1 = extractvalue { i8*, i32 } %0, 0
-  %2 = tail call i8* @__cxa_begin_catch(i8* %1)
+  %0 = landingpad { ptr, i32 }
+          catch ptr null
+  %1 = extractvalue { ptr, i32 } %0, 0
+  %2 = tail call ptr @__cxa_begin_catch(ptr %1)
   tail call void @__cxa_end_catch()
   br label %try.cont
 

diff  --git a/llvm/test/CodeGen/CSKY/fpu/ldst-d.ll b/llvm/test/CodeGen/CSKY/fpu/ldst-d.ll
index e31fd409d27750..612cecb2b4d7a5 100644
--- a/llvm/test/CodeGen/CSKY/fpu/ldst-d.ll
+++ b/llvm/test/CodeGen/CSKY/fpu/ldst-d.ll
@@ -3,7 +3,7 @@
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky -float-abi=hard -mattr=+hard-float -mattr=+2e3 -mattr=+fpuv2_sf -mattr=+fpuv2_df | FileCheck %s --check-prefix=CHECK-DF
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky -float-abi=hard -mattr=+hard-float -mattr=+2e3 -mattr=+fpuv3_sf -mattr=+fpuv3_df | FileCheck %s --check-prefix=CHECK-DF2
 
-define double @load_I_d(double* nocapture readonly %a) local_unnamed_addr #0 {
+define double @load_I_d(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ;
 ;
 ; CHECK-DF-LABEL: load_I_d:
@@ -16,14 +16,14 @@ define double @load_I_d(double* nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-DF2-NEXT:    fld.64 vr0, (a0, 24)
 ; CHECK-DF2-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds double, double* %a, i64 3
-  %0 = load double, double* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds double, ptr %a, i64 3
+  %0 = load double, ptr %arrayidx, align 4
   ret double %0
 }
 
 
 
-define double @load_R_d(double* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define double @load_R_d(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ;
 ;
 ; CHECK-DF-LABEL: load_R_d:
@@ -37,12 +37,12 @@ define double @load_R_d(double* nocapture readonly %a, i32 %b) local_unnamed_add
 ; CHECK-DF2-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds double, double* %a, i64 %idxprom
-  %0 = load double, double* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds double, ptr %a, i64 %idxprom
+  %0 = load double, ptr %arrayidx, align 4
   ret double %0
 }
 
-define double @store_I_d(double*  %a, double %b) local_unnamed_addr #0 {
+define double @store_I_d(ptr  %a, double %b) local_unnamed_addr #0 {
 ;
 ;
 ; CHECK-DF-LABEL: store_I_d:
@@ -68,12 +68,12 @@ define double @store_I_d(double*  %a, double %b) local_unnamed_addr #0 {
 ; CHECK-DF2-NEXT:  .LCPI2_0:
 ; CHECK-DF2-NEXT:    .quad 0x0000000000000000 # double 0
 entry:
-  %arrayidx = getelementptr inbounds double, double* %a, i64 3
-  store double %b, double* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds double, ptr %a, i64 3
+  store double %b, ptr %arrayidx, align 4
   ret double 0.0
 }
 
-define double @store_R_d(double*  %a, i32 %b, double %c) local_unnamed_addr #0 {
+define double @store_R_d(ptr  %a, i32 %b, double %c) local_unnamed_addr #0 {
 ;
 ;
 ; CHECK-DF-LABEL: store_R_d:
@@ -100,7 +100,7 @@ define double @store_R_d(double*  %a, i32 %b, double %c) local_unnamed_addr #0 {
 ; CHECK-DF2-NEXT:    .quad 0x0000000000000000 # double 0
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds double, double* %a, i64 %idxprom
-  store double %c, double* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds double, ptr %a, i64 %idxprom
+  store double %c, ptr %arrayidx, align 4
   ret double 0.0
 }

diff  --git a/llvm/test/CodeGen/CSKY/fpu/ldst-f.ll b/llvm/test/CodeGen/CSKY/fpu/ldst-f.ll
index bbcde8e6430a9d..e22541fb37989b 100644
--- a/llvm/test/CodeGen/CSKY/fpu/ldst-f.ll
+++ b/llvm/test/CodeGen/CSKY/fpu/ldst-f.ll
@@ -3,7 +3,7 @@
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky -float-abi=hard -mattr=+hard-float -mattr=+2e3 -mattr=+fpuv2_sf | FileCheck %s --check-prefix=CHECK-SF
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky -float-abi=hard -mattr=+hard-float -mattr=+2e3 -mattr=+fpuv3_sf | FileCheck %s --check-prefix=CHECK-SF2
 
-define float @load_I_w(float* nocapture readonly %a) local_unnamed_addr #0 {
+define float @load_I_w(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ;
 ; CHECK-SF-LABEL: load_I_w:
 ; CHECK-SF:       # %bb.0: # %entry
@@ -15,12 +15,12 @@ define float @load_I_w(float* nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-SF2-NEXT:    fld.32 vr0, (a0, 12)
 ; CHECK-SF2-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds float, float* %a, i64 3
-  %0 = load float, float* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds float, ptr %a, i64 3
+  %0 = load float, ptr %arrayidx, align 4
   ret float %0
 }
 
-define float @load_R_w(float* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define float @load_R_w(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ;
 ; CHECK-SF-LABEL: load_R_w:
 ; CHECK-SF:       # %bb.0: # %entry
@@ -33,13 +33,13 @@ define float @load_R_w(float* nocapture readonly %a, i32 %b) local_unnamed_addr
 ; CHECK-SF2-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds float, float* %a, i64 %idxprom
-  %0 = load float, float* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds float, ptr %a, i64 %idxprom
+  %0 = load float, ptr %arrayidx, align 4
   ret float %0
 }
 
 
-define float @store_I_w(float*  %a, float %b) local_unnamed_addr #0 {
+define float @store_I_w(ptr  %a, float %b) local_unnamed_addr #0 {
 ;
 ; CHECK-SF-LABEL: store_I_w:
 ; CHECK-SF:       # %bb.0: # %entry
@@ -55,12 +55,12 @@ define float @store_I_w(float*  %a, float %b) local_unnamed_addr #0 {
 ; CHECK-SF2-NEXT:    fmtvr.32.1 vr0, a0
 ; CHECK-SF2-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds float, float* %a, i64 3
-  store float %b, float* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds float, ptr %a, i64 3
+  store float %b, ptr %arrayidx, align 4
   ret float 0.0
 }
 
-define float @store_R_w(float*  %a, i32 %b, float %c) local_unnamed_addr #0 {
+define float @store_R_w(ptr  %a, i32 %b, float %c) local_unnamed_addr #0 {
 ;
 ; CHECK-SF-LABEL: store_R_w:
 ; CHECK-SF:       # %bb.0: # %entry
@@ -77,7 +77,7 @@ define float @store_R_w(float*  %a, i32 %b, float %c) local_unnamed_addr #0 {
 ; CHECK-SF2-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds float, float* %a, i64 %idxprom
-  store float %c, float* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds float, ptr %a, i64 %idxprom
+  store float %c, ptr %arrayidx, align 4
   ret float 0.0
 }

diff  --git a/llvm/test/CodeGen/CSKY/frameaddr-returnaddr.ll b/llvm/test/CodeGen/CSKY/frameaddr-returnaddr.ll
index e8878cfa325471..1718bbb3a68bb6 100644
--- a/llvm/test/CodeGen/CSKY/frameaddr-returnaddr.ll
+++ b/llvm/test/CodeGen/CSKY/frameaddr-returnaddr.ll
@@ -2,11 +2,11 @@
 ; RUN: llc -mtriple=csky -verify-machineinstrs -csky-no-aliases -mattr=+2e3 < %s \
 ; RUN:   | FileCheck %s
 
-declare void @notdead(i8*)
-declare i8* @llvm.frameaddress(i32)
-declare i8* @llvm.returnaddress(i32)
+declare void @notdead(ptr)
+declare ptr @llvm.frameaddress(i32)
+declare ptr @llvm.returnaddress(i32)
 
-define i8* @test_frameaddress_0() nounwind {
+define ptr @test_frameaddress_0() nounwind {
 ; CHECK-LABEL: test_frameaddress_0:
 ; CHECK:       # %bb.0:
 ; CHECK-NEXT:    subi16 sp, sp, 4
@@ -17,11 +17,11 @@ define i8* @test_frameaddress_0() nounwind {
 ; CHECK-NEXT:    ld32.w l4, (sp, 0) # 4-byte Folded Reload
 ; CHECK-NEXT:    addi16 sp, sp, 4
 ; CHECK-NEXT:    rts16
-  %1 = call i8* @llvm.frameaddress(i32 0)
-  ret i8* %1
+  %1 = call ptr @llvm.frameaddress(i32 0)
+  ret ptr %1
 }
 
-define i8* @test_frameaddress_2() nounwind {
+define ptr @test_frameaddress_2() nounwind {
 ; CHECK-LABEL: test_frameaddress_2:
 ; CHECK:       # %bb.0:
 ; CHECK-NEXT:    subi16 sp, sp, 4
@@ -33,11 +33,11 @@ define i8* @test_frameaddress_2() nounwind {
 ; CHECK-NEXT:    ld32.w l4, (sp, 0) # 4-byte Folded Reload
 ; CHECK-NEXT:    addi16 sp, sp, 4
 ; CHECK-NEXT:    rts16
-  %1 = call i8* @llvm.frameaddress(i32 2)
-  ret i8* %1
+  %1 = call ptr @llvm.frameaddress(i32 2)
+  ret ptr %1
 }
 
-define i8* @test_frameaddress_3_alloca() nounwind {
+define ptr @test_frameaddress_3_alloca() nounwind {
 ; CHECK-LABEL: test_frameaddress_3_alloca:
 ; CHECK:       # %bb.0:
 ; CHECK-NEXT:    subi16 sp, sp, 8
@@ -57,22 +57,22 @@ define i8* @test_frameaddress_3_alloca() nounwind {
 ; CHECK-NEXT:    addi16 sp, sp, 8
 ; CHECK-NEXT:    rts16
   %1 = alloca [100 x i8]
-  %2 = bitcast [100 x i8]* %1 to i8*
-  call void @notdead(i8* %2)
-  %3 = call i8* @llvm.frameaddress(i32 3)
-  ret i8* %3
+  %2 = bitcast ptr %1 to ptr
+  call void @notdead(ptr %2)
+  %3 = call ptr @llvm.frameaddress(i32 3)
+  ret ptr %3
 }
 
-define i8* @test_returnaddress_0() nounwind {
+define ptr @test_returnaddress_0() nounwind {
 ; CHECK-LABEL: test_returnaddress_0:
 ; CHECK:       # %bb.0:
 ; CHECK-NEXT:    mov16 a0, lr
 ; CHECK-NEXT:    rts16
-  %1 = call i8* @llvm.returnaddress(i32 0)
-  ret i8* %1
+  %1 = call ptr @llvm.returnaddress(i32 0)
+  ret ptr %1
 }
 
-define i8* @test_returnaddress_2() nounwind {
+define ptr @test_returnaddress_2() nounwind {
 ; CHECK-LABEL: test_returnaddress_2:
 ; CHECK:       # %bb.0:
 ; CHECK-NEXT:    subi16 sp, sp, 4
@@ -85,6 +85,6 @@ define i8* @test_returnaddress_2() nounwind {
 ; CHECK-NEXT:    ld32.w l4, (sp, 0) # 4-byte Folded Reload
 ; CHECK-NEXT:    addi16 sp, sp, 4
 ; CHECK-NEXT:    rts16
-  %1 = call i8* @llvm.returnaddress(i32 2)
-  ret i8* %1
+  %1 = call ptr @llvm.returnaddress(i32 2)
+  ret ptr %1
 }

diff  --git a/llvm/test/CodeGen/CSKY/indirectbr.ll b/llvm/test/CodeGen/CSKY/indirectbr.ll
index 431d3201dc8955..71a30fb597c371 100644
--- a/llvm/test/CodeGen/CSKY/indirectbr.ll
+++ b/llvm/test/CodeGen/CSKY/indirectbr.ll
@@ -3,7 +3,7 @@
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky -relocation-model=pic -code-model=small -mattr=+2e3 | FileCheck %s --check-prefix=CHECK-PIC-SMALL
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky -relocation-model=pic -code-model=large -mattr=+2e3 | FileCheck %s --check-prefix=CHECK-PIC-LARGE
 
- at f.a = private unnamed_addr constant [2 x i8*] [i8* blockaddress(@f, %return), i8* blockaddress(@f, %l2)], align 16
+ at f.a = private unnamed_addr constant [2 x ptr] [ptr blockaddress(@f, %return), ptr blockaddress(@f, %l2)], align 16
 
 define i32 @f(i32 %x) #0 {
 ; CHECK-LABEL: f:
@@ -88,9 +88,9 @@ define i32 @f(i32 %x) #0 {
 ; CHECK-PIC-LARGE-NEXT:    .long .Lf.a at GOTOFF
 entry:
   %idxprom = sext i32 %x to i64
-  %arrayidx = getelementptr inbounds [2 x i8*], [2 x i8*]* @f.a, i64 0, i64 %idxprom
-  %0 = load i8*, i8** %arrayidx, align 8
-  indirectbr i8* %0, [label %return, label %l2]
+  %arrayidx = getelementptr inbounds [2 x ptr], ptr @f.a, i64 0, i64 %idxprom
+  %0 = load ptr, ptr %arrayidx, align 8
+  indirectbr ptr %0, [label %return, label %l2]
 
 l2:                                               ; preds = %entry
   br label %return

diff  --git a/llvm/test/CodeGen/CSKY/inline-asm-d-constraint-f.ll b/llvm/test/CodeGen/CSKY/inline-asm-d-constraint-f.ll
index 09efc7cf804c57..313c8db610921a 100644
--- a/llvm/test/CodeGen/CSKY/inline-asm-d-constraint-f.ll
+++ b/llvm/test/CodeGen/CSKY/inline-asm-d-constraint-f.ll
@@ -21,7 +21,7 @@ define double @constraint_f_double(double %a) nounwind {
 ; CSKYF-NEXT:  .LCPI0_0:
 ; CSKYF-NEXT:    .long gd
 
-  %1 = load double, double* @gd
+  %1 = load double, ptr @gd
   %2 = tail call double asm "faddd $0, $1, $2", "=v,v,v"(double %a, double %1)
   ret double %2
 }
@@ -45,7 +45,7 @@ define double @constraint_f_double_abi_name(double %a) nounwind {
 ; CSKYF-NEXT:  .LCPI1_0:
 ; CSKYF-NEXT:    .long gd
 
-  %1 = load double, double* @gd
+  %1 = load double, ptr @gd
   %2 = tail call double asm "faddd $0, $1, $2", "={fr1},{fr2},{fr3}"(double %a, double %1)
   ret double %2
 }

diff  --git a/llvm/test/CodeGen/CSKY/inline-asm-f-constraint-f.ll b/llvm/test/CodeGen/CSKY/inline-asm-f-constraint-f.ll
index cf97a8477bd4eb..d6d5b9b2489cb8 100644
--- a/llvm/test/CodeGen/CSKY/inline-asm-f-constraint-f.ll
+++ b/llvm/test/CodeGen/CSKY/inline-asm-f-constraint-f.ll
@@ -20,7 +20,7 @@ define float @constraint_f_float(float %a) nounwind {
 ; CSKYF-NEXT:    .p2align 2
 ; CSKYF-NEXT:  .LCPI0_0:
 ; CSKYF-NEXT:    .long gf
-  %1 = load float, float* @gf
+  %1 = load float, ptr @gf
   %2 = tail call float asm "fadds $0, $1, $2", "=v,v,v"(float %a, float %1)
   ret float %2
 }
@@ -43,7 +43,7 @@ define float @constraint_f_float_abi_name(float %a) nounwind {
 ; CSKYF-NEXT:  .LCPI1_0:
 ; CSKYF-NEXT:    .long gf
 
-  %1 = load float, float* @gf
+  %1 = load float, ptr @gf
   %2 = tail call float asm "fadds $0, $1, $2", "={fr0},{fr1},{fr2}"(float %a, float %1)
   ret float %2
 }

diff  --git a/llvm/test/CodeGen/CSKY/inline-asm.ll b/llvm/test/CodeGen/CSKY/inline-asm.ll
index 4e7cb8e98e7482..b955e43ce30d5d 100644
--- a/llvm/test/CodeGen/CSKY/inline-asm.ll
+++ b/llvm/test/CodeGen/CSKY/inline-asm.ll
@@ -21,7 +21,7 @@ define i32 @constraint_r(i32 %a) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI0_0:
 ; CSKY-NEXT:    .long gi
-  %1 = load i32, i32* @gi
+  %1 = load i32, ptr @gi
   %2 = tail call i32 asm "add $0, $1, $2", "=r,r,r"(i32 %a, i32 %1)
   ret i32 %2
 }
@@ -45,7 +45,7 @@ define i64 @constraint_r_i64(i32 %a) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI1_0:
 ; CSKY-NEXT:    .long mi
-  %1 = load i64, i64* @mi
+  %1 = load i64, ptr @mi
   %2 = call i64 asm "mula.s32 $0, $1, $2", "=r,r,r,0"(i32 %a, i32 %a, i64 %1)
   ret i64 %2
 }
@@ -66,7 +66,7 @@ define i32 @constraint_a(i32 %a) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI2_0:
 ; CSKY-NEXT:    .long gi
-  %1 = load i32, i32* @gi
+  %1 = load i32, ptr @gi
   %2 = tail call i32 asm "add $0, $1, $2", "=a,a,a"(i32 %a, i32 %1)
   ret i32 %2
 }
@@ -87,7 +87,7 @@ define i32 @constraint_b(i32 %a) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI3_0:
 ; CSKY-NEXT:    .long gi
-  %1 = load i32, i32* @gi
+  %1 = load i32, ptr @gi
   %2 = tail call i32 asm "add $0, $1, $2", "=b,b,b"(i32 %a, i32 %1)
   ret i32 %2
 }
@@ -109,7 +109,7 @@ define i32 @constraint_z(i32 %a) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI4_0:
 ; CSKY-NEXT:    .long gi
-  %1 = load i32, i32* @gi
+  %1 = load i32, ptr @gi
   %2 = tail call i32 asm "add $0, $1, $2", "=r,z,r"(i32 %a, i32 %1)
   ret i32 %2
 }
@@ -130,7 +130,7 @@ define i32 @constraint_c(i32 %a, i32 %b) nounwind {
 ; CSKY-NEXT:    .p2align 2
 ; CSKY-NEXT:  .LCPI5_0:
 ; CSKY-NEXT:    .long gi
-  %1 = load i32, i32* @gi
+  %1 = load i32, ptr @gi
   %2 = tail call i32 asm "addc $0, $1, $2", "=r,r,r,~{c}"(i32 %a, i32 %1)
   ret i32 %2
 }
@@ -145,12 +145,12 @@ define i32 @constraint_i(i32 %a) nounwind {
 ; CSKY-NEXT:    addi16 sp, sp, 4
 ; CSKY-NEXT:    rts16
 
-  %1 = load i32, i32* @gi
+  %1 = load i32, ptr @gi
   %2 = tail call i32 asm "addi $0, $1, $2", "=r,r,i"(i32 %a, i32 113)
   ret i32 %2
 }
 
-define void @constraint_m(i32* %a) nounwind {
+define void @constraint_m(ptr %a) nounwind {
 ; CSKY-LABEL: constraint_m:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -159,11 +159,11 @@ define void @constraint_m(i32* %a) nounwind {
 ; CSKY-NEXT:    addi16 sp, sp, 4
 ; CSKY-NEXT:    rts16
 
-  call void asm sideeffect "", "=*m"(i32* elementtype(i32) %a)
+  call void asm sideeffect "", "=*m"(ptr elementtype(i32) %a)
   ret void
 }
 
-define i32 @constraint_m2(i32* %a) nounwind {
+define i32 @constraint_m2(ptr %a) nounwind {
 ; CSKY-LABEL: constraint_m2:
 ; CSKY:       # %bb.0:
 ; CSKY-NEXT:    subi16 sp, sp, 4
@@ -173,7 +173,7 @@ define i32 @constraint_m2(i32* %a) nounwind {
 ; CSKY-NEXT:    addi16 sp, sp, 4
 ; CSKY-NEXT:    rts16
 
-  %1 = tail call i32 asm "ld.w $0, $1", "=r,*m"(i32* elementtype(i32) %a)
+  %1 = tail call i32 asm "ld.w $0, $1", "=r,*m"(ptr elementtype(i32) %a)
   ret i32 %1
 }
 
@@ -200,7 +200,7 @@ define void @operand_global() nounwind {
 ; CSKY-NEXT:    addi16 sp, sp, 4
 ; CSKY-NEXT:    rts16
 
-  tail call void asm sideeffect ".4byte $0", "i"(i32* @gi)
+  tail call void asm sideeffect ".4byte $0", "i"(ptr @gi)
   ret void
 }
 
@@ -216,7 +216,7 @@ define void @operand_block_address() nounwind {
 ; CSKY-NEXT:    addi16 sp, sp, 4
 ; CSKY-NEXT:    rts16
 
-  call void asm sideeffect "br32 $0", "i"(i8* blockaddress(@operand_block_address, %bb))
+  call void asm sideeffect "br32 $0", "i"(ptr blockaddress(@operand_block_address, %bb))
   br label %bb
 bb:
   ret void

diff  --git a/llvm/test/CodeGen/CSKY/ldst-i.ll b/llvm/test/CodeGen/CSKY/ldst-i.ll
index 06cfc9bde655f9..c8f2683f0c330b 100644
--- a/llvm/test/CodeGen/CSKY/ldst-i.ll
+++ b/llvm/test/CodeGen/CSKY/ldst-i.ll
@@ -2,7 +2,7 @@
 ; RUN: llc -verify-machineinstrs -csky-no-aliases -mattr=+2e3 < %s -mtriple=csky | FileCheck %s
 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky  | FileCheck %s --check-prefix=GENERIC
 
-define signext i1 @load_I_bits(i1* nocapture readonly %a) local_unnamed_addr #0 {
+define signext i1 @load_I_bits(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_I_bits:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ld16.b a0, (a0, 3)
@@ -20,12 +20,12 @@ define signext i1 @load_I_bits(i1* nocapture readonly %a) local_unnamed_addr #0
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i1, i1* %a, i64 3
-  %0 = load i1, i1* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i1, ptr %a, i64 3
+  %0 = load i1, ptr %arrayidx, align 1
   ret i1 %0
 }
 
-define zeroext i1 @load_I_bit_(i1* nocapture readonly %a) local_unnamed_addr #0 {
+define zeroext i1 @load_I_bit_(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_I_bit_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ld16.b a0, (a0, 3)
@@ -40,12 +40,12 @@ define zeroext i1 @load_I_bit_(i1* nocapture readonly %a) local_unnamed_addr #0
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i1, i1* %a, i64 3
-  %0 = load i1, i1* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i1, ptr %a, i64 3
+  %0 = load i1, ptr %arrayidx, align 1
   ret i1 %0
 }
 
-define signext i8 @load_I_bs(i8* nocapture readonly %a) local_unnamed_addr #0 {
+define signext i8 @load_I_bs(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_I_bs:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ld32.bs a0, (a0, 3)
@@ -61,12 +61,12 @@ define signext i8 @load_I_bs(i8* nocapture readonly %a) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i8, i8* %a, i64 3
-  %0 = load i8, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %a, i64 3
+  %0 = load i8, ptr %arrayidx, align 1
   ret i8 %0
 }
 
-define zeroext i8 @load_I_b_(i8* nocapture readonly %a) local_unnamed_addr #0 {
+define zeroext i8 @load_I_b_(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_I_b_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ld16.b a0, (a0, 3)
@@ -81,12 +81,12 @@ define zeroext i8 @load_I_b_(i8* nocapture readonly %a) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i8, i8* %a, i64 3
-  %0 = load i8, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %a, i64 3
+  %0 = load i8, ptr %arrayidx, align 1
   ret i8 %0
 }
 
-define signext i16 @load_I_hs(i16* nocapture readonly %a) local_unnamed_addr #0 {
+define signext i16 @load_I_hs(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_I_hs:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ld32.hs a0, (a0, 6)
@@ -102,12 +102,12 @@ define signext i16 @load_I_hs(i16* nocapture readonly %a) local_unnamed_addr #0
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i16, i16* %a, i64 3
-  %0 = load i16, i16* %arrayidx, align 2
+  %arrayidx = getelementptr inbounds i16, ptr %a, i64 3
+  %0 = load i16, ptr %arrayidx, align 2
   ret i16 %0
 }
 
-define zeroext i16 @load_I_h_(i16* nocapture readonly %a) local_unnamed_addr #0 {
+define zeroext i16 @load_I_h_(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_I_h_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ld16.h a0, (a0, 6)
@@ -122,12 +122,12 @@ define zeroext i16 @load_I_h_(i16* nocapture readonly %a) local_unnamed_addr #0
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i16, i16* %a, i64 3
-  %0 = load i16, i16* %arrayidx, align 2
+  %arrayidx = getelementptr inbounds i16, ptr %a, i64 3
+  %0 = load i16, ptr %arrayidx, align 2
   ret i16 %0
 }
 
-define i32 @load_I_w(i32* nocapture readonly %a) local_unnamed_addr #0 {
+define i32 @load_I_w(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_I_w:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ld16.w a0, (a0, 12)
@@ -142,12 +142,12 @@ define i32 @load_I_w(i32* nocapture readonly %a) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i32, i32* %a, i64 3
-  %0 = load i32, i32* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds i32, ptr %a, i64 3
+  %0 = load i32, ptr %arrayidx, align 4
   ret i32 %0
 }
 
-define i64 @load_I_d(i64* nocapture readonly %a) local_unnamed_addr #0 {
+define i64 @load_I_d(ptr nocapture readonly %a) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_I_d:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ld16.w a2, (a0, 24)
@@ -166,12 +166,12 @@ define i64 @load_I_d(i64* nocapture readonly %a) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i64, i64* %a, i64 3
-  %0 = load i64, i64* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds i64, ptr %a, i64 3
+  %0 = load i64, ptr %arrayidx, align 4
   ret i64 %0
 }
 
-define i8 @load_I_i8_anyext(i8* %p) {
+define i8 @load_I_i8_anyext(ptr %p) {
 ; CHECK-LABEL: load_I_i8_anyext:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ld16.b a0, (a0, 0)
@@ -186,11 +186,11 @@ define i8 @load_I_i8_anyext(i8* %p) {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %ret = load i8, i8* %p, align 1
+  %ret = load i8, ptr %p, align 1
   ret i8 %ret
 }
 
-define signext i1 @load_R_bits(i1* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define signext i1 @load_R_bits(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_R_bits:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ldr32.bs a0, (a0, a1 << 0)
@@ -210,12 +210,12 @@ define signext i1 @load_R_bits(i1* nocapture readonly %a, i32 %b) local_unnamed_
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i1, i1* %a, i64 %idxprom
-  %0 = load i1, i1* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i1, ptr %a, i64 %idxprom
+  %0 = load i1, ptr %arrayidx, align 1
   ret i1 %0
 }
 
-define zeroext i1 @load_R_bit_(i1* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define zeroext i1 @load_R_bit_(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_R_bit_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ldr32.b a0, (a0, a1 << 0)
@@ -232,13 +232,13 @@ define zeroext i1 @load_R_bit_(i1* nocapture readonly %a, i32 %b) local_unnamed_
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i1, i1* %a, i64 %idxprom
-  %0 = load i1, i1* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i1, ptr %a, i64 %idxprom
+  %0 = load i1, ptr %arrayidx, align 1
   ret i1 %0
 }
 
 
-define signext i8 @load_R_bs(i8* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define signext i8 @load_R_bs(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_R_bs:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ldr32.bs a0, (a0, a1 << 0)
@@ -256,12 +256,12 @@ define signext i8 @load_R_bs(i8* nocapture readonly %a, i32 %b) local_unnamed_ad
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i8, i8* %a, i64 %idxprom
-  %0 = load i8, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %a, i64 %idxprom
+  %0 = load i8, ptr %arrayidx, align 1
   ret i8 %0
 }
 
-define zeroext i8 @load_R_b_(i8* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define zeroext i8 @load_R_b_(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_R_b_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ldr32.b a0, (a0, a1 << 0)
@@ -278,12 +278,12 @@ define zeroext i8 @load_R_b_(i8* nocapture readonly %a, i32 %b) local_unnamed_ad
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i8, i8* %a, i64 %idxprom
-  %0 = load i8, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %a, i64 %idxprom
+  %0 = load i8, ptr %arrayidx, align 1
   ret i8 %0
 }
 
-define signext i16 @load_R_hs(i16* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define signext i16 @load_R_hs(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_R_hs:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ldr32.hs a0, (a0, a1 << 1)
@@ -302,12 +302,12 @@ define signext i16 @load_R_hs(i16* nocapture readonly %a, i32 %b) local_unnamed_
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i16, i16* %a, i64 %idxprom
-  %0 = load i16, i16* %arrayidx, align 2
+  %arrayidx = getelementptr inbounds i16, ptr %a, i64 %idxprom
+  %0 = load i16, ptr %arrayidx, align 2
   ret i16 %0
 }
 
-define zeroext i16 @load_R_h_(i16* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define zeroext i16 @load_R_h_(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_R_h_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ldr32.h a0, (a0, a1 << 1)
@@ -325,12 +325,12 @@ define zeroext i16 @load_R_h_(i16* nocapture readonly %a, i32 %b) local_unnamed_
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i16, i16* %a, i64 %idxprom
-  %0 = load i16, i16* %arrayidx, align 2
+  %arrayidx = getelementptr inbounds i16, ptr %a, i64 %idxprom
+  %0 = load i16, ptr %arrayidx, align 2
   ret i16 %0
 }
 
-define i32 @load_R_w(i32* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define i32 @load_R_w(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_R_w:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ldr32.w a0, (a0, a1 << 2)
@@ -348,12 +348,12 @@ define i32 @load_R_w(i32* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i32, i32* %a, i64 %idxprom
-  %0 = load i32, i32* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds i32, ptr %a, i64 %idxprom
+  %0 = load i32, ptr %arrayidx, align 4
   ret i32 %0
 }
 
-define i64 @load_R_d(i64* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
+define i64 @load_R_d(ptr nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: load_R_d:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ixd32 a2, a0, a1
@@ -374,12 +374,12 @@ define i64 @load_R_d(i64* nocapture readonly %a, i32 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i64, i64* %a, i64 %idxprom
-  %0 = load i64, i64* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds i64, ptr %a, i64 %idxprom
+  %0 = load i64, ptr %arrayidx, align 4
   ret i64 %0
 }
 
-define i8 @loadR_i8_anyext(i8* %c, i32 %a) {
+define i8 @loadR_i8_anyext(ptr %c, i32 %a) {
 ; CHECK-LABEL: loadR_i8_anyext:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ldr32.bs a0, (a0, a1 << 0)
@@ -396,12 +396,12 @@ define i8 @loadR_i8_anyext(i8* %c, i32 %a) {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %a to i64
-  %arrayidx = getelementptr inbounds i8, i8* %c, i64 %idxprom
-  %0 = load i8, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %c, i64 %idxprom
+  %0 = load i8, ptr %arrayidx, align 1
   ret i8 %0
 }
 
-define signext i1 @store_I_bits(i1*  %a, i1 %b) local_unnamed_addr #0 {
+define signext i1 @store_I_bits(ptr  %a, i1 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_I_bits:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    andi32 a1, a1, 1
@@ -421,12 +421,12 @@ define signext i1 @store_I_bits(i1*  %a, i1 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i1, i1* %a, i64 3
-  store i1 %b,  i1* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i1, ptr %a, i64 3
+  store i1 %b,  ptr %arrayidx, align 1
   ret i1 0
 }
 
-define zeroext i1 @store_I_bit_(i1*  %a, i1 %b) local_unnamed_addr #0 {
+define zeroext i1 @store_I_bit_(ptr  %a, i1 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_I_bit_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    andi32 a1, a1, 1
@@ -446,12 +446,12 @@ define zeroext i1 @store_I_bit_(i1*  %a, i1 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i1, i1* %a, i64 3
-  store i1 %b, i1* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i1, ptr %a, i64 3
+  store i1 %b, ptr %arrayidx, align 1
   ret i1 0
 }
 
-define signext i8 @store_I_bs(i8*  %a, i8 %b) local_unnamed_addr #0 {
+define signext i8 @store_I_bs(ptr  %a, i8 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_I_bs:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    st16.b a1, (a0, 3)
@@ -468,12 +468,12 @@ define signext i8 @store_I_bs(i8*  %a, i8 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i8, i8* %a, i64 3
-  store i8 %b, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %a, i64 3
+  store i8 %b, ptr %arrayidx, align 1
   ret i8 0
 }
 
-define zeroext i8 @store_I_b_(i8*  %a, i8 %b) local_unnamed_addr #0 {
+define zeroext i8 @store_I_b_(ptr  %a, i8 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_I_b_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    st16.b a1, (a0, 3)
@@ -490,12 +490,12 @@ define zeroext i8 @store_I_b_(i8*  %a, i8 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i8, i8* %a, i64 3
-  store i8 %b, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %a, i64 3
+  store i8 %b, ptr %arrayidx, align 1
   ret i8 0
 }
 
-define signext i16 @store_I_hs(i16*  %a, i16 %b) local_unnamed_addr #0 {
+define signext i16 @store_I_hs(ptr  %a, i16 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_I_hs:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    st16.h a1, (a0, 6)
@@ -512,12 +512,12 @@ define signext i16 @store_I_hs(i16*  %a, i16 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i16, i16* %a, i64 3
-  store i16 %b, i16* %arrayidx, align 2
+  %arrayidx = getelementptr inbounds i16, ptr %a, i64 3
+  store i16 %b, ptr %arrayidx, align 2
   ret i16 0
 }
 
-define zeroext i16 @store_I_h_(i16*  %a, i16 %b) local_unnamed_addr #0 {
+define zeroext i16 @store_I_h_(ptr  %a, i16 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_I_h_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    st16.h a1, (a0, 6)
@@ -534,12 +534,12 @@ define zeroext i16 @store_I_h_(i16*  %a, i16 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i16, i16* %a, i64 3
-  store i16 %b, i16* %arrayidx, align 2
+  %arrayidx = getelementptr inbounds i16, ptr %a, i64 3
+  store i16 %b, ptr %arrayidx, align 2
   ret i16 0
 }
 
-define i32 @store_I_w(i32*  %a, i32 %b) local_unnamed_addr #0 {
+define i32 @store_I_w(ptr  %a, i32 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_I_w:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    st16.w a1, (a0, 12)
@@ -556,12 +556,12 @@ define i32 @store_I_w(i32*  %a, i32 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i32, i32* %a, i64 3
-  store i32 %b, i32* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds i32, ptr %a, i64 3
+  store i32 %b, ptr %arrayidx, align 4
   ret i32 0
 }
 
-define i64 @store_I_d(i64*  %a, i64 %b) local_unnamed_addr #0 {
+define i64 @store_I_d(ptr  %a, i64 %b) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_I_d:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    st16.w a2, (a0, 28)
@@ -582,12 +582,12 @@ define i64 @store_I_d(i64*  %a, i64 %b) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  %arrayidx = getelementptr inbounds i64, i64* %a, i64 3
-  store i64 %b, i64* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds i64, ptr %a, i64 3
+  store i64 %b, ptr %arrayidx, align 4
   ret i64 0
 }
 
-define i8 @store_I_i8_anyext(i8* %p, i8 %b) {
+define i8 @store_I_i8_anyext(ptr %p, i8 %b) {
 ; CHECK-LABEL: store_I_i8_anyext:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    st16.b a1, (a0, 0)
@@ -604,11 +604,11 @@ define i8 @store_I_i8_anyext(i8* %p, i8 %b) {
 ; GENERIC-NEXT:    addi16 sp, sp, 4
 ; GENERIC-NEXT:    rts16
 entry:
-  store i8 %b, i8* %p, align 1
+  store i8 %b, ptr %p, align 1
   ret i8 0
 }
 
-define signext i1 @store_R_bits(i1*  %a, i32 %b, i1 %c) local_unnamed_addr #0 {
+define signext i1 @store_R_bits(ptr  %a, i32 %b, i1 %c) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_R_bits:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    andi32 a2, a2, 1
@@ -630,12 +630,12 @@ define signext i1 @store_R_bits(i1*  %a, i32 %b, i1 %c) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i1, i1* %a, i64 %idxprom
-  store i1 %c, i1* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i1, ptr %a, i64 %idxprom
+  store i1 %c, ptr %arrayidx, align 1
   ret i1 0
 }
 
-define zeroext i1 @store_R_bit_(i1*  %a, i32 %b, i1 %c) local_unnamed_addr #0 {
+define zeroext i1 @store_R_bit_(ptr  %a, i32 %b, i1 %c) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_R_bit_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    andi32 a2, a2, 1
@@ -657,13 +657,13 @@ define zeroext i1 @store_R_bit_(i1*  %a, i32 %b, i1 %c) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i1, i1* %a, i64 %idxprom
-  store i1 %c, i1* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i1, ptr %a, i64 %idxprom
+  store i1 %c, ptr %arrayidx, align 1
   ret i1 0
 }
 
 
-define signext i8 @store_R_bs(i8*  %a, i32 %b, i8 %c) local_unnamed_addr #0 {
+define signext i8 @store_R_bs(ptr  %a, i32 %b, i8 %c) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_R_bs:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    str32.b a2, (a0, a1 << 0)
@@ -682,12 +682,12 @@ define signext i8 @store_R_bs(i8*  %a, i32 %b, i8 %c) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i8, i8* %a, i64 %idxprom
-  store i8 %c, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %a, i64 %idxprom
+  store i8 %c, ptr %arrayidx, align 1
   ret i8 0
 }
 
-define zeroext i8 @store_R_b_(i8*  %a, i32 %b, i8 %c) local_unnamed_addr #0 {
+define zeroext i8 @store_R_b_(ptr  %a, i32 %b, i8 %c) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_R_b_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    str32.b a2, (a0, a1 << 0)
@@ -706,12 +706,12 @@ define zeroext i8 @store_R_b_(i8*  %a, i32 %b, i8 %c) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i8, i8* %a, i64 %idxprom
-  store i8 %c, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %a, i64 %idxprom
+  store i8 %c, ptr %arrayidx, align 1
   ret i8 0
 }
 
-define signext i16 @store_R_hs(i16*  %a, i32 %b, i16 %c) local_unnamed_addr #0 {
+define signext i16 @store_R_hs(ptr  %a, i32 %b, i16 %c) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_R_hs:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    str32.h a2, (a0, a1 << 1)
@@ -731,12 +731,12 @@ define signext i16 @store_R_hs(i16*  %a, i32 %b, i16 %c) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i16, i16* %a, i64 %idxprom
-  store i16 %c, i16* %arrayidx, align 2
+  %arrayidx = getelementptr inbounds i16, ptr %a, i64 %idxprom
+  store i16 %c, ptr %arrayidx, align 2
   ret i16 0
 }
 
-define zeroext i16 @store_R_h_(i16*  %a, i32 %b, i16 %c) local_unnamed_addr #0 {
+define zeroext i16 @store_R_h_(ptr  %a, i32 %b, i16 %c) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_R_h_:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    str32.h a2, (a0, a1 << 1)
@@ -756,12 +756,12 @@ define zeroext i16 @store_R_h_(i16*  %a, i32 %b, i16 %c) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i16, i16* %a, i64 %idxprom
-  store i16 %c, i16* %arrayidx, align 2
+  %arrayidx = getelementptr inbounds i16, ptr %a, i64 %idxprom
+  store i16 %c, ptr %arrayidx, align 2
   ret i16 0
 }
 
-define i32 @store_R_w(i32*  %a, i32 %b, i32 %c) local_unnamed_addr #0 {
+define i32 @store_R_w(ptr  %a, i32 %b, i32 %c) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_R_w:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    str32.w a2, (a0, a1 << 2)
@@ -781,12 +781,12 @@ define i32 @store_R_w(i32*  %a, i32 %b, i32 %c) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i32, i32* %a, i64 %idxprom
-  store i32 %c, i32* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds i32, ptr %a, i64 %idxprom
+  store i32 %c, ptr %arrayidx, align 4
   ret i32 0
 }
 
-define i64 @store_R_d(i64*  %a, i32 %b, i64 %c) local_unnamed_addr #0 {
+define i64 @store_R_d(ptr  %a, i32 %b, i64 %c) local_unnamed_addr #0 {
 ; CHECK-LABEL: store_R_d:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    ixd32 t0, a0, a1
@@ -811,12 +811,12 @@ define i64 @store_R_d(i64*  %a, i32 %b, i64 %c) local_unnamed_addr #0 {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %b to i64
-  %arrayidx = getelementptr inbounds i64, i64* %a, i64 %idxprom
-  store i64 %c, i64* %arrayidx, align 4
+  %arrayidx = getelementptr inbounds i64, ptr %a, i64 %idxprom
+  store i64 %c, ptr %arrayidx, align 4
   ret i64 0
 }
 
-define i8 @storeR_i8_anyext(i8* %c, i32 %a, i8 %d) {
+define i8 @storeR_i8_anyext(ptr %c, i32 %a, i8 %d) {
 ; CHECK-LABEL: storeR_i8_anyext:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    str32.b a2, (a0, a1 << 0)
@@ -835,7 +835,7 @@ define i8 @storeR_i8_anyext(i8* %c, i32 %a, i8 %d) {
 ; GENERIC-NEXT:    rts16
 entry:
   %idxprom = sext i32 %a to i64
-  %arrayidx = getelementptr inbounds i8, i8* %c, i64 %idxprom
-  store i8 %d, i8* %arrayidx, align 1
+  %arrayidx = getelementptr inbounds i8, ptr %c, i64 %idxprom
+  store i8 %d, ptr %arrayidx, align 1
   ret i8 0
 }

diff  --git a/llvm/test/CodeGen/CSKY/tls-models.ll b/llvm/test/CodeGen/CSKY/tls-models.ll
index 35dca36f515b2d..d520e247c9a3bf 100644
--- a/llvm/test/CodeGen/CSKY/tls-models.ll
+++ b/llvm/test/CodeGen/CSKY/tls-models.ll
@@ -15,7 +15,7 @@
 
 ; No model specified
 
-define i32* @f1() nounwind {
+define ptr @f1() nounwind {
 ; CSKY-PIC-LABEL: f1:
 ; CSKY-PIC:       # %bb.0: # %entry
 ; CSKY-PIC-NEXT:    subi16 sp, sp, 8
@@ -59,13 +59,13 @@ define i32* @f1() nounwind {
 ; CSKY-NOPIC-NEXT:  .Ltmp0:
 ; CSKY-NOPIC-NEXT:    .long unspecified-(.LPC0_1-.Ltmp0)@GOTTPOFF
 entry:
-  ret i32* @unspecified
+  ret ptr @unspecified
 }
 
 
 ; localdynamic specified
 
-define i32* @f2() nounwind {
+define ptr @f2() nounwind {
 ; CSKY-PIC-LABEL: f2:
 ; CSKY-PIC:       # %bb.0: # %entry
 ; CSKY-PIC-NEXT:    subi16 sp, sp, 8
@@ -109,13 +109,13 @@ define i32* @f2() nounwind {
 ; CSKY-NOPIC-NEXT:  .Ltmp1:
 ; CSKY-NOPIC-NEXT:    .long ld-(.LPC1_1-.Ltmp1)@GOTTPOFF
 entry:
-  ret i32* @ld
+  ret ptr @ld
 }
 
 
 ; initialexec specified
 
-define i32* @f3() nounwind {
+define ptr @f3() nounwind {
 ; CSKY-PIC-LABEL: f3:
 ; CSKY-PIC:       # %bb.0: # %entry
 ; CSKY-PIC-NEXT:  .LPC2_1:
@@ -146,13 +146,13 @@ define i32* @f3() nounwind {
 ; CSKY-NOPIC-NEXT:  .Ltmp2:
 ; CSKY-NOPIC-NEXT:    .long ie-(.LPC2_1-.Ltmp2)@GOTTPOFF
 entry:
-  ret i32* @ie
+  ret ptr @ie
 }
 
 
 ; localexec specified
 
-define i32* @f4() nounwind {
+define ptr @f4() nounwind {
 ; CSKY-PIC-LABEL: f4:
 ; CSKY-PIC:       # %bb.0: # %entry
 ; CSKY-PIC-NEXT:    lrw32 a0, [.LCPI3_0]
@@ -175,5 +175,5 @@ define i32* @f4() nounwind {
 ; CSKY-NOPIC-NEXT:  .LCPI3_0:
 ; CSKY-NOPIC-NEXT:    .long le at TPOFF
 entry:
-  ret i32* @le
+  ret ptr @le
 }


        


More information about the llvm-commits mailing list