summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2024-05-02 22:09:59 -0700
committerCraig Topper <craig.topper@sifive.com>2024-05-03 09:47:46 -0700
commit54d6f6626d9377115f3db3ab3fd5994b0de5a268 (patch)
treef797c31abe45e95a9aec79987eeabd67c0f9f07e
parentf9d91fbe86519f3083a9ae37b1e2038f6b8992a6 (diff)
[AArch64] Add test for #90936. NFC
-rw-r--r--llvm/test/CodeGen/AArch64/pr90936.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/pr90936.ll b/llvm/test/CodeGen/AArch64/pr90936.ll
new file mode 100644
index 000000000000..62c18fa52187
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/pr90936.ll
@@ -0,0 +1,18 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc < %s -mtriple=aarch64 | FileCheck %s
+
+define void @f(i16 %arg, ptr %arg1) {
+; CHECK-LABEL: f:
+; CHECK: // %bb.0: // %bb
+; CHECK-NEXT: strh w0, [x1]
+; CHECK-NEXT: ret
+bb:
+ %i = trunc i16 %arg to i8
+ %i2 = trunc i16 %arg to i14
+ %i3 = lshr i14 %i2, 8
+ store i8 %i, ptr %arg1, align 1
+ %i4 = getelementptr i8, ptr %arg1, i64 1
+ %i5 = trunc i14 %i3 to i8
+ store i8 %i5, ptr %i4, align 1
+ ret void
+}