diff options
author | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
commit | dce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch) | |
tree | dcebc53f2b182f145a2e659393bf9a0472cedf23 /test/CodeGen/Mips/Fast-ISel | |
parent | 220b921aed042f9e520c26cffd8282a94c66c3d5 (diff) | |
download | external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2 |
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'test/CodeGen/Mips/Fast-ISel')
-rw-r--r-- | test/CodeGen/Mips/Fast-ISel/nullvoid.ll | 9 | ||||
-rw-r--r-- | test/CodeGen/Mips/Fast-ISel/simplestore.ll | 15 | ||||
-rw-r--r-- | test/CodeGen/Mips/Fast-ISel/simplestorei.ll | 65 |
3 files changed, 89 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/Fast-ISel/nullvoid.ll b/test/CodeGen/Mips/Fast-ISel/nullvoid.ll new file mode 100644 index 0000000..eeaff87 --- /dev/null +++ b/test/CodeGen/Mips/Fast-ISel/nullvoid.ll @@ -0,0 +1,9 @@ +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ +; RUN: < %s | FileCheck %s + +; Function Attrs: nounwind +define void @foo() { +entry: + ret void +; CHECK: jr $ra +} diff --git a/test/CodeGen/Mips/Fast-ISel/simplestore.ll b/test/CodeGen/Mips/Fast-ISel/simplestore.ll new file mode 100644 index 0000000..5d52481 --- /dev/null +++ b/test/CodeGen/Mips/Fast-ISel/simplestore.ll @@ -0,0 +1,15 @@ +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ +; RUN: < %s | FileCheck %s + +@abcd = external global i32 + +; Function Attrs: nounwind +define void @foo() { +entry: + store i32 12345, i32* @abcd, align 4 +; CHECK: addiu $[[REG1:[0-9]+]], $zero, 12345 +; CHECK: lw $[[REG2:[0-9]+]], %got(abcd)(${{[0-9]+}}) +; CHECK: sw $[[REG1]], 0($[[REG2]]) + ret void +} + diff --git a/test/CodeGen/Mips/Fast-ISel/simplestorei.ll b/test/CodeGen/Mips/Fast-ISel/simplestorei.ll new file mode 100644 index 0000000..7d2c8e7 --- /dev/null +++ b/test/CodeGen/Mips/Fast-ISel/simplestorei.ll @@ -0,0 +1,65 @@ +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ +; RUN: < %s | FileCheck %s + +@ijk = external global i32 + +; Function Attrs: nounwind +define void @si2_1() #0 { +entry: + store i32 32767, i32* @ijk, align 4 +; CHECK: .ent si2_1 +; CHECK: addiu $[[REG1:[0-9]+]], $zero, 32767 +; CHECK: lw $[[REG2:[0-9]+]], %got(ijk)(${{[0-9]+}}) +; CHECK: sw $[[REG1]], 0($[[REG2]]) + + ret void +} + +; Function Attrs: nounwind +define void @si2_2() #0 { +entry: + store i32 -32768, i32* @ijk, align 4 +; CHECK: .ent si2_2 +; CHECK: addiu $[[REG1:[0-9]+]], $zero, -32768 +; CHECK: lw $[[REG2:[0-9]+]], %got(ijk)(${{[0-9]+}}) +; CHECK: sw $[[REG1]], 0($[[REG2]]) + ret void +} + +; Function Attrs: nounwind +define void @ui2_1() #0 { +entry: + store i32 65535, i32* @ijk, align 4 +; CHECK: .ent ui2_1 +; CHECK: ori $[[REG1:[0-9]+]], $zero, 65535 +; CHECK: lw $[[REG2:[0-9]+]], %got(ijk)(${{[0-9]+}}) +; CHECK: sw $[[REG1]], 0($[[REG2]]) + ret void +} + +; Function Attrs: nounwind +define void @ui4_1() #0 { +entry: + store i32 983040, i32* @ijk, align 4 +; CHECK: .ent ui4_1 +; CHECK: lui $[[REG1:[0-9]+]], 15 +; CHECK: lw $[[REG2:[0-9]+]], %got(ijk)(${{[0-9]+}}) +; CHECK: sw $[[REG1]], 0($[[REG2]]) + ret void +} + +; Function Attrs: nounwind +define void @ui4_2() #0 { +entry: + store i32 719566, i32* @ijk, align 4 +; CHECK: .ent ui4_2 +; CHECK: lui $[[REG1:[0-9]+]], 10 +; CHECK: ori $[[REG1]], $[[REG1]], 64206 +; CHECK: lw $[[REG2:[0-9]+]], %got(ijk)(${{[0-9]+}}) +; CHECK: sw $[[REG1]], 0($[[REG2]]) + ret void +} + +attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } + + |