42 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=thumbv6-linux-gnueabi < %s | FileCheck %s3 4; After various DAGCombine optimizations, we end up with an sbcs with5; multiple uses of the cpsr def, and we therefore clone the subs/sbcs.6; Make sure this doesn't crash.7;8; The output here might change at some point in the future, and no9; longer clone the operations; if that happens, there probably isn't any10; straightforward way to fix the test.11define i64 @f(i64 %x2, i32 %z) {12; CHECK-LABEL: f:13; CHECK: @ %bb.0:14; CHECK-NEXT: .save {r4, r5, r7, lr}15; CHECK-NEXT: push {r4, r5, r7, lr}16; CHECK-NEXT: movs r2, #017; CHECK-NEXT: subs r3, r0, #118; CHECK-NEXT: mov r3, r119; CHECK-NEXT: sbcs r3, r220; CHECK-NEXT: mov r3, r221; CHECK-NEXT: adcs r3, r222; CHECK-NEXT: movs r4, #3023; CHECK-NEXT: subs r5, r0, #124; CHECK-NEXT: mov r5, r125; CHECK-NEXT: sbcs r5, r226; CHECK-NEXT: adcs r4, r227; CHECK-NEXT: lsls r2, r1, #128; CHECK-NEXT: lsls r2, r429; CHECK-NEXT: movs r4, #130; CHECK-NEXT: eors r4, r331; CHECK-NEXT: lsrs r0, r432; CHECK-NEXT: orrs r0, r233; CHECK-NEXT: lsrs r1, r434; CHECK-NEXT: pop {r4, r5, r7, pc}35 %x3 = add nsw i64 %x2, -136 %x8 = icmp ne i64 %x2, 037 %x9 = xor i1 %x8, true38 %x10 = zext i1 %x9 to i6439 %x11 = lshr i64 %x2, %x1040 ret i64 %x1141}42