mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
3ea2df7c7b
Similar to gep (r230786) and load (r230794) changes. Similar migration script can be used to update test cases, which successfully migrated all of LLVM and Polly, but about 4 test cases needed manually changes in Clang. (this script will read the contents of stdin and massage it into stdout - wrap it in the 'apply.sh' script shown in previous commits + xargs to apply it over a large set of test cases) import fileinput import sys import re rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL) def conv(match): line = match.group(1) line += match.group(4) line += ", " line += match.group(2) return line line = sys.stdin.read() off = 0 for match in re.finditer(rep, line): sys.stdout.write(line[off:match.start()]) sys.stdout.write(conv(match)) off = match.end() sys.stdout.write(line[off:]) llvm-svn: 232184
42 lines
2.1 KiB
LLVM
42 lines
2.1 KiB
LLVM
; RUN: llc -mtriple=mips-unknown-linux-gnu -relocation-model=static < %s | FileCheck --check-prefix=ALL --check-prefix=SYM32 --check-prefix=O32-BE %s
|
|
; RUN: llc -mtriple=mipsel-unknown-linux-gnu -relocation-model=static < %s | FileCheck --check-prefix=ALL --check-prefix=SYM32 --check-prefix=O32-LE %s
|
|
|
|
; RUN-TODO: llc -mtriple=mips64-unknown-linux-gnu -relocation-model=static -target-abi n32 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM32 --check-prefix=O32-BE %s
|
|
; RUN-TODO: llc -mtriple=mips64el-unknown-linux-gnu -relocation-model=static -target-abi n32 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM32 --check-prefix=O32-LE %s
|
|
|
|
; RUN: llc -mtriple=mips64-unknown-linux-gnu -relocation-model=static -target-abi n32 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM32 --check-prefix=NEW-BE %s
|
|
; RUN: llc -mtriple=mips64el-unknown-linux-gnu -relocation-model=static -target-abi n32 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM32 --check-prefix=NEW-LE %s
|
|
|
|
; RUN: llc -mtriple=mips64-unknown-linux-gnu -relocation-model=static -target-abi n64 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM64 --check-prefix=NEW-BE %s
|
|
; RUN: llc -mtriple=mips64el-unknown-linux-gnu -relocation-model=static -target-abi n64 < %s | FileCheck --check-prefix=ALL --check-prefix=SYM64 --check-prefix=NEW-LE %s
|
|
|
|
; Test small structures for all ABI's and byte orders.
|
|
;
|
|
; N32/N64 are identical in this area so their checks have been combined into
|
|
; the 'NEW' prefix (the N stands for New).
|
|
|
|
@bytes = global [2 x i8] zeroinitializer
|
|
|
|
define void @s_i8(i8 inreg %a) nounwind {
|
|
entry:
|
|
store i8 %a, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @bytes, i32 0, i32 1)
|
|
ret void
|
|
}
|
|
|
|
; ALL-LABEL: s_i8:
|
|
|
|
; SYM32-DAG: lui [[PTR_HI:\$[0-9]+]], %hi(bytes)
|
|
; SYM32-DAG: addiu [[PTR:\$[0-9]+]], [[PTR_HI]], %lo(bytes)
|
|
|
|
; SYM64-DAG: ld [[PTR:\$[0-9]+]], %got_disp(bytes)(
|
|
|
|
; O32-BE-DAG: srl [[ARG:\$[0-9]+]], $4, 24
|
|
; O32-BE-DAG: sb [[ARG]], 1([[PTR]])
|
|
|
|
; O32-LE-DAG: sb $4, 1([[PTR]])
|
|
|
|
; NEW-BE-DAG: dsrl [[ARG:\$[0-9]+]], $4, 56
|
|
; NEW-BE-DAG: sb [[ARG]], 1([[PTR]])
|
|
|
|
; NEW-LE-DAG: sb $4, 1([[PTR]])
|