diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-08-17 22:51:02 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-08-17 22:51:02 +0000 |
commit | 017bd57fceac3e96aac5519549b1a28e1754c790 (patch) | |
tree | 773770b99b2fad78dfc87758d92ceada3ceb37f7 /llvm/test | |
parent | 740be89f51a140bce0739f68813d97f5019562a2 (diff) | |
download | bcm5719-llvm-017bd57fceac3e96aac5519549b1a28e1754c790.tar.gz bcm5719-llvm-017bd57fceac3e96aac5519549b1a28e1754c790.zip |
ARM: improve RTABI 4.2 conformance on Linux
The set of functions defined in the RTABI was separated for no real reason.
This brings us closer to proper utilisation of the functions defined by the
RTABI. It also sets the ground for correctly emitting function calls to AEABI
functions on all AEABI conforming platforms.
The previously existing lie on the behaviour of __ldivmod and __uldivmod is
propagated as it is beyond the scope of the change.
The changes to the test are due to the fact that we now use the divmod functions
which return both the quotient and remainder and thus we no longer need to
invoke two functions on Linux (making it closer to EABI's behaviour).
llvm-svn: 215862
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/ARM/divmod-eabi.ll | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/llvm/test/CodeGen/ARM/divmod-eabi.ll b/llvm/test/CodeGen/ARM/divmod-eabi.ll index 7f72048d391..fb575cf0ff1 100644 --- a/llvm/test/CodeGen/ARM/divmod-eabi.ll +++ b/llvm/test/CodeGen/ARM/divmod-eabi.ll @@ -17,10 +17,7 @@ entry: ; EABI: __aeabi_idivmod ; EABI: mov [[div:r[0-9]+]], r0 ; EABI: mov [[rem:r[0-9]+]], r1 -; GNU: __aeabi_idiv -; GNU: mov [[sum:r[0-9]+]], r0 -; GNU: __modsi3 -; GNU: add [[sum]]{{.*}}r0 +; GNU: __aeabi_idivmod ; DARWIN: ___divsi3 ; DARWIN: mov [[sum:r[0-9]+]], r0 ; DARWIN: __modsi3 @@ -34,7 +31,7 @@ entry: %conv14 = trunc i32 %add13 to i16 ; EABI: add r0{{.*}}r1 ; EABI: sxth r0, r0 -; GNU: add r0{{.*}}[[sum]] +; GNU: add r0{{.*}} ; GNU: sxth r0, r0 ; DARWIN: add r0{{.*}}[[sum]] ; DARWIN: sxth r0, r0 @@ -51,10 +48,7 @@ entry: ; EABI: __aeabi_idivmod ; EABI: mov [[div:r[0-9]+]], r0 ; EABI: mov [[rem:r[0-9]+]], r1 -; GNU: __aeabi_idiv -; GNU: mov [[sum:r[0-9]+]], r0 -; GNU: __modsi3 -; GNU: add [[sum]]{{.*}}r0 +; GNU: __aeabi_idivmod ; DARWIN: ___divsi3 ; DARWIN: mov [[sum:r[0-9]+]], r0 ; DARWIN: __modsi3 @@ -66,7 +60,7 @@ entry: %add = add nsw i32 %rem, %div %add2 = add nsw i32 %add, %rem1 ; EABI: add r0{{.*}}r1 -; GNU: add r0{{.*}}[[sum]] +; GNU: add r0{{.*}} ; DARWIN: add r0{{.*}}[[sum]] ret i32 %add2 } @@ -79,10 +73,7 @@ entry: %div = udiv i32 %a, %b %rem = urem i32 %a, %b ; EABI: __aeabi_uidivmod -; GNU: __aeabi_uidiv -; GNU: mov [[sum:r[0-9]+]], r0 -; GNU: __umodsi3 -; GNU: add [[sum]]{{.*}}r0 +; GNU: __aeabi_uidivmod ; DARWIN: ___udivsi3 ; DARWIN: mov [[sum:r[0-9]+]], r0 ; DARWIN: __umodsi3 @@ -94,7 +85,7 @@ entry: %add = add nuw i32 %rem, %div %add2 = add nuw i32 %add, %rem1 ; EABI: add r0{{.*}}r1 -; GNU: add r0{{.*}}[[sum]] +; GNU: add r0{{.*}} ; DARWIN: add r0{{.*}}[[sum]] ret i32 %add2 } @@ -131,15 +122,13 @@ entry: %div = sdiv i32 %a, %b %rem = srem i32 %a, %b ; EABI: __aeabi_idivmod -; GNU: __aeabi_idiv -; GNU: mov [[sum:r[0-9]+]], r0 -; GNU: __modsi3 +; GNU: __aeabi_idivmod ; DARWIN: ___divsi3 ; DARWIN: mov [[sum:r[0-9]+]], r0 ; DARWIN: __modsi3 %add = add nsw i32 %rem, %div -; EABI: add r0{{.*}}r1 -; GNU: add r0{{.*}}[[sum]] +; EABI: add r0{{.*}}r1 +; GNU: add r0{{.*}}r1 ; DARWIN: add r0{{.*}}[[sum]] ret i32 %add } |