71 lines · plain
1; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X862; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X643 4; On i686, this is expanded into a loop. On x86_64, this calls __udivti3.5define i65 @udiv65(i65 %a, i65 %b) nounwind {6; X86-LABEL: udiv65:7; X86-NOT: call8;9; X64-LABEL: udiv65:10; X64: # %bb.0:11; X64-NEXT: pushq %rax12; X64-NEXT: andl $1, %esi13; X64-NEXT: andl $1, %ecx14; X64-NEXT: callq __udivti3@PLT15; X64-NEXT: popq %rcx16; X64-NEXT: retq17 %res = udiv i65 %a, %b18 ret i65 %res19}20 21define i129 @udiv129(i129 %a, i129 %b) nounwind {22; X86-LABEL: udiv129:23; X86-NOT: call24;25; X64-LABEL: udiv129:26; X64-NOT: call27 %res = udiv i129 %a, %b28 ret i129 %res29}30 31define i129 @urem129(i129 %a, i129 %b) nounwind {32; X86-LABEL: urem129:33; X86-NOT: call34;35; X64-LABEL: urem129:36; X64-NOT: call37 %res = urem i129 %a, %b38 ret i129 %res39}40 41define i129 @sdiv129(i129 %a, i129 %b) nounwind {42; X86-LABEL: sdiv129:43; X86-NOT: call44;45; X64-LABEL: sdiv129:46; X64-NOT: call47 %res = sdiv i129 %a, %b48 ret i129 %res49}50 51define i129 @srem129(i129 %a, i129 %b) nounwind {52; X86-LABEL: srem129:53; X86-NOT: call54;55; X64-LABEL: srem129:56; X64-NOT: call57 %res = srem i129 %a, %b58 ret i129 %res59}60 61; Some higher sizes62define i257 @sdiv257(i257 %a, i257 %b) nounwind {63; X86-LABEL: sdiv257:64; X86-NOT: call65;66; X64-LABEL: sdiv257:67; X64-NOT: call68 %res = sdiv i257 %a, %b69 ret i257 %res70}71