brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · ac29958 Raw
48 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s --check-prefixes=X863; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s --check-prefixes=X644 5define i64 @test1(i64 %x) nounwind  {6; X86-LABEL: test1:7; X86:       # %bb.0: # %entry8; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx9; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx10; X86-NEXT:    movl %ecx, %eax11; X86-NEXT:    shldl $9, %edx, %eax12; X86-NEXT:    shldl $9, %ecx, %edx13; X86-NEXT:    retl14;15; X64-LABEL: test1:16; X64:       # %bb.0: # %entry17; X64-NEXT:    movq %rdi, %rax18; X64-NEXT:    rolq $9, %rax19; X64-NEXT:    retq20entry: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]24	ret i64 %tmp525}26 27define i64 @test2(i32 %x) nounwind  {28; X86-LABEL: test2:29; X86:       # %bb.0: # %entry30; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax31; X86-NEXT:    roll $10, %eax32; X86-NEXT:    xorl %edx, %edx33; X86-NEXT:    retl34;35; X64-LABEL: test2:36; X64:       # %bb.0: # %entry37; X64-NEXT:    movl %edi, %eax38; X64-NEXT:    roll $10, %eax39; X64-NEXT:    retq40entry: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]45	ret i64 %tmp5646}47 48