109 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-- | FileCheck %s --check-prefix=i6863; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefix=x86_644 5define i32 @test(i32 %f12) nounwind {6; i686-LABEL: test:7; i686: # %bb.0:8; i686-NEXT: movsbl {{[0-9]+}}(%esp), %eax9; i686-NEXT: retl10;11; x86_64-LABEL: test:12; x86_64: # %bb.0:13; x86_64-NEXT: shrl $16, %edi14; x86_64-NEXT: movsbl %dil, %eax15; x86_64-NEXT: retq16 %tmp7.25 = lshr i32 %f12, 1617 %tmp7.26 = trunc i32 %tmp7.25 to i818 %tmp78.2 = sext i8 %tmp7.26 to i3219 ret i32 %tmp78.220}21 22define i32 @test2(i32 %f12) nounwind {23; i686-LABEL: test2:24; i686: # %bb.0:25; i686-NEXT: movsbl {{[0-9]+}}(%esp), %eax26; i686-NEXT: retl27;28; x86_64-LABEL: test2:29; x86_64: # %bb.0:30; x86_64-NEXT: shrl $16, %edi31; x86_64-NEXT: movsbl %dil, %eax32; x86_64-NEXT: retq33 %f11 = shl i32 %f12, 834 %tmp7.25 = ashr i32 %f11, 2435 ret i32 %tmp7.2536}37 38define i32 @test3(i32 %f12) nounwind {39; i686-LABEL: test3:40; i686: # %bb.0:41; i686-NEXT: movl {{[0-9]+}}(%esp), %eax42; i686-NEXT: shrl $11, %eax43; i686-NEXT: movsbl %al, %eax44; i686-NEXT: retl45;46; x86_64-LABEL: test3:47; x86_64: # %bb.0:48; x86_64-NEXT: shrl $11, %edi49; x86_64-NEXT: movsbl %dil, %eax50; x86_64-NEXT: retq51 %f11 = shl i32 %f12, 1352 %tmp7.25 = ashr i32 %f11, 2453 ret i32 %tmp7.2554}55 56define i64 @test4(i64 %f12) nounwind {57; i686-LABEL: test4:58; i686: # %bb.0:59; i686-NEXT: movl {{[0-9]+}}(%esp), %eax60; i686-NEXT: movl %eax, %edx61; i686-NEXT: sarl $31, %edx62; i686-NEXT: retl63;64; x86_64-LABEL: test4:65; x86_64: # %bb.0:66; x86_64-NEXT: movslq %edi, %rax67; x86_64-NEXT: retq68 %f11 = shl i64 %f12, 3269 %tmp7.25 = ashr i64 %f11, 3270 ret i64 %tmp7.2571}72 73define i16 @test5(i16 %f12) nounwind {74; i686-LABEL: test5:75; i686: # %bb.0:76; i686-NEXT: movzwl {{[0-9]+}}(%esp), %eax77; i686-NEXT: shrl $6, %eax78; i686-NEXT: movsbl %al, %eax79; i686-NEXT: # kill: def $ax killed $ax killed $eax80; i686-NEXT: retl81;82; x86_64-LABEL: test5:83; x86_64: # %bb.0:84; x86_64-NEXT: shrl $6, %edi85; x86_64-NEXT: movsbl %dil, %eax86; x86_64-NEXT: # kill: def $ax killed $ax killed $eax87; x86_64-NEXT: retq88 %f11 = shl i16 %f12, 289 %tmp7.25 = ashr i16 %f11, 890 ret i16 %tmp7.2591}92 93define i16 @test6(i16 %f12) nounwind {94; i686-LABEL: test6:95; i686: # %bb.0:96; i686-NEXT: movsbl {{[0-9]+}}(%esp), %eax97; i686-NEXT: # kill: def $ax killed $ax killed $eax98; i686-NEXT: retl99;100; x86_64-LABEL: test6:101; x86_64: # %bb.0:102; x86_64-NEXT: movsbl %dil, %eax103; x86_64-NEXT: # kill: def $ax killed $ax killed $eax104; x86_64-NEXT: retq105 %f11 = shl i16 %f12, 8106 %tmp7.25 = ashr i16 %f11, 8107 ret i16 %tmp7.25108}109