[PATCH] D21063: [mips][dsp] Fix use without def on DSPCtrl registers read by rddsp intrinsic.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 03:39:53 PDT 2016
dsanders created this revision.
dsanders added a reviewer: sdardis.
dsanders added a subscriber: llvm-commits.
Herald added subscribers: sdardis, dsanders.
http://reviews.llvm.org/D21063
Files:
lib/Target/Mips/MipsSEISelDAGToDAG.cpp
test/CodeGen/Mips/dsp-r1.ll
Index: test/CodeGen/Mips/dsp-r1.ll
===================================================================
--- test/CodeGen/Mips/dsp-r1.ll
+++ test/CodeGen/Mips/dsp-r1.ll
@@ -1,4 +1,5 @@
-; RUN: llc -march=mipsel -mcpu=mips32 -mattr=+dsp < %s | FileCheck %s
+; RUN: llc -march=mipsel -mcpu=mips32 -mattr=+dsp -verify-machineinstrs < %s | \
+; RUN: FileCheck %s
define i32 @test__builtin_mips_extr_w1(i32 %i0, i32, i64 %a0) nounwind {
entry:
Index: lib/Target/Mips/MipsSEISelDAGToDAG.cpp
===================================================================
--- lib/Target/Mips/MipsSEISelDAGToDAG.cpp
+++ lib/Target/Mips/MipsSEISelDAGToDAG.cpp
@@ -47,7 +47,8 @@
MachineFunction &MF) {
MachineInstrBuilder MIB(MF, &MI);
unsigned Mask = MI.getOperand(1).getImm();
- unsigned Flag = IsDef ? RegState::ImplicitDefine : RegState::Implicit;
+ unsigned Flag =
+ IsDef ? RegState::ImplicitDefine : RegState::Implicit | RegState::Undef;
if (Mask & 1)
MIB.addReg(Mips::DSPPos, Flag);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21063.59860.patch
Type: text/x-patch
Size: 1046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160607/c6fa8ca2/attachment.bin>
More information about the llvm-commits
mailing list