1 ; RUN: llc -mtriple=thumb-eabi %s -verify-machineinstrs -o - | FileCheck %s 2 ; RUN: llc -mtriple=thumbv6-eabi %s -verify-machineinstrs -o - | FileCheck %s 3 4 define i1 @test(i64 %arg) { 5 entry: 6 %ispos = icmp sgt i64 %arg, -1 7 %neg = sub i64 0, %arg 8 %sel = select i1 %ispos, i64 %arg, i64 %neg 9 %cmp2 = icmp eq i64 %sel, %arg 10 ret i1 %cmp2 11 } 12 13 ; The scheduler used to ignore OptionalDefs, and could unwittingly insert 14 ; a flag-setting instruction in between an ADDS and the corresponding ADC. 15 16 ; CHECK: adds 17 ; CHECK-NOT: eors 18 ; CHECK: adcs 19