; 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 }