[llvm] [AArch64][GlobalISel] Ignore non-FPR truncating stores in manual selection code (PR #177190)

Cullen Rhodes via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 23 00:59:20 PST 2026


https://github.com/c-rhodes updated https://github.com/llvm/llvm-project/pull/177190

>From 76270f5949b2bbf4bc46937428b96290a81d0c1d Mon Sep 17 00:00:00 2001
From: Cullen Rhodes <cullen.rhodes at arm.com>
Date: Tue, 20 Jan 2026 12:29:31 +0000
Subject: [PATCH] [AArch64][GlobalISel] Commit reproducer for crash #166541

Crash was fixed in #175810, this is just committing the reproducer.
---
 .../CodeGen/AArch64/GlobalISel/pr166541.ll    | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 llvm/test/CodeGen/AArch64/GlobalISel/pr166541.ll

diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/pr166541.ll b/llvm/test/CodeGen/AArch64/GlobalISel/pr166541.ll
new file mode 100644
index 0000000000000..68d3d42e68560
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/pr166541.ll
@@ -0,0 +1,28 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple aarch64 -verify-machineinstrs -global-isel < %s -o - | FileCheck %s
+
+; https://github.com/llvm/llvm-project/issues/166541
+
+; Verify this doesnt crash
+define void @pr166541(i1 %arg, ptr %arg1) {
+; CHECK-LABEL: pr166541:
+; CHECK:       // %bb.0: // %bb
+; CHECK-NEXT:    tst w0, #0x1
+; CHECK-NEXT:    csel w8, wzr, w0, ne
+; CHECK-NEXT:    strb w8, [x1]
+; CHECK-NEXT:    ret
+bb:
+  br i1 %arg, label %bb3, label %bb2
+
+bb2:
+  %icmp = icmp ult i32 0, 0
+  %and = and i1 %arg, true
+  %select = select i1 %and, i8 1, i8 0
+  br label %bb3
+
+bb3:
+  %phi = phi i8 [ %select, %bb2 ], [ 0, %bb ]
+  %freeze = freeze i8 %phi
+  store i8 %freeze, ptr %arg1, align 1
+  ret void
+}



More information about the llvm-commits mailing list