llvm-6502/test/CodeGen/SystemZ/02-MemArith.ll
Chris Lattner 26b0000166 manually upgrade a bunch of tests to modern syntax, and remove some that
are either unreduced or only test old syntax.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133228 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-17 03:14:27 +00:00

134 lines
3.5 KiB
LLVM

; RUN: llc < %s -march=systemz | FileCheck %s
define signext i32 @foo1(i32 %a, i32 *%b, i64 %idx) {
; CHECK: foo1:
; CHECK: a %r2, 4(%r1,%r3)
entry:
%idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
%ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
%c = load i32* %ptr
%d = add i32 %a, %c
ret i32 %d
}
define signext i32 @foo2(i32 %a, i32 *%b, i64 %idx) {
; CHECK: foo2:
; CHECK: ay %r2, -4(%r1,%r3)
entry:
%idx2 = add i64 %idx, -1 ; <i64> [#uses=1]
%ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
%c = load i32* %ptr
%d = add i32 %a, %c
ret i32 %d
}
define signext i64 @foo3(i64 %a, i64 *%b, i64 %idx) {
; CHECK: foo3:
; CHECK: ag %r2, 8(%r1,%r3)
entry:
%idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
%ptr = getelementptr i64* %b, i64 %idx2 ; <i64*> [#uses=1]
%c = load i64* %ptr
%d = add i64 %a, %c
ret i64 %d
}
define signext i32 @foo4(i32 %a, i32 *%b, i64 %idx) {
; CHECK: foo4:
; CHECK: n %r2, 4(%r1,%r3)
entry:
%idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
%ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
%c = load i32* %ptr
%d = and i32 %a, %c
ret i32 %d
}
define signext i32 @foo5(i32 %a, i32 *%b, i64 %idx) {
; CHECK: foo5:
; CHECK: ny %r2, -4(%r1,%r3)
entry:
%idx2 = add i64 %idx, -1 ; <i64> [#uses=1]
%ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
%c = load i32* %ptr
%d = and i32 %a, %c
ret i32 %d
}
define signext i64 @foo6(i64 %a, i64 *%b, i64 %idx) {
; CHECK: foo6:
; CHECK: ng %r2, 8(%r1,%r3)
entry:
%idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
%ptr = getelementptr i64* %b, i64 %idx2 ; <i64*> [#uses=1]
%c = load i64* %ptr
%d = and i64 %a, %c
ret i64 %d
}
define signext i32 @foo7(i32 %a, i32 *%b, i64 %idx) {
; CHECK: foo7:
; CHECK: o %r2, 4(%r1,%r3)
entry:
%idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
%ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
%c = load i32* %ptr
%d = or i32 %a, %c
ret i32 %d
}
define signext i32 @foo8(i32 %a, i32 *%b, i64 %idx) {
; CHECK: foo8:
; CHECK: oy %r2, -4(%r1,%r3)
entry:
%idx2 = add i64 %idx, -1 ; <i64> [#uses=1]
%ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
%c = load i32* %ptr
%d = or i32 %a, %c
ret i32 %d
}
define signext i64 @foo9(i64 %a, i64 *%b, i64 %idx) {
; CHECK: foo9:
; CHECK: og %r2, 8(%r1,%r3)
entry:
%idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
%ptr = getelementptr i64* %b, i64 %idx2 ; <i64*> [#uses=1]
%c = load i64* %ptr
%d = or i64 %a, %c
ret i64 %d
}
define signext i32 @foo10(i32 %a, i32 *%b, i64 %idx) {
; CHECK: foo10:
; CHECK: x %r2, 4(%r1,%r3)
entry:
%idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
%ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
%c = load i32* %ptr
%d = xor i32 %a, %c
ret i32 %d
}
define signext i32 @foo11(i32 %a, i32 *%b, i64 %idx) {
; CHECK: foo11:
; CHECK: xy %r2, -4(%r1,%r3)
entry:
%idx2 = add i64 %idx, -1 ; <i64> [#uses=1]
%ptr = getelementptr i32* %b, i64 %idx2 ; <i32*> [#uses=1]
%c = load i32* %ptr
%d = xor i32 %a, %c
ret i32 %d
}
define signext i64 @foo12(i64 %a, i64 *%b, i64 %idx) {
; CHECK: foo12:
; CHECK: xg %r2, 8(%r1,%r3)
entry:
%idx2 = add i64 %idx, 1 ; <i64> [#uses=1]
%ptr = getelementptr i64* %b, i64 %idx2 ; <i64*> [#uses=1]
%c = load i64* %ptr
%d = xor i64 %a, %c
ret i64 %d
}