[PATCH] D21926: [ARM] Honour ABI for rem under -O0 for EABI, GNUEABI, Android and Musl

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 1 08:56:35 PDT 2016


compnerd added inline comments.

================
Comment at: test/CodeGen/ARM/divmod-eabi.ll:7
@@ -4,2 +6,3 @@
 ; RUN: llc -mtriple armv7-linux-androideabi %s -o - | FileCheck %s --check-prefix=EABI
+; RUN: llc -mtriple armv7-linux-androideabi %s -o - -O0 -optimize-regalloc | FileCheck %s --check-prefix=EABI-2CALLS
 ; RUN: llc -mtriple armv7-linux-gnueabi %s -o - | FileCheck %s --check-prefix=EABI
----------------
I think naming the prefix something more pertinent to what is being tested is helpful.  How about `EABI-RAOPT` ?

================
Comment at: test/CodeGen/ARM/divmod-eabi.ll:16
@@ -9,2 +15,3 @@
 ; RUN: llc -mtriple armv7-apple-darwin-eabi %s -o - | FileCheck %s --check-prefix=DARWIN
+; RUN: llc -mtriple armv7-apple-darwin-eabi %s -o - -O0 -optimize-regalloc | FileCheck %s --check-prefix=DARWIN-O0
 
----------------
Please add a test for non-EABI targets as do not get the EABI library calls..  How about something like `thumbv7-windows`?

================
Comment at: test/CodeGen/ARM/divmod-eabi.ll:43
@@ -26,1 +42,3 @@
+; DARWIN-O0: __modsi3
+; DARWIN-O0: mov [[rem:r[0-9]+]], r0
   %rem8 = srem i32 %conv1, %conv
----------------
Am I mistaken or couldnt these cases be collapsed?  The idea is that on darwin targets, the calls are identical across the two?  The math would be different, but you could have a single check for the calls in both cases.


http://reviews.llvm.org/D21926





More information about the llvm-commits mailing list