[llvm] 25d93f3 - NFC: Precommit GISel checks for arm64-indexed-memory.ll
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 13 16:52:03 PDT 2023
Author: Amara Emerson
Date: 2023-10-13T16:51:39-07:00
New Revision: 25d93f3f6843d0e2b8b6c1920a12b59d9dc6bf60
URL: https://github.com/llvm/llvm-project/commit/25d93f3f6843d0e2b8b6c1920a12b59d9dc6bf60
DIFF: https://github.com/llvm/llvm-project/commit/25d93f3f6843d0e2b8b6c1920a12b59d9dc6bf60.diff
LOG: NFC: Precommit GISel checks for arm64-indexed-memory.ll
Added:
Modified:
llvm/test/CodeGen/AArch64/arm64-indexed-memory.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AArch64/arm64-indexed-memory.ll b/llvm/test/CodeGen/AArch64/arm64-indexed-memory.ll
index d1747e7ca1315a2..bb18d6d4866ca00 100644
--- a/llvm/test/CodeGen/AArch64/arm64-indexed-memory.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-indexed-memory.ll
@@ -1,12 +1,25 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=arm64-apple-ios -aarch64-redzone | FileCheck %s --check-prefixes=CHECK,CHECK64
+; RUN: llc < %s -mtriple=arm64-apple-ios -aarch64-redzone -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=CHECK,GISEL
; RUN: llc < %s -mtriple=arm64_32-apple-ios -aarch64-redzone | FileCheck %s --check-prefixes=CHECK,CHECK32
define ptr @store64(ptr %ptr, i64 %index, i64 %spacing) {
-; CHECK-LABEL: store64:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str x2, [x0], #8
-; CHECK-NEXT: ret
+; CHECK64-LABEL: store64:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str x2, [x0], #8
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: store64:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #8
+; GISEL-NEXT: str x2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: store64:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str x2, [x0], #8
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i64, ptr %ptr, i64 1
store i64 %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
@@ -25,20 +38,44 @@ define ptr @store64idxpos256(ptr %ptr, i64 %index, i64 %spacing) {
}
define ptr @store64idxneg256(ptr %ptr, i64 %index, i64 %spacing) {
-; CHECK-LABEL: store64idxneg256:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str x2, [x0], #-256
-; CHECK-NEXT: ret
+; CHECK64-LABEL: store64idxneg256:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str x2, [x0], #-256
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: store64idxneg256:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: sub x0, x0, #256
+; GISEL-NEXT: str x2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: store64idxneg256:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str x2, [x0], #-256
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i64, ptr %ptr, i64 -32
store i64 %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
}
define ptr @store32(ptr %ptr, i32 %index, i32 %spacing) {
-; CHECK-LABEL: store32:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str w2, [x0], #4
-; CHECK-NEXT: ret
+; CHECK64-LABEL: store32:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str w2, [x0], #4
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: store32:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #4
+; GISEL-NEXT: str w2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: store32:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str w2, [x0], #4
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i32, ptr %ptr, i64 1
store i32 %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
@@ -57,20 +94,44 @@ define ptr @store32idxpos256(ptr %ptr, i32 %index, i32 %spacing) {
}
define ptr @store32idxneg256(ptr %ptr, i32 %index, i32 %spacing) {
-; CHECK-LABEL: store32idxneg256:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str w2, [x0], #-256
-; CHECK-NEXT: ret
+; CHECK64-LABEL: store32idxneg256:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str w2, [x0], #-256
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: store32idxneg256:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: sub x0, x0, #256
+; GISEL-NEXT: str w2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: store32idxneg256:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str w2, [x0], #-256
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i32, ptr %ptr, i64 -64
store i32 %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
}
define ptr @store16(ptr %ptr, i16 %index, i16 %spacing) {
-; CHECK-LABEL: store16:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strh w2, [x0], #2
-; CHECK-NEXT: ret
+; CHECK64-LABEL: store16:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strh w2, [x0], #2
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: store16:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #2
+; GISEL-NEXT: strh w2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: store16:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strh w2, [x0], #2
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i16, ptr %ptr, i64 1
store i16 %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
@@ -89,20 +150,44 @@ define ptr @store16idxpos256(ptr %ptr, i16 %index, i16 %spacing) {
}
define ptr @store16idxneg256(ptr %ptr, i16 %index, i16 %spacing) {
-; CHECK-LABEL: store16idxneg256:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strh w2, [x0], #-256
-; CHECK-NEXT: ret
+; CHECK64-LABEL: store16idxneg256:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strh w2, [x0], #-256
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: store16idxneg256:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: sub x0, x0, #256
+; GISEL-NEXT: strh w2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: store16idxneg256:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strh w2, [x0], #-256
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i16, ptr %ptr, i64 -128
store i16 %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
}
define ptr @store8(ptr %ptr, i8 %index, i8 %spacing) {
-; CHECK-LABEL: store8:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strb w2, [x0], #1
-; CHECK-NEXT: ret
+; CHECK64-LABEL: store8:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strb w2, [x0], #1
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: store8:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #1
+; GISEL-NEXT: strb w2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: store8:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strb w2, [x0], #1
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
store i8 %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
@@ -121,20 +206,44 @@ define ptr @store8idxpos256(ptr %ptr, i8 %index, i8 %spacing) {
}
define ptr @store8idxneg256(ptr %ptr, i8 %index, i8 %spacing) {
-; CHECK-LABEL: store8idxneg256:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strb w2, [x0], #-256
-; CHECK-NEXT: ret
+; CHECK64-LABEL: store8idxneg256:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strb w2, [x0], #-256
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: store8idxneg256:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: sub x0, x0, #256
+; GISEL-NEXT: strb w2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: store8idxneg256:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strb w2, [x0], #-256
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %ptr, i64 -256
store i8 %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
}
define ptr @truncst64to32(ptr %ptr, i32 %index, i64 %spacing) {
-; CHECK-LABEL: truncst64to32:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str w2, [x0], #4
-; CHECK-NEXT: ret
+; CHECK64-LABEL: truncst64to32:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str w2, [x0], #4
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: truncst64to32:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #4
+; GISEL-NEXT: str w2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: truncst64to32:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str w2, [x0], #4
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i32, ptr %ptr, i64 1
%trunc = trunc i64 %spacing to i32
store i32 %trunc, ptr %ptr, align 4
@@ -142,10 +251,22 @@ define ptr @truncst64to32(ptr %ptr, i32 %index, i64 %spacing) {
}
define ptr @truncst64to16(ptr %ptr, i16 %index, i64 %spacing) {
-; CHECK-LABEL: truncst64to16:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strh w2, [x0], #2
-; CHECK-NEXT: ret
+; CHECK64-LABEL: truncst64to16:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strh w2, [x0], #2
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: truncst64to16:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #2
+; GISEL-NEXT: strh w2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: truncst64to16:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strh w2, [x0], #2
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i16, ptr %ptr, i64 1
%trunc = trunc i64 %spacing to i16
store i16 %trunc, ptr %ptr, align 4
@@ -153,10 +274,22 @@ define ptr @truncst64to16(ptr %ptr, i16 %index, i64 %spacing) {
}
define ptr @truncst64to8(ptr %ptr, i8 %index, i64 %spacing) {
-; CHECK-LABEL: truncst64to8:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strb w2, [x0], #1
-; CHECK-NEXT: ret
+; CHECK64-LABEL: truncst64to8:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strb w2, [x0], #1
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: truncst64to8:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #1
+; GISEL-NEXT: strb w2, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: truncst64to8:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strb w2, [x0], #1
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
%trunc = trunc i64 %spacing to i8
store i8 %trunc, ptr %ptr, align 4
@@ -165,30 +298,66 @@ define ptr @truncst64to8(ptr %ptr, i8 %index, i64 %spacing) {
define ptr @storef16(ptr %ptr, half %index, half %spacing) nounwind {
-; CHECK-LABEL: storef16:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str h1, [x0], #2
-; CHECK-NEXT: ret
+; CHECK64-LABEL: storef16:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str h1, [x0], #2
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: storef16:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #2
+; GISEL-NEXT: str h1, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: storef16:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str h1, [x0], #2
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds half, ptr %ptr, i64 1
store half %spacing, ptr %ptr, align 2
ret ptr %incdec.ptr
}
define ptr @storef32(ptr %ptr, float %index, float %spacing) {
-; CHECK-LABEL: storef32:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str s1, [x0], #4
-; CHECK-NEXT: ret
+; CHECK64-LABEL: storef32:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str s1, [x0], #4
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: storef32:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #4
+; GISEL-NEXT: str s1, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: storef32:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str s1, [x0], #4
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds float, ptr %ptr, i64 1
store float %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
}
define ptr @storef64(ptr %ptr, double %index, double %spacing) {
-; CHECK-LABEL: storef64:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str d1, [x0], #8
-; CHECK-NEXT: ret
+; CHECK64-LABEL: storef64:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str d1, [x0], #8
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: storef64:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #8
+; GISEL-NEXT: str d1, [x8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: storef64:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str d1, [x0], #8
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds double, ptr %ptr, i64 1
store double %spacing, ptr %ptr, align 4
ret ptr %incdec.ptr
@@ -196,40 +365,88 @@ define ptr @storef64(ptr %ptr, double %index, double %spacing) {
define ptr @pref64(ptr %ptr, double %spacing) {
-; CHECK-LABEL: pref64:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str d0, [x0, #32]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pref64:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str d0, [x0, #32]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pref64:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #32
+; GISEL-NEXT: str d0, [x8, #32]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pref64:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str d0, [x0, #32]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds double, ptr %ptr, i64 4
store double %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
}
define ptr @pref32(ptr %ptr, float %spacing) {
-; CHECK-LABEL: pref32:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str s0, [x0, #12]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pref32:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str s0, [x0, #12]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pref32:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #12
+; GISEL-NEXT: str s0, [x8, #12]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pref32:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str s0, [x0, #12]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds float, ptr %ptr, i64 3
store float %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
}
define ptr @pref16(ptr %ptr, half %spacing) nounwind {
-; CHECK-LABEL: pref16:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str h0, [x0, #6]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pref16:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str h0, [x0, #6]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pref16:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #6
+; GISEL-NEXT: str h0, [x8, #6]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pref16:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str h0, [x0, #6]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds half, ptr %ptr, i64 3
store half %spacing, ptr %incdec.ptr, align 2
ret ptr %incdec.ptr
}
define ptr @pre64(ptr %ptr, i64 %spacing) {
-; CHECK-LABEL: pre64:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str x1, [x0, #16]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pre64:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str x1, [x0, #16]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pre64:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #16
+; GISEL-NEXT: str x1, [x8, #16]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pre64:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str x1, [x0, #16]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i64, ptr %ptr, i64 2
store i64 %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
@@ -248,20 +465,44 @@ define ptr @pre64idxpos256(ptr %ptr, i64 %spacing) {
}
define ptr @pre64idxneg256(ptr %ptr, i64 %spacing) {
-; CHECK-LABEL: pre64idxneg256:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str x1, [x0, #-256]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pre64idxneg256:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str x1, [x0, #-256]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pre64idxneg256:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: sub x0, x0, #256
+; GISEL-NEXT: stur x1, [x8, #-256]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pre64idxneg256:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str x1, [x0, #-256]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i64, ptr %ptr, i64 -32
store i64 %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
}
define ptr @pre32(ptr %ptr, i32 %spacing) {
-; CHECK-LABEL: pre32:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str w1, [x0, #8]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pre32:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str w1, [x0, #8]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pre32:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #8
+; GISEL-NEXT: str w1, [x8, #8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pre32:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str w1, [x0, #8]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i32, ptr %ptr, i64 2
store i32 %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
@@ -280,20 +521,44 @@ define ptr @pre32idxpos256(ptr %ptr, i32 %spacing) {
}
define ptr @pre32idxneg256(ptr %ptr, i32 %spacing) {
-; CHECK-LABEL: pre32idxneg256:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str w1, [x0, #-256]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pre32idxneg256:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str w1, [x0, #-256]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pre32idxneg256:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: sub x0, x0, #256
+; GISEL-NEXT: stur w1, [x8, #-256]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pre32idxneg256:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str w1, [x0, #-256]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i32, ptr %ptr, i64 -64
store i32 %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
}
define ptr @pre16(ptr %ptr, i16 %spacing) {
-; CHECK-LABEL: pre16:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strh w1, [x0, #4]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pre16:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strh w1, [x0, #4]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pre16:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #4
+; GISEL-NEXT: strh w1, [x8, #4]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pre16:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strh w1, [x0, #4]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i16, ptr %ptr, i64 2
store i16 %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
@@ -312,20 +577,44 @@ define ptr @pre16idxpos256(ptr %ptr, i16 %spacing) {
}
define ptr @pre16idxneg256(ptr %ptr, i16 %spacing) {
-; CHECK-LABEL: pre16idxneg256:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strh w1, [x0, #-256]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pre16idxneg256:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strh w1, [x0, #-256]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pre16idxneg256:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: sub x0, x0, #256
+; GISEL-NEXT: sturh w1, [x8, #-256]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pre16idxneg256:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strh w1, [x0, #-256]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i16, ptr %ptr, i64 -128
store i16 %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
}
define ptr @pre8(ptr %ptr, i8 %spacing) {
-; CHECK-LABEL: pre8:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strb w1, [x0, #2]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pre8:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strb w1, [x0, #2]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pre8:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #2
+; GISEL-NEXT: strb w1, [x8, #2]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pre8:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strb w1, [x0, #2]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %ptr, i64 2
store i8 %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
@@ -344,20 +633,44 @@ define ptr @pre8idxpos256(ptr %ptr, i8 %spacing) {
}
define ptr @pre8idxneg256(ptr %ptr, i8 %spacing) {
-; CHECK-LABEL: pre8idxneg256:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strb w1, [x0, #-256]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pre8idxneg256:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strb w1, [x0, #-256]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pre8idxneg256:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: sub x0, x0, #256
+; GISEL-NEXT: sturb w1, [x8, #-256]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pre8idxneg256:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strb w1, [x0, #-256]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %ptr, i64 -256
store i8 %spacing, ptr %incdec.ptr, align 4
ret ptr %incdec.ptr
}
define ptr @pretrunc64to32(ptr %ptr, i64 %spacing) {
-; CHECK-LABEL: pretrunc64to32:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: str w1, [x0, #8]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pretrunc64to32:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: str w1, [x0, #8]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pretrunc64to32:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #8
+; GISEL-NEXT: str w1, [x8, #8]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pretrunc64to32:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: str w1, [x0, #8]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i32, ptr %ptr, i64 2
%trunc = trunc i64 %spacing to i32
store i32 %trunc, ptr %incdec.ptr, align 4
@@ -365,10 +678,22 @@ define ptr @pretrunc64to32(ptr %ptr, i64 %spacing) {
}
define ptr @pretrunc64to16(ptr %ptr, i64 %spacing) {
-; CHECK-LABEL: pretrunc64to16:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strh w1, [x0, #4]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pretrunc64to16:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strh w1, [x0, #4]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pretrunc64to16:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #4
+; GISEL-NEXT: strh w1, [x8, #4]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pretrunc64to16:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strh w1, [x0, #4]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i16, ptr %ptr, i64 2
%trunc = trunc i64 %spacing to i16
store i16 %trunc, ptr %incdec.ptr, align 4
@@ -376,10 +701,22 @@ define ptr @pretrunc64to16(ptr %ptr, i64 %spacing) {
}
define ptr @pretrunc64to8(ptr %ptr, i64 %spacing) {
-; CHECK-LABEL: pretrunc64to8:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: strb w1, [x0, #2]!
-; CHECK-NEXT: ret
+; CHECK64-LABEL: pretrunc64to8:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: strb w1, [x0, #2]!
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: pretrunc64to8:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #2
+; GISEL-NEXT: strb w1, [x8, #2]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: pretrunc64to8:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: strb w1, [x0, #2]!
+; CHECK32-NEXT: ret
%incdec.ptr = getelementptr inbounds i8, ptr %ptr, i64 2
%trunc = trunc i64 %spacing to i8
store i8 %trunc, ptr %incdec.ptr, align 4
@@ -414,11 +751,24 @@ define ptr @preidxf32(ptr %src, ptr %out) {
}
define ptr @preidxf16(ptr %src, ptr %out) {
-; CHECK-LABEL: preidxf16:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: ldr h0, [x0, #2]!
-; CHECK-NEXT: str h0, [x1]
-; CHECK-NEXT: ret
+; CHECK64-LABEL: preidxf16:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: ldr h0, [x0, #2]!
+; CHECK64-NEXT: str h0, [x1]
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: preidxf16:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: ldr h0, [x0, #2]
+; GISEL-NEXT: add x0, x0, #2
+; GISEL-NEXT: str h0, [x1]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: preidxf16:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: ldr h0, [x0, #2]!
+; CHECK32-NEXT: str h0, [x1]
+; CHECK32-NEXT: ret
%ptr = getelementptr inbounds half, ptr %src, i64 1
%tmp = load half, ptr %ptr, align 2
store half %tmp, ptr %out, align 2
@@ -502,11 +852,24 @@ define ptr @preidx8zext64(ptr %src, ptr %out) {
}
define ptr @preidx32sext64(ptr %src, ptr %out) {
-; CHECK-LABEL: preidx32sext64:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: ldrsw x8, [x0, #4]!
-; CHECK-NEXT: str x8, [x1]
-; CHECK-NEXT: ret
+; CHECK64-LABEL: preidx32sext64:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: ldrsw x8, [x0, #4]!
+; CHECK64-NEXT: str x8, [x1]
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: preidx32sext64:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: ldrsw x8, [x0, #4]
+; GISEL-NEXT: add x0, x0, #4
+; GISEL-NEXT: str x8, [x1]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: preidx32sext64:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: ldrsw x8, [x0, #4]!
+; CHECK32-NEXT: str x8, [x1]
+; CHECK32-NEXT: ret
%ptr = getelementptr inbounds i32, ptr %src, i64 1
%tmp = load i32, ptr %ptr, align 4
%ext = sext i32 %tmp to i64
@@ -515,11 +878,24 @@ define ptr @preidx32sext64(ptr %src, ptr %out) {
}
define ptr @preidx16sext32(ptr %src, ptr %out) {
-; CHECK-LABEL: preidx16sext32:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: ldrsh w8, [x0, #2]!
-; CHECK-NEXT: str w8, [x1]
-; CHECK-NEXT: ret
+; CHECK64-LABEL: preidx16sext32:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: ldrsh w8, [x0, #2]!
+; CHECK64-NEXT: str w8, [x1]
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: preidx16sext32:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: ldrsh w8, [x0, #2]
+; GISEL-NEXT: add x0, x0, #2
+; GISEL-NEXT: str w8, [x1]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: preidx16sext32:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: ldrsh w8, [x0, #2]!
+; CHECK32-NEXT: str w8, [x1]
+; CHECK32-NEXT: ret
%ptr = getelementptr inbounds i16, ptr %src, i64 1
%tmp = load i16, ptr %ptr, align 4
%ext = sext i16 %tmp to i32
@@ -528,11 +904,24 @@ define ptr @preidx16sext32(ptr %src, ptr %out) {
}
define ptr @preidx16sext64(ptr %src, ptr %out) {
-; CHECK-LABEL: preidx16sext64:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: ldrsh x8, [x0, #2]!
-; CHECK-NEXT: str x8, [x1]
-; CHECK-NEXT: ret
+; CHECK64-LABEL: preidx16sext64:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: ldrsh x8, [x0, #2]!
+; CHECK64-NEXT: str x8, [x1]
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: preidx16sext64:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: ldrsh x8, [x0, #2]
+; GISEL-NEXT: add x0, x0, #2
+; GISEL-NEXT: str x8, [x1]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: preidx16sext64:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: ldrsh x8, [x0, #2]!
+; CHECK32-NEXT: str x8, [x1]
+; CHECK32-NEXT: ret
%ptr = getelementptr inbounds i16, ptr %src, i64 1
%tmp = load i16, ptr %ptr, align 4
%ext = sext i16 %tmp to i64
@@ -541,11 +930,24 @@ define ptr @preidx16sext64(ptr %src, ptr %out) {
}
define ptr @preidx8sext32(ptr %src, ptr %out) {
-; CHECK-LABEL: preidx8sext32:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: ldrsb w8, [x0, #1]!
-; CHECK-NEXT: str w8, [x1]
-; CHECK-NEXT: ret
+; CHECK64-LABEL: preidx8sext32:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: ldrsb w8, [x0, #1]!
+; CHECK64-NEXT: str w8, [x1]
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: preidx8sext32:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: ldrsb w8, [x0, #1]
+; GISEL-NEXT: add x0, x0, #1
+; GISEL-NEXT: str w8, [x1]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: preidx8sext32:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: ldrsb w8, [x0, #1]!
+; CHECK32-NEXT: str w8, [x1]
+; CHECK32-NEXT: ret
%ptr = getelementptr inbounds i8, ptr %src, i64 1
%tmp = load i8, ptr %ptr, align 4
%ext = sext i8 %tmp to i32
@@ -554,11 +956,24 @@ define ptr @preidx8sext32(ptr %src, ptr %out) {
}
define ptr @preidx8sext64(ptr %src, ptr %out) {
-; CHECK-LABEL: preidx8sext64:
-; CHECK: ; %bb.0:
-; CHECK-NEXT: ldrsb x8, [x0, #1]!
-; CHECK-NEXT: str x8, [x1]
-; CHECK-NEXT: ret
+; CHECK64-LABEL: preidx8sext64:
+; CHECK64: ; %bb.0:
+; CHECK64-NEXT: ldrsb x8, [x0, #1]!
+; CHECK64-NEXT: str x8, [x1]
+; CHECK64-NEXT: ret
+;
+; GISEL-LABEL: preidx8sext64:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: ldrsb x8, [x0, #1]
+; GISEL-NEXT: add x0, x0, #1
+; GISEL-NEXT: str x8, [x1]
+; GISEL-NEXT: ret
+;
+; CHECK32-LABEL: preidx8sext64:
+; CHECK32: ; %bb.0:
+; CHECK32-NEXT: ldrsb x8, [x0, #1]!
+; CHECK32-NEXT: str x8, [x1]
+; CHECK32-NEXT: ret
%ptr = getelementptr inbounds i8, ptr %src, i64 1
%tmp = load i8, ptr %ptr, align 4
%ext = sext i8 %tmp to i64
@@ -576,6 +991,13 @@ define ptr @postidx_clobber(ptr %addr) nounwind noinline ssp {
; CHECK64-NEXT: mov x0, x8
; CHECK64-NEXT: ret
;
+; GISEL-LABEL: postidx_clobber:
+; GISEL: ; %bb.0:
+; GISEL-NEXT: mov x8, x0
+; GISEL-NEXT: add x0, x0, #8
+; GISEL-NEXT: str x8, [x8]
+; GISEL-NEXT: ret
+;
; CHECK32-LABEL: postidx_clobber:
; CHECK32: ; %bb.0:
; CHECK32-NEXT: mov x8, x0
More information about the llvm-commits
mailing list