Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 7b27dc2

Browse files
committed
[mips][mips16] Fix ZERO is not a CPU16Regs register error from the machine verifier.
Summary: Partially fixes PR27458 Reviewers: sdardis Subscribers: dsanders, llvm-commits, sdardis Differential Revision: http://reviews.llvm.org/D20330 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270037 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 7e9b796 commit 7b27dc2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/Target/Mips/Mips16InstrInfo.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ def: UncondBranch16_pat<br, Bimm16>;
15511551

15521552
// Small immediates
15531553
def: Mips16Pat<(i32 immSExt16:$in),
1554-
(AddiuRxRxImmX16 (Move32R16 ZERO), immSExt16:$in)>;
1554+
(AddiuRxRxImmX16 (MoveR3216 ZERO), immSExt16:$in)>;
15551555

15561556
def: Mips16Pat<(i32 immZExt16:$in), (LiRxImmX16 immZExt16:$in)>;
15571557

test/CodeGen/Mips/mips16fpe.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=16hf
1+
; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=pic -O3 \
2+
; RUN: -verify-machineinstrs < %s | FileCheck %s -check-prefix=16hf
23

34
@x = global float 5.000000e+00, align 4
45
@y = global float 1.500000e+01, align 4

0 commit comments

Comments
 (0)