blob: f18eef7d1970ef4bbdcd33068f1a19f054435552 [file] [log] [blame]
Dan Gohman97121ba2009-04-08 00:15:30 +00001; RUN: llvm-as < %s | llc -march=x86-64
2
3define i64 @foo() nounwind {
4entry:
5 %t0 = load i32* null, align 8
6 switch i32 %t0, label %bb65 [
7 i32 16, label %bb
8 i32 12, label %bb56
9 ]
10
11bb:
12 br label %bb65
13
14bb56:
15 unreachable
16
17bb65:
18 %a = phi i64 [ 0, %bb ], [ 0, %entry ]
19 tail call void asm "", "{cx}"(i64 %a) nounwind
20 %t15 = and i64 %a, 4294967295
21 ret i64 %t15
22}
23
24define i64 @bar(i64 %t0) nounwind {
25 call void asm "", "{cx}"(i64 0) nounwind
26 %t1 = sub i64 0, %t0
27 %t2 = and i64 %t1, 4294967295
28 ret i64 %t2
29}