[llvm] 2b325f6 - [NFC][PowerPC] Add run lines to test DivRemPairsPass.

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 28 09:31:18 PDT 2020


Author: Esme-Yi
Date: 2020-06-28T16:26:05Z
New Revision: 2b325f69cac9979ec2fba1393e3e10541e144afa

URL: https://github.com/llvm/llvm-project/commit/2b325f69cac9979ec2fba1393e3e10541e144afa
DIFF: https://github.com/llvm/llvm-project/commit/2b325f69cac9979ec2fba1393e3e10541e144afa.diff

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

Added: 
    

Modified: 
    llvm/test/CodeGen/PowerPC/ppc64-P9-mod.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/ppc64-P9-mod.ll b/llvm/test/CodeGen/PowerPC/ppc64-P9-mod.ll
index c59bec655f9b..e3dcf8e5491e 100644
--- a/llvm/test/CodeGen/PowerPC/ppc64-P9-mod.ll
+++ b/llvm/test/CodeGen/PowerPC/ppc64-P9-mod.ll
@@ -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 
diff erent 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
 }
 
-


        


More information about the llvm-commits mailing list