mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
80d5f68422
Return is now considered a predicable instruction, and is converted to a newly-added CondReturn (which maps to BCR to %r14) instruction by the if conversion pass. Also, fused compare-and-branch transform knows about conditional returns, emitting the proper fused instructions for them. This transform triggers on a *lot* of tests, hence the huge diffstat. The changes are mostly jX to br %r14 -> bXr %r14. Author: koriakin Differential Revision: http://reviews.llvm.org/D17339 llvm-svn: 265689
22 lines
598 B
LLVM
22 lines
598 B
LLVM
; Test memchr using SRST, with a weird but usable prototype.
|
|
;
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu -verify-machineinstrs | FileCheck %s
|
|
|
|
declare i8 *@memchr(i8 *%src, i16 %char, i32 %len)
|
|
|
|
; Test a simple forwarded call.
|
|
define i8 *@f1(i8 *%src, i16 %char, i32 %len) {
|
|
; CHECK-LABEL: f1:
|
|
; CHECK-DAG: lgr [[REG:%r[1-5]]], %r2
|
|
; CHECK-DAG: algfr %r2, %r4
|
|
; CHECK-DAG: llcr %r0, %r3
|
|
; CHECK: [[LABEL:\.[^:]*]]:
|
|
; CHECK: srst %r2, [[REG]]
|
|
; CHECK-NEXT: jo [[LABEL]]
|
|
; CHECK: blr %r14
|
|
; CHECK: lghi %r2, 0
|
|
; CHECK: br %r14
|
|
%res = call i8 *@memchr(i8 *%src, i16 %char, i32 %len)
|
|
ret i8 *%res
|
|
}
|