mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +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
58 lines
1.3 KiB
LLVM
58 lines
1.3 KiB
LLVM
; Test memory-to-memory ORs.
|
|
;
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
|
|
|
|
; Test the simple i8 case.
|
|
define void @f1(i8 *%ptr1) {
|
|
; CHECK-LABEL: f1:
|
|
; CHECK: oc 1(1,%r2), 0(%r2)
|
|
; CHECK: br %r14
|
|
%ptr2 = getelementptr i8, i8 *%ptr1, i64 1
|
|
%val = load i8 , i8 *%ptr1
|
|
%old = load i8 , i8 *%ptr2
|
|
%or = or i8 %val, %old
|
|
store i8 %or, i8 *%ptr2
|
|
ret void
|
|
}
|
|
|
|
; Test the simple i16 case.
|
|
define void @f2(i16 *%ptr1) {
|
|
; CHECK-LABEL: f2:
|
|
; CHECK: oc 2(2,%r2), 0(%r2)
|
|
; CHECK: br %r14
|
|
%ptr2 = getelementptr i16, i16 *%ptr1, i64 1
|
|
%val = load i16 , i16 *%ptr1
|
|
%old = load i16 , i16 *%ptr2
|
|
%or = or i16 %val, %old
|
|
store i16 %or, i16 *%ptr2
|
|
ret void
|
|
}
|
|
|
|
; Test the simple i32 case.
|
|
define void @f3(i32 *%ptr1) {
|
|
; CHECK-LABEL: f3:
|
|
; CHECK: oc 4(4,%r2), 0(%r2)
|
|
; CHECK: br %r14
|
|
%ptr2 = getelementptr i32, i32 *%ptr1, i64 1
|
|
%val = load i32 , i32 *%ptr1
|
|
%old = load i32 , i32 *%ptr2
|
|
%or = or i32 %old, %val
|
|
store i32 %or, i32 *%ptr2
|
|
ret void
|
|
}
|
|
|
|
; Test the i64 case.
|
|
define void @f4(i64 *%ptr1) {
|
|
; CHECK-LABEL: f4:
|
|
; CHECK: oc 8(8,%r2), 0(%r2)
|
|
; CHECK: br %r14
|
|
%ptr2 = getelementptr i64, i64 *%ptr1, i64 1
|
|
%val = load i64 , i64 *%ptr1
|
|
%old = load i64 , i64 *%ptr2
|
|
%or = or i64 %old, %val
|
|
store i64 %or, i64 *%ptr2
|
|
ret void
|
|
}
|
|
|
|
; Leave other more complicated tests to and-08.ll.
|