1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/CodeGen/SPARC/reg64.ll
Joerg Sonnenberger d0ce5a6942 [SPARC] Use the correct register set for the "r" asm constraint.
64bit mode must use 64bit registers, otherwise assumptions about the top
half of the registers are made. Problem found by Takeshi Nakayama in
NetBSD.

llvm-svn: 358998
2019-04-23 15:15:33 +00:00

11 lines
234 B
LLVM

; RUN: llc < %s -march=sparcv9 | FileCheck %s
define dso_local zeroext i32 @f() local_unnamed_addr {
entry:
%0 = tail call i64 asm "", "=r"()
%shr = lshr i64 %0, 32
%conv = trunc i64 %shr to i32
ret i32 %conv
}
; CHECK: srlx