mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
ab043ff680
Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 llvm-svn: 230794
28 lines
1.1 KiB
LLVM
28 lines
1.1 KiB
LLVM
; RUN: llc -mtriple=aarch64-none-linux-gnu -aarch64-atomic-cfg-tidy=0 -verify-machineinstrs < %s | FileCheck %s
|
|
; RUN: llc -code-model=large -mtriple=aarch64-none-linux-gnu -aarch64-atomic-cfg-tidy=0 -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-LARGE %s
|
|
|
|
@addr = global i8* null
|
|
|
|
define void @test_blockaddress() {
|
|
; CHECK-LABEL: test_blockaddress:
|
|
store volatile i8* blockaddress(@test_blockaddress, %block), i8** @addr
|
|
%val = load volatile i8*, i8** @addr
|
|
indirectbr i8* %val, [label %block]
|
|
; CHECK: adrp [[DEST_HI:x[0-9]+]], [[DEST_LBL:.Ltmp[0-9]+]]
|
|
; CHECK: add [[DEST:x[0-9]+]], [[DEST_HI]], {{#?}}:lo12:[[DEST_LBL]]
|
|
; CHECK: str [[DEST]],
|
|
; CHECK: ldr [[NEWDEST:x[0-9]+]]
|
|
; CHECK: br [[NEWDEST]]
|
|
|
|
; CHECK-LARGE: movz [[ADDR_REG:x[0-9]+]], #:abs_g3:[[DEST_LBL:.Ltmp[0-9]+]]
|
|
; CHECK-LARGE: movk [[ADDR_REG]], #:abs_g2_nc:[[DEST_LBL]]
|
|
; CHECK-LARGE: movk [[ADDR_REG]], #:abs_g1_nc:[[DEST_LBL]]
|
|
; CHECK-LARGE: movk [[ADDR_REG]], #:abs_g0_nc:[[DEST_LBL]]
|
|
; CHECK-LARGE: str [[ADDR_REG]],
|
|
; CHECK-LARGE: ldr [[NEWDEST:x[0-9]+]]
|
|
; CHECK-LARGE: br [[NEWDEST]]
|
|
|
|
block:
|
|
ret void
|
|
}
|