[PATCH] D20330: [mips][mips16] Fix ZERO is not a CPU16Regs register error from the machine verifier.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 07:20:09 PDT 2016


dsanders created this revision.
dsanders added a reviewer: sdardis.
dsanders added a subscriber: llvm-commits.
Herald added subscribers: sdardis, dsanders.

Partially fixes PR27458

http://reviews.llvm.org/D20330

Files:
  lib/Target/Mips/Mips16InstrInfo.td
  test/CodeGen/Mips/mips16fpe.ll

Index: test/CodeGen/Mips/mips16fpe.ll
===================================================================
--- test/CodeGen/Mips/mips16fpe.ll
+++ test/CodeGen/Mips/mips16fpe.ll
@@ -1,4 +1,5 @@
-; RUN: llc  -march=mipsel -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=16hf
+; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=pic -O3 \
+; RUN:     -verify-machineinstrs < %s | FileCheck %s -check-prefix=16hf
 
 @x = global float 5.000000e+00, align 4
 @y = global float 1.500000e+01, align 4
Index: lib/Target/Mips/Mips16InstrInfo.td
===================================================================
--- lib/Target/Mips/Mips16InstrInfo.td
+++ lib/Target/Mips/Mips16InstrInfo.td
@@ -1551,7 +1551,7 @@
 
 // Small immediates
 def: Mips16Pat<(i32 immSExt16:$in),
-               (AddiuRxRxImmX16 (Move32R16 ZERO), immSExt16:$in)>;
+               (AddiuRxRxImmX16 (MoveR3216 ZERO), immSExt16:$in)>;
 
 def: Mips16Pat<(i32 immZExt16:$in), (LiRxImmX16 immZExt16:$in)>;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20330.57476.patch
Type: text/x-patch
Size: 999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160517/09799d61/attachment.bin>


More information about the llvm-commits mailing list