mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
9bd9868db9
Override getTypeForExtReturn so that functions returning an i32 typed value have it sign extended on MIPS64. Also provide patterns to get rid of unneeded sign extensions for arithmetic instructions which implicitly sign extend their results. Differential Revision: https://reviews.llvm.org/D48374 llvm-svn: 338019
15 lines
493 B
LLVM
15 lines
493 B
LLVM
; RUN: llc < %s -march=mips64 -mcpu=mips3 | FileCheck %s
|
|
|
|
; Currently, the following IR assembly generates a KILL instruction between
|
|
; the bitwise-and instruction and the return instruction. We verify that the
|
|
; delay slot filler ignores such KILL instructions by filling the slot of the
|
|
; return instruction properly.
|
|
define signext i32 @f1(i32 signext %a, i32 signext %b) {
|
|
entry:
|
|
; CHECK: jr $ra
|
|
; CHECK-NEXT: and $2, $4, $5
|
|
|
|
%r = and i32 %a, %b
|
|
ret i32 %r
|
|
}
|