blob: b2b9f8121fd6f0dd28412b74c580f0712ba49354 [file] [log] [blame]
Evan Chengeb485c92010-01-13 00:30:23 +00001; RUN: llc < %s -march=x86-64 | FileCheck %s
2; rdar://7529457
Evan Chengeb485c92010-01-13 00:30:23 +00003
4define i64 @t(i64 %A, i64 %B, i32* %P, i64 *%P2) nounwind {
5; CHECK: t:
6; CHECK: movslq %e{{.*}}, %rax
7; CHECK: movq %rax
8; CHECK: movl %eax
9 %C = add i64 %A, %B
10 %D = trunc i64 %C to i32
11 volatile store i32 %D, i32* %P
12 %E = shl i64 %C, 32
13 %F = ashr i64 %E, 32
14 volatile store i64 %F, i64 *%P2
15 volatile store i32 %D, i32* %P
16 ret i64 undef
17}