diff options
| author | Reed Kotler <rkotler@mips.com> | 2014-08-07 22:09:01 +0000 |
|---|---|---|
| committer | Reed Kotler <rkotler@mips.com> | 2014-08-07 22:09:01 +0000 |
| commit | 87048a4c9eb1b74548a9ab5c6c7717ae3be80bbd (patch) | |
| tree | feb54949164a98b6dee2134555fbc1c3ca2717a8 /llvm/test/CodeGen/Mips | |
| parent | b9fd9ed37ebf24d0935fe597cc8ea13f77288636 (diff) | |
| download | bcm5719-llvm-87048a4c9eb1b74548a9ab5c6c7717ae3be80bbd.tar.gz bcm5719-llvm-87048a4c9eb1b74548a9ab5c6c7717ae3be80bbd.zip | |
fix materialization of one bit constants and global values which are accessed through
a base GOT entry.
Summary:
get tip of tree mips fast-isel to pass test-suite
Two bugs were fixed:
1) one bit booleans were treated as 1 bit signed integers and so the literal '1' could become sign extended.
2) mips uses got for pic but in certain cases, as with string constants for example, many items can be referenced from the same got entry and this case was not handled properly.
Test Plan: test-suite
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: mcrosier
Differential Revision: http://reviews.llvm.org/D4801
llvm-svn: 215155
Diffstat (limited to 'llvm/test/CodeGen/Mips')
| -rw-r--r-- | llvm/test/CodeGen/Mips/Fast-ISel/loadstrconst.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/Fast-ISel/loadstrconst.ll b/llvm/test/CodeGen/Mips/Fast-ISel/loadstrconst.ll new file mode 100644 index 00000000000..b32e85751da --- /dev/null +++ b/llvm/test/CodeGen/Mips/Fast-ISel/loadstrconst.ll @@ -0,0 +1,19 @@ +; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ +; RUN: < %s | FileCheck %s + +@.str = private unnamed_addr constant [6 x i8] c"hello\00", align 1 +@s = common global i8* null, align 4 + +; Function Attrs: nounwind +define void @foo() #0 { +entry: + store i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i8** @s, align 4 + ret void +; CHECK: .ent foo +; CHECK: lw $[[REG1:[0-9]+]], %got($.str)(${{[0-9]+}}) +; CHECK: addiu ${{[0-9]+}}, $[[REG1]], %lo($.str) + +} + +attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } + |

