1 ; Test memory-to-memory ORs.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 ; Test the simple i8 case.
6 define void @f1(i8 *%ptr1) {
8 ; CHECK: oc 1(1,%r2), 0(%r2)
10 %ptr2 = getelementptr i8, i8 *%ptr1, i64 1
11 %val = load i8, i8 *%ptr1
12 %old = load i8, i8 *%ptr2
13 %or = or i8 %val, %old
14 store i8 %or, i8 *%ptr2
18 ; Test the simple i16 case.
19 define void @f2(i16 *%ptr1) {
21 ; CHECK: oc 2(2,%r2), 0(%r2)
23 %ptr2 = getelementptr i16, i16 *%ptr1, i64 1
24 %val = load i16, i16 *%ptr1
25 %old = load i16, i16 *%ptr2
26 %or = or i16 %val, %old
27 store i16 %or, i16 *%ptr2
31 ; Test the simple i32 case.
32 define void @f3(i32 *%ptr1) {
34 ; CHECK: oc 4(4,%r2), 0(%r2)
36 %ptr2 = getelementptr i32, i32 *%ptr1, i64 1
37 %val = load i32, i32 *%ptr1
38 %old = load i32, i32 *%ptr2
39 %or = or i32 %old, %val
40 store i32 %or, i32 *%ptr2
45 define void @f4(i64 *%ptr1) {
47 ; CHECK: oc 8(8,%r2), 0(%r2)
49 %ptr2 = getelementptr i64, i64 *%ptr1, i64 1
50 %val = load i64, i64 *%ptr1
51 %old = load i64, i64 *%ptr2
52 %or = or i64 %old, %val
53 store i64 %or, i64 *%ptr2
57 ; Leave other more complicated tests to and-08.ll.