1 ; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s 2 3 define i32 @shl16sar15(i32 %a) #0 { 4 ; CHECK-LABEL: shl16sar15: 5 ; CHECK: # BB#0: 6 ; CHECK-NEXT: movswl {{[0-9]+}}(%esp), %eax 7 %1 = shl i32 %a, 16 8 %2 = ashr exact i32 %1, 15 9 ret i32 %2 10 } 11 12 define i32 @shl16sar17(i32 %a) #0 { 13 ; CHECK-LABEL: shl16sar17: 14 ; CHECK: # BB#0: 15 ; CHECK-NEXT: movswl {{[0-9]+}}(%esp), %eax 16 %1 = shl i32 %a, 16 17 %2 = ashr exact i32 %1, 17 18 ret i32 %2 19 } 20 21 define i32 @shl24sar23(i32 %a) #0 { 22 ; CHECK-LABEL: shl24sar23: 23 ; CHECK: # BB#0: 24 ; CHECK-NEXT: movsbl {{[0-9]+}}(%esp), %eax 25 %1 = shl i32 %a, 24 26 %2 = ashr exact i32 %1, 23 27 ret i32 %2 28 } 29 30 define i32 @shl24sar25(i32 %a) #0 { 31 ; CHECK-LABEL: shl24sar25: 32 ; CHECK: # BB#0: 33 ; CHECK-NEXT: movsbl {{[0-9]+}}(%esp), %eax 34 %1 = shl i32 %a, 24 35 %2 = ashr exact i32 %1, 25 36 ret i32 %2 37 } 38