Home | History | Annotate | Download | only in X86
      1 ; RUN: llc -march=x86 -mattr=+sse2 < %s | FileCheck %s
      2 
      3 define i32 @test1(i32 %x) {
      4   %div = sdiv exact i32 %x, 25
      5   ret i32 %div
      6 ; CHECK-LABEL: test1:
      7 ; CHECK: imull	$-1030792151, 4(%esp)
      8 ; CHECK-NEXT: ret
      9 }
     10 
     11 define i32 @test2(i32 %x) {
     12   %div = sdiv exact i32 %x, 24
     13   ret i32 %div
     14 ; CHECK-LABEL: test2:
     15 ; CHECK: sarl	$3
     16 ; CHECK-NEXT: imull	$-1431655765
     17 ; CHECK-NEXT: ret
     18 }
     19 
     20 define <4 x i32> @test3(<4 x i32> %x) {
     21   %div = sdiv exact <4 x i32> %x, <i32 24, i32 24, i32 24, i32 24>
     22   ret <4 x i32> %div
     23 ; CHECK-LABEL: test3:
     24 ; CHECK: psrad	$3,
     25 ; CHECK: pmuludq
     26 ; CHECK: pmuludq
     27 ; CHECK-NOT: psrad
     28 ; CHECK: ret
     29 }
     30