mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
7c9c6ed761
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230794 91177308-0d34-0410-b5e6-96231b3b80d8
47 lines
2.0 KiB
LLVM
47 lines
2.0 KiB
LLVM
; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-none-linux-gnu -mcpu=cyclone | FileCheck %s
|
|
; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-none-linux-gnu -code-model=large -mcpu=cyclone | FileCheck --check-prefix=CHECK-LARGE %s
|
|
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP %s
|
|
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -code-model=large -mattr=-fp-armv8 | FileCheck --check-prefix=CHECK-NOFP-LARGE %s
|
|
|
|
@varfloat = global float 0.0
|
|
@vardouble = global double 0.0
|
|
|
|
define void @floating_lits() {
|
|
; CHECK-LABEL: floating_lits:
|
|
|
|
%floatval = load float, float* @varfloat
|
|
%newfloat = fadd float %floatval, 128.0
|
|
; CHECK: adrp x[[LITBASE:[0-9]+]], [[CURLIT:.LCPI[0-9]+_[0-9]+]]
|
|
; CHECK: ldr [[LIT128:s[0-9]+]], [x[[LITBASE]], {{#?}}:lo12:[[CURLIT]]]
|
|
; CHECK-NOFP-NOT: ldr {{s[0-9]+}},
|
|
|
|
; CHECK-LARGE: movz x[[LITADDR:[0-9]+]], #:abs_g3:[[CURLIT:.LCPI[0-9]+_[0-9]+]]
|
|
; CHECK-LARGE: movk x[[LITADDR]], #:abs_g2_nc:[[CURLIT]]
|
|
; CHECK-LARGE: movk x[[LITADDR]], #:abs_g1_nc:[[CURLIT]]
|
|
; CHECK-LARGE: movk x[[LITADDR]], #:abs_g0_nc:[[CURLIT]]
|
|
; CHECK-LARGE: ldr {{s[0-9]+}}, [x[[LITADDR]]]
|
|
; CHECK-LARGE: fadd
|
|
; CHECK-NOFP-LARGE-NOT: ldr {{s[0-9]+}},
|
|
; CHECK-NOFP-LARGE-NOT: fadd
|
|
|
|
store float %newfloat, float* @varfloat
|
|
|
|
%doubleval = load double, double* @vardouble
|
|
%newdouble = fadd double %doubleval, 129.0
|
|
; CHECK: adrp x[[LITBASE:[0-9]+]], [[CURLIT:.LCPI[0-9]+_[0-9]+]]
|
|
; CHECK: ldr [[LIT129:d[0-9]+]], [x[[LITBASE]], {{#?}}:lo12:[[CURLIT]]]
|
|
; CHECK-NOFP-NOT: ldr {{d[0-9]+}},
|
|
; CHECK-NOFP-NOT: fadd
|
|
|
|
; CHECK-LARGE: movz x[[LITADDR:[0-9]+]], #:abs_g3:[[CURLIT:.LCPI[0-9]+_[0-9]+]]
|
|
; CHECK-LARGE: movk x[[LITADDR]], #:abs_g2_nc:[[CURLIT]]
|
|
; CHECK-LARGE: movk x[[LITADDR]], #:abs_g1_nc:[[CURLIT]]
|
|
; CHECK-LARGE: movk x[[LITADDR]], #:abs_g0_nc:[[CURLIT]]
|
|
; CHECK-LARGE: ldr {{d[0-9]+}}, [x[[LITADDR]]]
|
|
; CHECK-NOFP-LARGE-NOT: ldr {{d[0-9]+}},
|
|
|
|
store double %newdouble, double* @vardouble
|
|
|
|
ret void
|
|
}
|