| ; RUN: llc < %s -mcpu=atom -mtriple=i686-linux -march=x86-64 | FileCheck %s |
| ; Additional tests for 64-bit divide bypass |
| define i64 @Test_get_quotient(i64 %a, i64 %b) nounwind { |
| ; CHECK: Test_get_quotient: |
| ; CHECK-NEXT: testq $-65536, %rcx |
| %result = sdiv i64 %a, %b |
| define i64 @Test_get_remainder(i64 %a, i64 %b) nounwind { |
| ; CHECK: Test_get_remainder: |
| ; CHECK-NEXT: testq $-65536, %rcx |
| %result = srem i64 %a, %b |
| define i64 @Test_get_quotient_and_remainder(i64 %a, i64 %b) nounwind { |
| ; CHECK: Test_get_quotient_and_remainder: |
| ; CHECK-NEXT: testq $-65536, %rcx |
| %resultdiv = sdiv i64 %a, %b |
| %resultrem = srem i64 %a, %b |
| %result = add i64 %resultdiv, %resultrem |