1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s --check-prefixes=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s --check-prefixes=X64
5 define i64 @test1(i64 %x) nounwind {
7 ; X86: # %bb.0: # %entry
8 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
9 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
10 ; X86-NEXT: movl %ecx, %edx
11 ; X86-NEXT: shldl $9, %eax, %edx
12 ; X86-NEXT: shldl $9, %ecx, %eax
16 ; X64: # %bb.0: # %entry
17 ; X64-NEXT: movq %rdi, %rax
18 ; X64-NEXT: rolq $9, %rax
21 %tmp2 = lshr i64 %x, 55 ; <i64> [#uses=1]
22 %tmp4 = shl i64 %x, 9 ; <i64> [#uses=1]
23 %tmp5 = or i64 %tmp2, %tmp4 ; <i64> [#uses=1]
27 define i64 @test2(i32 %x) nounwind {
29 ; X86: # %bb.0: # %entry
30 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
31 ; X86-NEXT: roll $10, %eax
32 ; X86-NEXT: xorl %edx, %edx
36 ; X64: # %bb.0: # %entry
37 ; X64-NEXT: movl %edi, %eax
38 ; X64-NEXT: roll $10, %eax
41 %tmp2 = lshr i32 %x, 22 ; <i32> [#uses=1]
42 %tmp4 = shl i32 %x, 10 ; <i32> [#uses=1]
43 %tmp5 = or i32 %tmp2, %tmp4 ; <i32> [#uses=1]
44 %tmp56 = zext i32 %tmp5 to i64 ; <i64> [#uses=1]