1 ; RUN: llc < %s -mtriple=i686-apple-darwin10 -fast-isel -fast-isel-abort=1 | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort=1 | FileCheck %s
4 declare i32 @test1a(i32)
6 define i32 @test1(i32 %x) nounwind {
10 %t = call i32 @test1a(i32 %y)
12 %z = trunc i32 %s to i1
16 %u = zext i1 %z to i32
24 define void @test2(i8* %a) nounwind {
26 ; clang uses i8 constants for booleans, so we test with an i8 1.
28 ; CHECK: movb {{.*}} %al
29 ; CHECK-NEXT: xorb $1, %al
30 ; CHECK-NEXT: testb $1
31 %tmp = load i8, i8* %a, align 1
33 %tobool = trunc i8 %xor to i1
34 br i1 %tobool, label %if.then, label %if.end
37 call void @test2(i8* null)