[NFC][PowerPC] Add run lines to test DivRemPairsPass.

This commit is contained in:
Esme-Yi 2020-06-28 16:26:05 +00:00
parent 8758e14c6f
commit 2b325f69ca
1 changed files with 14 additions and 4 deletions

View File

@ -1,6 +1,12 @@
; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr9 -verify-machineinstrs | FileCheck %s
; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-PWR8 -implicit-check-not mod[us][wd]
; RUN: opt < %s -div-rem-pairs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 | \
; RUN: llc -verify-machineinstrs | FileCheck %s -check-prefix=CHECK-DRP
; RUN: opt < %s -div-rem-pairs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr9 | \
; RUN: llc -verify-machineinstrs | FileCheck %s -check-prefix=CHECK-DRP
; RUN: opt < %s -div-rem-pairs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | \
; RUN: llc -verify-machineinstrs | FileCheck %s -check-prefix=CHECK-PWR8 -implicit-check-not mod[us][wd]
@mod_resultsw = local_unnamed_addr global i32 0, align 4
@mod_resultud = local_unnamed_addr global i64 0, align 8
@ -232,9 +238,6 @@ entry:
}
; Function Attrs: norecurse nounwind
; FIXME On power 9 this test will still produce modsw because the divide is in
; a different block than the remainder. Due to the nature of the SDAG we cannot
; see the div in the other block.
define void @blocks_modulo_div_sw(i32 signext %a, i32 signext %b, i32 signext %c) local_unnamed_addr {
entry:
%div = sdiv i32 %a, %b
@ -253,6 +256,14 @@ if.end: ; preds = %if.then, %entry
; CHECK: div
; CHECK: modsw {{[0-9]+}}, 3, 4
; CHECK: blr
; CHECK-DRP-LABEL: blocks_modulo_div_sw
; CHECK-DRP-NOT: modsw
; CHECK-DRP: div
; CHECK-DRP-NOT: modsw
; CHECK-DRP: mull
; CHECK-DRP-NOT: modsw
; CHECK-DRP: sub
; CHECK-DRP: blr
; CHECK-PWR8-LABEL: blocks_modulo_div_sw
; CHECK-PWR8: div
; CHECK-PWR8: mull
@ -260,4 +271,3 @@ if.end: ; preds = %if.then, %entry
; CHECK-PWR8: blr
}