xref: /llvm-project/llvm/test/CodeGen/X86/2008-11-06-testb.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s
2
3; CHECK: testb
4
5; ModuleID = '<stdin>'
6target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
7target triple = "i386-apple-darwin9.5"
8	%struct.x = type <{ i8, i8, i16 }>
9
10define i32 @foo(ptr %p) nounwind {
11entry:
12	%0 = getelementptr %struct.x, ptr %p, i32 0, i32 0		; <ptr> [#uses=1]
13	store i8 55, ptr %0, align 1
14	%1 = load i32, ptr %p, align 1		; <i32> [#uses=1]
15	%2 = and i32 %1, 512		; <i32> [#uses=1]
16	%3 = icmp eq i32 %2, 0		; <i1> [#uses=1]
17	br i1 %3, label %bb5, label %bb
18
19bb:		; preds = %entry
20	%4 = tail call i32 (...) @xx() nounwind		; <i32> [#uses=1]
21	ret i32 %4
22
23bb5:		; preds = %entry
24	ret i32 0
25}
26
27declare i32 @xx(...)
28