1 ; RUN: llc < %s -mtriple=i686-apple-darwin10 -fast-isel -fast-isel-abort | FileCheck %s 2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort | FileCheck %s 3 4 declare i32 @test1a(i32) 5 6 define i32 @test1(i32 %x) nounwind { 7 ; CHECK: test1: 8 ; CHECK: andb $1, % 9 %y = add i32 %x, -3 10 %t = call i32 @test1a(i32 %y) 11 %s = mul i32 %t, 77 12 %z = trunc i32 %s to i1 13 br label %next 14 15 next: ; preds = %0 16 %u = zext i1 %z to i32 17 %v = add i32 %u, 1999 18 br label %exit 19 20 exit: ; preds = %next 21 ret i32 %v 22 } 23 24 define void @test2(i8* %a) nounwind { 25 entry: 26 ; CHECK: test2: 27 ; CHECK: movb {{.*}} %al 28 ; CHECK-NEXT: xorb $1, %al 29 ; CHECK-NEXT: testb $1 30 %tmp = load i8* %a, align 1 31 %tobool = trunc i8 %tmp to i1 32 %tobool2 = xor i1 %tobool, true 33 br i1 %tobool2, label %if.then, label %if.end 34 35 if.then: 36 call void @test2(i8* null) 37 br label %if.end 38 39 if.end: 40 ret void 41 } 42