1 ; Test byteswaps between registers.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 declare i32 @llvm.bswap.i32(i32 %a)
6 declare i64 @llvm.bswap.i64(i64 %a)
8 ; Check 32-bit register-to-register byteswaps.
9 define i32 @f1(i32 %a) {
11 ; CHECK: lrvr [[REGISTER:%r[0-5]]], %r2
13 %swapped = call i32 @llvm.bswap.i32(i32 %a)
17 ; Check 64-bit register-to-register byteswaps.
18 define i64 @f2(i64 %a) {
20 ; CHECK: lrvgr %r2, %r2
22 %swapped = call i64 @llvm.bswap.i64(i64 %a)