[llvm] fed07a9 - [AArch64][GlobalISel] Commit reproducer for crash #166541 (#177190)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 23 01:55:46 PST 2026


Author: Cullen Rhodes
Date: 2026-01-23T09:55:41Z
New Revision: fed07a9649802731943732ab61a5cef69b8ffbf9

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

LOG: [AArch64][GlobalISel] Commit reproducer for crash #166541 (#177190)

Crash was fixed in #175810, this is just committing the reproducer.

Added: 
    llvm/test/CodeGen/AArch64/GlobalISel/pr166541.ll

Modified: 
    

Removed: 
    


################################################################################
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