1 ; RUN: llc -mtriple x86_64-linux -mcpu core2 -verify-machineinstrs %s -o - | FileCheck %s
2 define i32 @f(i1 %foo, i16* %tm_year2, i8* %bar, i16 %zed, i32 %zed2) {
4 br i1 %foo, label %return, label %if.end
7 %rem = srem i32 %zed2, 100
8 %conv3 = trunc i32 %rem to i16
9 store i16 %conv3, i16* %tm_year2
10 %sext = shl i32 %rem, 16
11 %conv5 = ashr exact i32 %sext, 16
12 %div = sdiv i32 %conv5, 10
13 %conv6 = trunc i32 %div to i8
14 store i8 %conv6, i8* %bar
18 %retval.0 = phi i32 [ 0, %if.end ], [ -1, %entry ]
22 ; We were miscompiling this and using %ax instead of %cx in the movw
23 ; in the following sequence:
28 ; We can't produce the above sequence without special SD-level
29 ; heuristics. Now we produce this:
30 ; CHECK: movw %ax, (%rsi)