mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 06:38:44 +00:00
ed541fe200
Summary: The -mcpu=mips16 option caused the Integrated Assembler to crash because it couldn't figure out the architecture revision number to write to the .MIPS.abiflags section. This CPU definition has been removed because, like microMIPS, MIPS16 is an ASE to a base architecture. Reviewers: vkalintiris Subscribers: rkotler, llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D13656 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250407 91177308-0d34-0410-b5e6-96231b3b80d8
27 lines
749 B
LLVM
27 lines
749 B
LLVM
; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=16
|
|
|
|
@i = global i32 1, align 4
|
|
@j = global i32 2, align 4
|
|
@a = global i32 5, align 4
|
|
@.str = private unnamed_addr constant [8 x i8] c"%i = 1\0A\00", align 1
|
|
@k = common global i32 0, align 4
|
|
|
|
define void @t() nounwind "target-cpu"="mips16" "target-features"="+mips16,+o32" {
|
|
entry:
|
|
%0 = load i32, i32* @a, align 4
|
|
%cmp = icmp ne i32 %0, 10
|
|
%1 = load i32, i32* @i, align 4
|
|
%2 = load i32, i32* @j, align 4
|
|
%cond = select i1 %cmp, i32 %1, i32 %2
|
|
store i32 %cond, i32* @i, align 4
|
|
ret void
|
|
}
|
|
|
|
; 16: cmpi ${{[0-9]+}}, 10
|
|
; 16: btnez $BB{{[0-9]+}}_{{[0-9]}}
|
|
|
|
|
|
attributes #0 = { nounwind "target-cpu"="mips16" "target-features"="+mips16,+o32" }
|
|
|
|
|