xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/sext-subreg.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1; RUN: llc < %s -march=x86-64 | FileCheck %s
2; rdar://7529457
3
4define i64 @t(i64 %A, i64 %B, i32* %P, i64 *%P2) nounwind {
5; CHECK-LABEL: 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  store volatile i32 %D, i32* %P
12  %E = shl i64 %C, 32
13  %F = ashr i64 %E, 32
14  store volatile i64 %F, i64 *%P2
15  store volatile i32 %D, i32* %P
16  ret i64 undef
17}
18