[PATCH] D39592: [ARM|GlobalISel] : Adding legalizer tests for Thumb

Javed Absar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 6 10:30:03 PST 2017


javed.absar marked an inline comment as done.
javed.absar added a comment.

Thanks Diana for the review.



================
Comment at: test/CodeGen/ARM/GlobalISel/legalize-divmod.mir:5
+# RUN: llc -mtriple arm-linux-gnu -mattr=-hwdiv-arm -global-isel -run-pass=legalizer %s -o - | FileCheck %s  -check-prefixes=CHECK,SOFT,SOFT-DEFAULT
+# RUN: llc -mtriple thumbv7-linux-gnueabi -mattr=+hwdiv-arm -global-isel -run-pass=legalizer %s -o - | FileCheck %s -check-prefixes=CHECK,HWDIV
+# RUN: llc -mtriple thumbv7-linux-gnueabi -mattr=-hwdiv-arm -global-isel -run-pass=legalizer %s -o - | FileCheck %s -check-prefixes=CHECK,SOFT,SOFT-AEABI
----------------
rovka wrote:
> Thumb division is actually controlled by the hwdiv feature, not by hwdiv-arm. The test should expose that behaviour (you'll also need to update the LegalizerInfo code to make it pass, but it's going to be very similar to what already exists for ARM).
Thanks for this.


================
Comment at: test/CodeGen/ARM/GlobalISel/legalize-divmod.mir:53
+    ; SOFT-DAG: %r1 = COPY [[Y]]
+    ; SOFT-AEABI: BL $__aeabi_idiv, {{.*}}, implicit %r0, implicit %r1, implicit-def %r0
+    ; SOFT-AEABI: [[R:%[0-9]+]]:_(s32) = COPY %r0
----------------
rovka wrote:
> Hmm, this shouldn't be a BL for Thumb. You'll have to update ARMCallLowering to handle Thumb before we can test this properly.
Would you recommend then that I hold on to this patch till I have sorted out CallLowering for thumb in general. I don't see a change in ARMCallLowering.cpp for GlobalISel ARM, to understand what needs to be done for Thumb (maybe I am looking at the wrong place)


https://reviews.llvm.org/D39592





More information about the llvm-commits mailing list