mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 12:02:58 +02:00
f084414012
Summary: The microMIPS register class GPRMM16 does not contain the $zero register. However, MipsSEDAGToDAGISel::replaceUsesWithZeroReg() would replace uses of the $dst register: [d]addiu, $dst, $zero, 0 with the $zero register, without checking for membership in the register class of the target machine operand. Reviewers: dsanders Subscribers: llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D13984 llvm-svn: 251622
9 lines
238 B
LLVM
9 lines
238 B
LLVM
; RUN: llc -march=mips -mcpu=mips32r2 -mattr=+micromips,+nooddspreg -O0 < %s | FileCheck %s
|
|
|
|
; CHECK: addiu $[[R0:[0-9]+]], $zero, 0
|
|
; CHECK: subu16 $2, $[[R0]], ${{[0-9]+}}
|
|
define i32 @foo() {
|
|
%1 = sub i32 0, undef
|
|
ret i32 %1
|
|
}
|