1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-- | FileCheck %s
3
4define i32 @test1(i64 %a) nounwind {
5; CHECK-LABEL: test1:
6; CHECK:       # %bb.0:
7; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %eax
8; CHECK-NEXT:    shrl %eax
9; CHECK-NEXT:    cwtl
10; CHECK-NEXT:    retl
11        %tmp29 = lshr i64 %a, 24                ; <i64> [#uses=1]
12        %tmp23 = trunc i64 %tmp29 to i32                ; <i32> [#uses=1]
13        %tmp410 = lshr i32 %tmp23, 9            ; <i32> [#uses=1]
14        %tmp45 = trunc i32 %tmp410 to i16               ; <i16> [#uses=1]
15        %tmp456 = sext i16 %tmp45 to i32                ; <i32> [#uses=1]
16        ret i32 %tmp456
17}
18
19