1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=thumbv7s | FileCheck %s
3 target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
4 target triple = "thumbv7s-apple-ios3.1.3"
6 define void @bfi_chain_cse_crash(ptr %0, ptr %ptr) {
7 ; CHECK-LABEL: bfi_chain_cse_crash:
8 ; CHECK: @ %bb.0: @ %entry
9 ; CHECK-NEXT: ldrb r2, [r0]
10 ; CHECK-NEXT: and r3, r2, #1
11 ; CHECK-NEXT: lsr.w r12, r2, #3
12 ; CHECK-NEXT: bfi r3, r12, #3, #1
13 ; CHECK-NEXT: strb r3, [r0]
14 ; CHECK-NEXT: and r0, r2, #4
15 ; CHECK-NEXT: bfi r0, r12, #3, #1
16 ; CHECK-NEXT: strb r0, [r1]
19 %1 = load i8, ptr %0, align 1
21 %3 = select i1 false, i8 %2, i8 0
24 %6 = zext i8 %3 to i32
26 %8 = trunc i32 %7 to i8
27 %9 = select i1 %5, i8 %3, i8 %8
29 %11 = icmp eq i8 %10, 0
30 %12 = zext i8 %2 to i32
32 %14 = trunc i32 %13 to i8
33 %15 = zext i8 %9 to i32
35 %17 = trunc i32 %16 to i8
36 %18 = select i1 %11, i8 %2, i8 %14
37 %19 = select i1 %11, i8 %9, i8 %17
38 store i8 %18, ptr %0, align 1
39 store i8 %19, ptr %ptr, align 1