1 ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=0 | FileCheck %s
2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
3 target triple = "i686-pc-linux-gnu"
5 define zeroext i16 @test1(i16 zeroext %x) nounwind {
10 ; CHECK: imull $63551, %eax, %eax
11 ; CHECK-NEXT: shrl $21, %eax
15 define zeroext i16 @test2(i8 signext %x, i16 zeroext %c) nounwind readnone ssp noredzone {
21 ; CHECK: imull $43691, %eax, %eax
22 ; CHECK-NEXT: shrl $17, %eax
26 define zeroext i8 @test3(i8 zeroext %x, i8 zeroext %c) nounwind readnone ssp noredzone {
32 ; CHECK: imull $171, %eax, %eax
33 ; CHECK-NEXT: shrb %ah
34 ; CHECK-NEXT: movzbl %ah, %eax
38 define signext i16 @test4(i16 signext %x) nounwind {
40 %div = sdiv i16 %x, 33 ; <i32> [#uses=1]
43 ; CHECK: imull $-1985, %ecx, %ecx
46 define i32 @test5(i32 %A) nounwind {
47 %tmp1 = udiv i32 %A, 1577682821 ; <i32> [#uses=1]
50 ; CHECK: movl $365384439, %eax