1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-apple-ios -fast-isel -verify-machineinstrs | FileCheck %s
4 ; Check that the kill flag is cleared between CSE'd instructions on their
6 ; The verifier would complain otherwise.
7 define i64 @csed_impdef_killflag(i64 %a) {
8 ; CHECK-LABEL: csed_impdef_killflag:
10 ; CHECK-NEXT: mov w8, #1 ; =0x1
11 ; CHECK-NEXT: cmp x0, #0
12 ; CHECK-NEXT: mov x9, #2 ; =0x2
13 ; CHECK-NEXT: csel w8, wzr, w8, ne
14 ; CHECK-NEXT: mov x10, #3 ; =0x3
15 ; CHECK-NEXT: ubfx x8, x8, #0, #32
16 ; CHECK-NEXT: csel x9, x9, x10, ne
17 ; CHECK-NEXT: add x0, x9, x8
20 %1 = icmp ne i64 %a, 0
21 %2 = select i1 %1, i32 0, i32 1
22 %3 = icmp ne i64 %a, 0
23 %4 = select i1 %3, i64 2, i64 3
24 %5 = zext i32 %2 to i64