From 0543dab791a162d4c98e2e993894779faa0ae8ab Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Mon, 14 Apr 2014 16:00:28 +0000 Subject: [PATCH] [mips] MIPS-IV is broadly the same as MIPS64 so duplicate all -mcpu=mips64 tests with -mcpu=mips4 as a starting point Summary: Two exceptions to this: test/CodeGen/Mips/octeon.ll test/CodeGen/Mips/octeon_popcnt.ll these test extensions to MIPS64 One test is altered for MIPS-IV: test/CodeGen/Mips/mips64countleading.ll Tests dclo/dclz which were added in MIPS64. The MIPS-IV version tests that dclo/dclz are not emitted. Four tests fail and are not in this patch: test/CodeGen/Mips/abicalls.ll test/CodeGen/Mips/fcopysign-f32-f64.ll test/CodeGen/Mips/fcopysign.ll test/CodeGen/Mips/stack-alignment.ll Depends on D3343 Reviewers: matheusalmeida, vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D3344 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206185 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/Mips/2010-07-20-Switch.ll | 8 ++++++-- test/CodeGen/Mips/cmov.ll | 2 +- test/CodeGen/Mips/eh-dwarf-cfa.ll | 2 ++ test/CodeGen/Mips/eh-return64.ll | 1 + test/CodeGen/Mips/elf_eflags.ll | 3 +++ test/CodeGen/Mips/int-to-float-conversion.ll | 1 + test/CodeGen/Mips/largeimmprinting.ll | 4 +++- test/CodeGen/Mips/longbranch.ll | 1 + test/CodeGen/Mips/mips64-f128.ll | 4 +++- test/CodeGen/Mips/mips64countleading.ll | 11 ++++++++--- test/CodeGen/Mips/mips64directive.ll | 1 + test/CodeGen/Mips/mips64ext.ll | 3 ++- test/CodeGen/Mips/mips64fpimm0.ll | 1 + test/CodeGen/Mips/mips64fpldst.ll | 2 ++ test/CodeGen/Mips/mips64imm.ll | 1 + test/CodeGen/Mips/mips64intldst.ll | 2 ++ test/CodeGen/Mips/mips64lea.ll | 1 + test/CodeGen/Mips/mips64load-store-left-right.ll | 2 ++ test/CodeGen/Mips/optimize-fp-math.ll | 1 + test/CodeGen/Mips/remat-immed-load.ll | 1 + test/CodeGen/Mips/sint-fp-store_pattern.ll | 1 + 21 files changed, 44 insertions(+), 9 deletions(-) diff --git a/test/CodeGen/Mips/2010-07-20-Switch.ll b/test/CodeGen/Mips/2010-07-20-Switch.ll index 38d7b7e2559..5c840775cf9 100644 --- a/test/CodeGen/Mips/2010-07-20-Switch.ll +++ b/test/CodeGen/Mips/2010-07-20-Switch.ll @@ -2,10 +2,14 @@ ; RUN: FileCheck %s -check-prefix=STATIC-O32 ; RUN: llc < %s -march=mips -relocation-model=pic | \ ; RUN: FileCheck %s -check-prefix=PIC-O32 +; RUN: llc < %s -march=mips64 -relocation-model=pic -mcpu=mips4 | \ +; RUN: FileCheck %s -check-prefix=N64 +; RUN: llc < %s -march=mips64 -relocation-model=static -mcpu=mips4 | \ +; RUN: FileCheck %s -check-prefix=N64 ; RUN: llc < %s -march=mips64 -relocation-model=pic -mcpu=mips64 | \ -; RUN: FileCheck %s -check-prefix=N64 +; RUN: FileCheck %s -check-prefix=N64 ; RUN: llc < %s -march=mips64 -relocation-model=static -mcpu=mips64 | \ -; RUN: FileCheck %s -check-prefix=N64 +; RUN: FileCheck %s -check-prefix=N64 define i32 @main() nounwind readnone { entry: diff --git a/test/CodeGen/Mips/cmov.ll b/test/CodeGen/Mips/cmov.ll index b19a098a460..b9732eb6635 100644 --- a/test/CodeGen/Mips/cmov.ll +++ b/test/CodeGen/Mips/cmov.ll @@ -1,7 +1,7 @@ ; RUN: llc -march=mips < %s | FileCheck %s -check-prefix=O32 ; RUN: llc -march=mips -regalloc=basic < %s | FileCheck %s -check-prefix=O32 -; RUN: llc -march=mips64el -mcpu=mips64 -mattr=n64 < %s | FileCheck %s -check-prefix=N64 ; RUN: llc -march=mips64el -mcpu=mips4 -mattr=n64 < %s | FileCheck %s -check-prefix=N64 +; RUN: llc -march=mips64el -mcpu=mips64 -mattr=n64 < %s | FileCheck %s -check-prefix=N64 @i1 = global [3 x i32] [i32 1, i32 2, i32 3], align 4 @i3 = common global i32* null, align 4 diff --git a/test/CodeGen/Mips/eh-dwarf-cfa.ll b/test/CodeGen/Mips/eh-dwarf-cfa.ll index 3a21332b5c5..6554974bf84 100644 --- a/test/CodeGen/Mips/eh-dwarf-cfa.ll +++ b/test/CodeGen/Mips/eh-dwarf-cfa.ll @@ -1,4 +1,6 @@ ; RUN: llc -march=mipsel -mcpu=mips32 < %s | FileCheck %s +; RUN: llc -march=mips64el -mcpu=mips4 < %s | \ +; RUN: FileCheck %s -check-prefix=CHECK-MIPS64 ; RUN: llc -march=mips64el -mcpu=mips64 < %s | \ ; RUN: FileCheck %s -check-prefix=CHECK-MIPS64 diff --git a/test/CodeGen/Mips/eh-return64.ll b/test/CodeGen/Mips/eh-return64.ll index 32fc5e61899..8c5af5081c9 100644 --- a/test/CodeGen/Mips/eh-return64.ll +++ b/test/CodeGen/Mips/eh-return64.ll @@ -1,3 +1,4 @@ +; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s declare void @llvm.eh.return.i64(i64, i8*) diff --git a/test/CodeGen/Mips/elf_eflags.ll b/test/CodeGen/Mips/elf_eflags.ll index 336ed7ba8be..00d8584fdad 100644 --- a/test/CodeGen/Mips/elf_eflags.ll +++ b/test/CodeGen/Mips/elf_eflags.ll @@ -23,6 +23,9 @@ ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE32R2-MICROMIPS %s ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | FileCheck -check-prefix=CHECK-LE32R2-MICROMIPS_PIC %s +; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips4 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64 %s +; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips4 %s -o - | FileCheck -check-prefix=CHECK-LE64_PIC %s + ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64 %s ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 %s -o - | FileCheck -check-prefix=CHECK-LE64_PIC %s ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64R2 %s diff --git a/test/CodeGen/Mips/int-to-float-conversion.ll b/test/CodeGen/Mips/int-to-float-conversion.ll index c2baf442f4a..d226b48cb20 100644 --- a/test/CodeGen/Mips/int-to-float-conversion.ll +++ b/test/CodeGen/Mips/int-to-float-conversion.ll @@ -1,4 +1,5 @@ ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32 +; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s -check-prefix=64 ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s -check-prefix=64 @i1 = global [3 x i32] [i32 1, i32 2, i32 3], align 4 diff --git a/test/CodeGen/Mips/largeimmprinting.ll b/test/CodeGen/Mips/largeimmprinting.ll index 09fee3d9063..0e9c91fb46d 100644 --- a/test/CodeGen/Mips/largeimmprinting.ll +++ b/test/CodeGen/Mips/largeimmprinting.ll @@ -1,6 +1,8 @@ ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32 +; RUN: llc -march=mips64el -mcpu=mips4 -mattr=n64 < %s | \ +; RUN: FileCheck %s -check-prefix=64 ; RUN: llc -march=mips64el -mcpu=mips64 -mattr=n64 < %s | \ -; RUN: FileCheck %s -check-prefix=64 +; RUN: FileCheck %s -check-prefix=64 %struct.S1 = type { [65536 x i8] } diff --git a/test/CodeGen/Mips/longbranch.ll b/test/CodeGen/Mips/longbranch.ll index af192d0e921..39e32bde4ff 100644 --- a/test/CodeGen/Mips/longbranch.ll +++ b/test/CodeGen/Mips/longbranch.ll @@ -1,4 +1,5 @@ ; RUN: llc -march=mipsel -force-mips-long-branch -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=O32 +; RUN: llc -march=mips64el -mcpu=mips4 -mattr=n64 -force-mips-long-branch -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=N64 ; RUN: llc -march=mips64el -mcpu=mips64 -mattr=n64 -force-mips-long-branch -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=N64 @g0 = external global i32 diff --git a/test/CodeGen/Mips/mips64-f128.ll b/test/CodeGen/Mips/mips64-f128.ll index dc8bbfdd5ba..4d590b641f4 100644 --- a/test/CodeGen/Mips/mips64-f128.ll +++ b/test/CodeGen/Mips/mips64-f128.ll @@ -1,5 +1,7 @@ +; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips4 -soft-float -O1 \ +; RUN: -disable-mips-delay-filler < %s | FileCheck %s ; RUN: llc -mtriple=mips64el-unknown-unknown -mcpu=mips64 -soft-float -O1 \ -; RUN: -disable-mips-delay-filler < %s | FileCheck %s +; RUN: -disable-mips-delay-filler < %s | FileCheck %s @gld0 = external global fp128 @gld1 = external global fp128 diff --git a/test/CodeGen/Mips/mips64countleading.ll b/test/CodeGen/Mips/mips64countleading.ll index b2b67e51ade..252f323fe1a 100644 --- a/test/CodeGen/Mips/mips64countleading.ll +++ b/test/CodeGen/Mips/mips64countleading.ll @@ -1,8 +1,11 @@ -; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s +; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck -check-prefix=CHECK -check-prefix=MIPS4 %s +; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck -check-prefix=CHECK -check-prefix=MIPS64 %s define i64 @t1(i64 %X) nounwind readnone { entry: -; CHECK: dclz +; CHECK-LABEL: t1: +; MIPS4-NOT: dclz +; MIPS64: dclz %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %X, i1 true) ret i64 %tmp1 } @@ -11,7 +14,9 @@ declare i64 @llvm.ctlz.i64(i64, i1) nounwind readnone define i64 @t3(i64 %X) nounwind readnone { entry: -; CHECK: dclo +; CHECK-LABEL: t3: +; MIPS4-NOT: dclo +; MIPS64: dclo %neg = xor i64 %X, -1 %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %neg, i1 true) ret i64 %tmp1 diff --git a/test/CodeGen/Mips/mips64directive.ll b/test/CodeGen/Mips/mips64directive.ll index fa81b729e9c..3d95f519bc6 100644 --- a/test/CodeGen/Mips/mips64directive.ll +++ b/test/CodeGen/Mips/mips64directive.ll @@ -1,3 +1,4 @@ +; RUN: llc < %s -march=mips64el -mcpu=mips4 -mattr=n64 | FileCheck %s ; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=n64 | FileCheck %s @gl = global i64 1250999896321, align 8 diff --git a/test/CodeGen/Mips/mips64ext.ll b/test/CodeGen/Mips/mips64ext.ll index 02a35f8e6ed..22ea0eb7769 100644 --- a/test/CodeGen/Mips/mips64ext.ll +++ b/test/CodeGen/Mips/mips64ext.ll @@ -1,4 +1,5 @@ -; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=n64 | FileCheck %s +; RUN: llc < %s -march=mips64el -mcpu=mips4 -mattr=n64 | FileCheck %s +; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=n64 | FileCheck %s define i64 @zext64_32(i32 %a) nounwind readnone { entry: diff --git a/test/CodeGen/Mips/mips64fpimm0.ll b/test/CodeGen/Mips/mips64fpimm0.ll index 17716da0c67..19e076d1ecd 100644 --- a/test/CodeGen/Mips/mips64fpimm0.ll +++ b/test/CodeGen/Mips/mips64fpimm0.ll @@ -1,3 +1,4 @@ +; RUN: llc < %s -march=mips64el -mcpu=mips4 -mattr=n64 | FileCheck %s ; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=n64 | FileCheck %s define double @foo1() nounwind readnone { diff --git a/test/CodeGen/Mips/mips64fpldst.ll b/test/CodeGen/Mips/mips64fpldst.ll index 368ab83514f..2f42270b645 100644 --- a/test/CodeGen/Mips/mips64fpldst.ll +++ b/test/CodeGen/Mips/mips64fpldst.ll @@ -1,3 +1,5 @@ +; RUN: llc < %s -march=mips64el -mcpu=mips4 -mattr=-n64,n64 | FileCheck %s -check-prefix=CHECK-N64 +; RUN: llc < %s -march=mips64el -mcpu=mips4 -mattr=-n64,n32 | FileCheck %s -check-prefix=CHECK-N32 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=-n64,n64 | FileCheck %s -check-prefix=CHECK-N64 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=-n64,n32 | FileCheck %s -check-prefix=CHECK-N32 diff --git a/test/CodeGen/Mips/mips64imm.ll b/test/CodeGen/Mips/mips64imm.ll index 1fc8636c480..c3fc61df42b 100644 --- a/test/CodeGen/Mips/mips64imm.ll +++ b/test/CodeGen/Mips/mips64imm.ll @@ -1,3 +1,4 @@ +; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s define i32 @foo1() nounwind readnone { diff --git a/test/CodeGen/Mips/mips64intldst.ll b/test/CodeGen/Mips/mips64intldst.ll index 62244f60b00..c3607baeefe 100644 --- a/test/CodeGen/Mips/mips64intldst.ll +++ b/test/CodeGen/Mips/mips64intldst.ll @@ -1,3 +1,5 @@ +; RUN: llc < %s -march=mips64el -mcpu=mips4 -mattr=-n64,n64 | FileCheck %s -check-prefix=CHECK-N64 +; RUN: llc < %s -march=mips64el -mcpu=mips4 -mattr=-n64,n32 | FileCheck %s -check-prefix=CHECK-N32 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=-n64,n64 | FileCheck %s -check-prefix=CHECK-N64 ; RUN: llc < %s -march=mips64el -mcpu=mips64 -mattr=-n64,n32 | FileCheck %s -check-prefix=CHECK-N32 diff --git a/test/CodeGen/Mips/mips64lea.ll b/test/CodeGen/Mips/mips64lea.ll index 54d504f9226..e866b217a59 100644 --- a/test/CodeGen/Mips/mips64lea.ll +++ b/test/CodeGen/Mips/mips64lea.ll @@ -1,3 +1,4 @@ +; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s define void @foo3() nounwind { diff --git a/test/CodeGen/Mips/mips64load-store-left-right.ll b/test/CodeGen/Mips/mips64load-store-left-right.ll index 4561429ad8b..c9ba467e6c1 100644 --- a/test/CodeGen/Mips/mips64load-store-left-right.ll +++ b/test/CodeGen/Mips/mips64load-store-left-right.ll @@ -1,3 +1,5 @@ +; RUN: llc -march=mips64el -mcpu=mips4 -mattr=n64 < %s | FileCheck -check-prefix=EL %s +; RUN: llc -march=mips64 -mcpu=mips4 -mattr=n64 < %s | FileCheck -check-prefix=EB %s ; RUN: llc -march=mips64el -mcpu=mips64 -mattr=n64 < %s | FileCheck -check-prefix=EL %s ; RUN: llc -march=mips64 -mcpu=mips64 -mattr=n64 < %s | FileCheck -check-prefix=EB %s diff --git a/test/CodeGen/Mips/optimize-fp-math.ll b/test/CodeGen/Mips/optimize-fp-math.ll index 8b71dc42344..7886f29f5ce 100644 --- a/test/CodeGen/Mips/optimize-fp-math.ll +++ b/test/CodeGen/Mips/optimize-fp-math.ll @@ -1,4 +1,5 @@ ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32 +; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s -check-prefix=64 ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s -check-prefix=64 ; 32-LABEL: test_sqrtf_float_: diff --git a/test/CodeGen/Mips/remat-immed-load.ll b/test/CodeGen/Mips/remat-immed-load.ll index d93964bcaef..b53b156e9ee 100644 --- a/test/CodeGen/Mips/remat-immed-load.ll +++ b/test/CodeGen/Mips/remat-immed-load.ll @@ -1,4 +1,5 @@ ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32 +; RUN: llc -march=mips64el -mcpu=mips4 -mattr=n64 < %s | FileCheck %s -check-prefix=64 ; RUN: llc -march=mips64el -mcpu=mips64 -mattr=n64 < %s | FileCheck %s -check-prefix=64 define void @f0() nounwind { diff --git a/test/CodeGen/Mips/sint-fp-store_pattern.ll b/test/CodeGen/Mips/sint-fp-store_pattern.ll index c44ea080a88..2735d787432 100644 --- a/test/CodeGen/Mips/sint-fp-store_pattern.ll +++ b/test/CodeGen/Mips/sint-fp-store_pattern.ll @@ -1,4 +1,5 @@ ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32 +; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck %s -check-prefix=64 ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s -check-prefix=64 @gint_ = external global i32