brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 45b9d6a Raw
123 lines · plain
1; RUN: llc -mtriple=x86_64-none-linux -fast-isel -fast-isel-abort=1 -verify-machineinstrs < %s | FileCheck %s2; RUN: llc -mtriple=i686-none-linux -fast-isel -fast-isel-abort=1 -verify-machineinstrs < %s | FileCheck %s3 4define i8 @test_sdiv8(i8 %dividend, i8 %divisor) nounwind {5entry:6  %result = sdiv i8 %dividend, %divisor7  ret i8 %result8}9 10; CHECK-LABEL: test_sdiv8:11; CHECK: movsbl12; CHECK: idivb13 14define i8 @test_srem8(i8 %dividend, i8 %divisor) nounwind {15entry:16  %result = srem i8 %dividend, %divisor17  ret i8 %result18}19 20; CHECK-LABEL: test_srem8:21; CHECK: movsbl22; CHECK: idivb23 24define i8 @test_udiv8(i8 %dividend, i8 %divisor) nounwind {25entry:26  %result = udiv i8 %dividend, %divisor27  ret i8 %result28}29 30; CHECK-LABEL: test_udiv8:31; CHECK: movzbl32; CHECK: divb33 34define i8 @test_urem8(i8 %dividend, i8 %divisor) nounwind {35entry:36  %result = urem i8 %dividend, %divisor37  ret i8 %result38}39 40; CHECK-LABEL: test_urem8:41; CHECK: movzbl42; CHECK: divb43 44define i16 @test_sdiv16(i16 %dividend, i16 %divisor) nounwind {45entry:46  %result = sdiv i16 %dividend, %divisor47  ret i16 %result48}49 50; CHECK-LABEL: test_sdiv16:51; CHECK: cwtd52; CHECK: idivw53 54define i16 @test_srem16(i16 %dividend, i16 %divisor) nounwind {55entry:56  %result = srem i16 %dividend, %divisor57  ret i16 %result58}59 60; CHECK-LABEL: test_srem16:61; CHECK: cwtd62; CHECK: idivw63 64define i16 @test_udiv16(i16 %dividend, i16 %divisor) nounwind {65entry:66  %result = udiv i16 %dividend, %divisor67  ret i16 %result68}69 70; CHECK-LABEL: test_udiv16:71; CHECK: xorl72; CHECK: divw73 74define i16 @test_urem16(i16 %dividend, i16 %divisor) nounwind {75entry:76  %result = urem i16 %dividend, %divisor77  ret i16 %result78}79 80; CHECK-LABEL: test_urem16:81; CHECK: xorl82; CHECK: divw83 84define i32 @test_sdiv32(i32 %dividend, i32 %divisor) nounwind {85entry:86  %result = sdiv i32 %dividend, %divisor87  ret i32 %result88}89 90; CHECK-LABEL: test_sdiv32:91; CHECK: cltd92; CHECK: idivl93 94define i32 @test_srem32(i32 %dividend, i32 %divisor) nounwind {95entry:96  %result = srem i32 %dividend, %divisor97  ret i32 %result98}99 100; CHECK-LABEL: test_srem32:101; CHECK: cltd102; CHECK: idivl103 104define i32 @test_udiv32(i32 %dividend, i32 %divisor) nounwind {105entry:106  %result = udiv i32 %dividend, %divisor107  ret i32 %result108}109 110; CHECK-LABEL: test_udiv32:111; CHECK: xorl112; CHECK: divl113 114define i32 @test_urem32(i32 %dividend, i32 %divisor) nounwind {115entry:116  %result = urem i32 %dividend, %divisor117  ret i32 %result118}119 120; CHECK-LABEL: test_urem32:121; CHECK: xorl122; CHECK: divl123