1 ; RUN: llc -mtriple=aarch64-linux-gnu -O3 -o - %s | FileCheck %s 2 3 @a = external global i8, align 1 4 @b = external global i8, align 1 5 6 ; Test that SUBS is replaced by SUB if condition flags are not used. 7 define i32 @test01() nounwind { 8 ; CHECK: ldrb {{.*}} 9 ; CHECK-NEXT: ldrb {{.*}} 10 ; CHECK: sub {{.*}} 11 ; CHECK-NEXT: cmn {{.*}} 12 entry: 13 %0 = load i8, i8* @a, align 1 14 %conv = zext i8 %0 to i32 15 %1 = load i8, i8* @b, align 1 16 %conv1 = zext i8 %1 to i32 17 %s = sub nsw i32 %conv1, %conv 18 %cmp0 = icmp eq i32 %s, -1 19 %cmp1 = sext i1 %cmp0 to i8 20 store i8 %cmp1, i8* @a 21 ret i32 0 22 } 23 24